dessn / Pippin

Pipeline for photometric SN analysis
MIT License
9 stars 10 forks source link

Compatibility with simulations from Roman and SuperNNova #102

Closed anaismoller closed 1 year ago

anaismoller commented 2 years ago

SuperNNova requires that information on the simulations used for training. Some values are default.

Can we please update Pippin to retrieve parameters from simulations/config file for this? I see an option of using a SuperNNova customised yml but not as part of the general Pippin config. This is due to a bug trying to classify Roman sims (see Ben Rose's work)

As in https://github.com/supernnova/SuperNNova/tree/master/configs_yml we would need to add sntypes list_filters

For Roman we would add while running --list_filters Y J H F --sntypes '{"110":"Ia"}' and others from the generated simulation from the Plasticc configs https://github.com/LSSTDESC/plasticc_alerts/blob/main/Examples/plasticc_schema/elasticc_origmap.txt

An example config file is in $WFIRST/USERS/brose3/transient_catalog/train_classifiers/BR-ROMAN-CLAS-TRAIN.yml

(these changes could help have an easy use of SuperNNova with other surveys/simulations using Pippin)

Thanks heaps!

benjaminrose commented 2 years ago

What is the status of this Issue? It sounds like it might be a reasonable first contribution fix. If so, can you point me to the relevant area of Pippin and I can see what I can contribute?

Thanks

OmegaLambda1998 commented 2 years ago

Hi @benjaminrose, Haven't had time to work on this, so if you wanted to give it a shot that would be great!

The relevant file is pippin/classifiers/supernnova.py. In the __init__ method you can add new parameters to the class such as self.filters = options.get("FILTERS", ['g', 'r', 'i', 'z']) or something like that. Your choice of key will be what key is used in the pippin input file. Next you can add the new options to the setup_dict (approximately line 270). Finally in pippin/tasks/supernnova add the options to the script command.

OmegaLambda1998 commented 1 year ago

Resolved.