nuclear-multimessenger-astronomy / nmma

A pythonic library for probing nuclear physics and cosmology with multimessenger analysis
https://nuclear-multimessenger-astronomy.github.io/nmma/
GNU General Public License v3.0
33 stars 58 forks source link

add LANL models #79

Closed mcoughlin closed 1 year ago

mcoughlin commented 1 year ago

This PR adds LANL models. Based on work by @bking-astro.

mcoughlin commented 1 year ago

@bking-astro As you will notice, I removed the geometry parameter. I suggest training a different model for each geometry. I also suggest downsampling in inclination.

mcoughlin commented 1 year ago

@tylerbarna @weizmannk Can I get a review please?

tylerbarna commented 1 year ago

@mcoughlin do we have a LANL2022_mag.pkl file?

tylerbarna commented 1 year ago

getting a gps keyerror, will [investigate LANL2022_error.txt

also, side note, light_curve_analysis seems to tell me "Install afterglowpy if you want to timeout simulations" even though I do have afterglowpy (0.7.3) in the evironment

tylerbarna commented 1 year ago

light_curve_generation also isn't working, but that makes sense since there are _mag and _lbol pkl files

(pr_nmma) tyler@Desktop:~/nmma$ light_curve_generation --model LANL2022 --outdir outdir --label LANL_injection --injection ./injection.json --filters g,r,i WARNING: AstropyDeprecationWarning: The update_default_config function is deprecated and may be removed in a future version. [sncosmo] Install afterglowpy if you want to timeout simulations. Traceback (most recent call last): File "/home/tyler/anaconda3/envs/pr_nmma/bin/light_curve_generation", line 8, in <module> sys.exit(main()) File "/home/tyler/anaconda3/envs/pr_nmma/lib/python3.8/site-packages/nmma/em/create_lightcurves.py", line 250, in main light_curve_model = SVDLightCurveModel(**light_curve_kwargs) File "/home/tyler/anaconda3/envs/pr_nmma/lib/python3.8/site-packages/nmma/em/model.py", line 193, in __init__ with open(mag_modelfile, "rb") as handle: FileNotFoundError: [Errno 2] No such file or directory: '/home/tyler/anaconda3/envs/pr_nmma/lib/python3.8/site-packages/nmma/em/svdmodels/LANL2022_mag.pkl'

tylerbarna commented 1 year ago

@weizmannk could you see if the error I encountered is replicated on your machine?