Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Obtaining lists of supernovae of given type #276

Open
2 tasks
rbiswas4 opened this issue Aug 18, 2020 · 2 comments
Open
2 tasks

Obtaining lists of supernovae of given type #276

rbiswas4 opened this issue Aug 18, 2020 · 2 comments

Comments

@rbiswas4
Copy link
Member

I want to look at all builtin sncosmo sources that are of a particular type of SN. For example, I may want to obtain a list of supernovae which have type Ib. This might be complicated as templates are often called Ib Ib/c etc. So perhaps, an easier and more meaningful grouping beyond just Ia and core collapse is :

  • group of IIP (along with L and N)
  • Ib, Ic, Ibc, Ib/c, IIb

Happy to hear other suggestions on how I should group supernovae, but we do not have a given way of obtaining such lists, though it is not hard to write a couple of lines to group them. I think it would be nice to provide a method to actually give users this.

Code to make the above grouping, but we can change it for other suggestions is:

sources = sncosmo.builtins._SOURCES.get_loaders_metadata()  

iips  = list(source['name'] for source in sources if 'sn ii' in source['type'].lower() and not source['type'].endswith('b'))
stripped_envelopes = list(source['name'] for source in sources if not (('sn ii' in source['type'].lower() and not source['type'].endswith('b')) or  ('Ia' in source['type'])))

While doing this, I was also thinking that it would be nice to be able to interrogate a source and find out the information in the builtins like name, type, version etc. A reason not to have this, is that a source may not be a builtin. But, as we move to thinking more about all kinds of transients, it would be good to have a way of obtaining the type of a source. Could we add this to attributes of the Source, even though the user may easily put None as they can with the version?

@kbarbary
Copy link
Member

kbarbary commented Sep 5, 2020

I think an important part of this would be standardizing the names. For example, use either Ib/c or Ibc, but not both.

If we provide a function, it could support multiple levels of groupings:

source_names('Ib')   # return list of all names that have type Ib
source_names('core collapse')  # return list of all names that have any core-collapse SN type

We may want to actually use names like SN Ib and SN CC to distinguish from non-SN transients.

@rbiswas4
Copy link
Member Author

think an important part of this would be standardizing the names. For example, use either Ib/c or Ibc, but not both.
Sure, we can standardize these. It would be a backward incompatible change though. I would vote for Ibc rather than Ib/c
but don't have a strong preference.

We may also want to take the opportunity to encode transient type, subtype, subsubtype, model in the standardized names :
SNIaNormSALT_2.4 ?

We may want to actually use names like SN Ib and SN CC to distinguish from non-SN transients.
Yes! But can we avoid spaces, and use underscores or hyphens instead?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants