Skip to content

Salt2-extended model cannot generate flux #138

Closed
@Samreay

Description

@Samreay

The cl values found when initialising an extended salt 2 source cause the clbase values to reach infinity, breaking the Spline interpolation used in the calculation of flux, causing flux values to all return NaN.

Activity

kbarbary

kbarbary commented on Jun 23, 2016

@kbarbary
Member

I think this is a subtle Python 3 unicode bug that has completely broken all SALT2 models. 😮

Arising from the fact that in Python 3:

In [3]: b'Salt2ExtinctionLaw.version' == 'Salt2ExtinctionLaw.version'
Out[3]: False

At the very least, the extinction law version is being set incorrectly to v0 instead of v1 in SALT2Source._set_colorlaw_from_file.

I've been avoiding using online data (e.g., the SALT2 data files) in tests, but this is evidence that it is really needed.

Samreay

Samreay commented on Jun 23, 2016

@Samreay
Author

Ah, python three unicode, breaking everything yet again. The amount of
grief it caused me when I was trying to fix PolyChord is insane. Is there a
simple work around that I could employ in sncosmo at the moment, or are you
planning on putting a patch out and know the fix?

Cheers

On Wed, Jun 22, 2016 at 5:06 PM, Kyle Barbary notifications@github.com
wrote:

I think this is a subtle Python 3 unicode bug that has completely broken
all SALT2 models. 😮

Arising from the fact that in Python 3:

In [3]: b'Salt2ExtinctionLaw.version' == 'Salt2ExtinctionLaw.version'
Out[3]: False

At the very least, the extinction law version is being set incorrectly to
v0 instead of v1 in SALT2Source._set_colorlaw_from_file.

I've been avoiding using online data (e.g., the SALT2 data files) in
tests, but this is evidence that it is really needed.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#138 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AGb5WXy-5QqS3ooJnQ64qexXaNwCMBSuks5qOc4EgaJpZM4I8HJN
.

kbarbary

kbarbary commented on Jun 23, 2016

@kbarbary
Member
added a commit that references this issue on Jun 23, 2016
612eb34
added a commit that references this issue on Jun 23, 2016

Merge pull request #140 from kbarbary/fix-138

0db07f8
kbarbary

kbarbary commented on Jun 23, 2016

@kbarbary
Member

Can you give master a try now?

Samreay

Samreay commented on Jun 23, 2016

@Samreay
Author

Awesome, thanks Kyle

On Thu, Jun 23, 2016 at 1:33 PM, Kyle Barbary notifications@github.com
wrote:

Closed #138 #138 via 612eb34
612eb34
.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#138 (comment), or mute
the thread
https://github.com/notifications/unsubscribe/AGb5WVUg-vbj-U43Xq7JCvy4cxqxhx9wks5qOu2LgaJpZM4I8HJN
.

Samreay

Samreay commented on Jun 23, 2016

@Samreay
Author

Im reinstalling it from git now. Will check the extended model and report back.

Samreay

Samreay commented on Jun 23, 2016

@Samreay
Author

Alright, done a basic test, and it didnt fall over like it used to! Cheers

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

      Salt2-extended model cannot generate flux · Issue #138 · sncosmo/sncosmo