Skip to content

error when using sdss bandpasses and model with mw extinction #100

Closed
@lisaleemcb

Description

@lisaleemcb

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 .

Activity

kbarbary

kbarbary commented on Aug 7, 2015

@kbarbary
Member

🎆 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#L73

But 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

dannygoldstein commented on Aug 8, 2015

@dannygoldstein
Contributor

What does she win?

added a commit that references this issue on Aug 9, 2015
d7bb004
kbarbary

kbarbary commented on Aug 9, 2015

@kbarbary
Member

@dannygoldstein The respect and thanks of the open-source community. :)

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      error when using sdss bandpasses and model with mw extinction · Issue #100 · sncosmo/sncosmo