-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Labels
SupernovaModelImplementing/correcting supernova modelImplementing/correcting supernova modelminorLow priorityLow prioritysuggestionAn idea that needs to be discussed/approved before starting implementaionAn idea that needs to be discussed/approved before starting implementaion
Description
For almost all models, model.time is sorted from earliest to latest simulation times. However, for Patton_2017 it is the other way around:
model = presn.Patton_2017(progenitor_mass=15*u.Msun)
model.time[0] # -0 h
model.time[-1] # -14425 hThis is not a bug, since we (afaik) never promised that model.time is sorted; but it is unexpected and inconsistent. Since I can think of no reason why we’d want such an inconsistency (and in the Patton_2017 case it’s just an accident—the times are implicitly sorted before the minus sign is added), I wonder if we should change
snewpy/python/snewpy/models/base.py
Line 48 in 54f1152
| self.time = time |
to
self.time = np.sort(time)so that this is automatically sorted consistently for new models in the future?
Metadata
Metadata
Assignees
Labels
SupernovaModelImplementing/correcting supernova modelImplementing/correcting supernova modelminorLow priorityLow prioritysuggestionAn idea that needs to be discussed/approved before starting implementaionAn idea that needs to be discussed/approved before starting implementaion