mwvgroup / csp-cmfgen

A comparison spectral SNe models against CSP data
https://mwvgroup.github.io/nir-comparison/
0 stars 0 forks source link

Incorrect redshift for models. #24

Open djperrefort opened 5 years ago

djperrefort commented 5 years ago

The fluxes we are using to define each custom model are simulated at a distance of 1 kpc away. However, sncosmo asserts a default redshift of 0 for each instantiated Model class. Technically this isn't a big deal because 1 kpc is a pretty small redshift:

>>> from astropy import units as u
>>> from astropy.cosmology import WMAP9
>>> from astropy.coordinates import Distance
>>>
>>> d = Distance(value=1, unit=u.kpc)
>>> d.compute_z(WMAP9)
2.3120594343144655e-07

However, I would still prefer us porting the model correctly.

djperrefort commented 5 years ago

More information on setting custom redshifts for a source and the resulting effect at: https://github.com/sncosmo/sncosmo/issues/249