Closed
Description
The functions model.bandmag()
and model.color()
throw an exception when sdss bandpasses are specified and a sn model is initialized with mw extinction. It appears that this is because the sdss wavelengths are not the expected dtype. This is shown here .
Metadata
Metadata
Assignees
Labels
No labels
Activity
kbarbary commentedon Aug 7, 2015
🎆 Issue 100! 🎆 You win a prize!
Thanks for the detailed report. This is happening because the Cython code for color laws only supports arrays of
float64
: https://github.com/sncosmo/sncosmo/blob/master/sncosmo/_extinction.pyx#L73But I think the fix should be to simply ensure that wavelengths in bandpasses are always
float64
, when the Bandpass is constructed. I'll look into it.dannygoldstein commentedon Aug 8, 2015
What does she win?
ensure Bandpass.wave.dtype == float64. fixes sncosmo#100.
kbarbary commentedon Aug 9, 2015
@dannygoldstein The respect and thanks of the open-source community. :)