Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The negative values in un-rectified SED of SALT2 (and SALT2-extended) at #49

Closed
wants to merge 14 commits into from

Conversation

rbiswas4
Copy link
Contributor

@rbiswas4 rbiswas4 commented Feb 8, 2016

extreme regions of the SNIa phase space can be a problem for codes that
sample the SED like phoSim. Therefore, this change implements:

rectified SED(lambda) = modelSED if SED(lambda) >= 0
= 0 if modelSED(lambda) < 0

This will cause the band flux and band mags (model values to be slightly
biased, but this should not matter much as they are truly small hen
compared to reasonable sky noise

modified:   examples/testSN.py
modified:   python/lsst/sims/catUtils/supernovae/snObject.py

extreme regions of the SNIa phase space can be a problem for codes that
sample the SED like phoSim. Therefore, this change implements:

rectified SED(lambda) = modelSED if SED(lambda) >= 0
                      = 0 if modelSED(lambda) < 0

This will cause the band flux and band mags (model values to be slightly
biased, but this should not matter much as they are truly small hen
compared to reasonable sky noise

	modified:   examples/testSN.py
	modified:   python/lsst/sims/catUtils/supernovae/snObject.py
rbiswas4 and others added 10 commits February 8, 2016 15:55
	modified:   examples/testSN.py
replaced get_galacticRv in EBVMixin.py with get_galacticAv.
galacticRv is now set to 3.1 as a default_column in all of the
relevant InstanceCatalog classes.  get_galacticAv mutiplies
E(B-V) (from the SFD maps) by galacticRv to get galacticAv.
	modified:   examples/SNObject_example.ipynb
Added tests and examples for rectifySED
modified:   examples/SNObject_example.ipynb
    Added plots showing the behavior of rectifySED
modified:   examples/testSN.py
    Added tests checking the default attributes and their modification
behavior
modified:   python/lsst/sims/catUtils/supernovae/snObject.py
    split the attributes on rectify SED and outside model range behavior
extreme regions of the SNIa phase space can be a problem for codes that
sample the SED like phoSim. Therefore, this change implements:

rectified SED(lambda) = modelSED if SED(lambda) >= 0
                      = 0 if modelSED(lambda) < 0

This will cause the band flux and band mags (model values to be slightly
biased, but this should not matter much as they are truly small hen
compared to reasonable sky noise

	modified:   examples/testSN.py
	modified:   python/lsst/sims/catUtils/supernovae/snObject.py
	modified:   examples/testSN.py
	modified:   examples/SNObject_example.ipynb
Added tests and examples for rectifySED
modified:   examples/SNObject_example.ipynb
    Added plots showing the behavior of rectifySED
modified:   examples/testSN.py
    Added tests checking the default attributes and their modification
behavior
modified:   python/lsst/sims/catUtils/supernovae/snObject.py
    split the attributes on rectify SED and outside model range behavior
@@ -9,7 +9,9 @@
implementations of extinction using OD94 model.)
- Band Flux for extincted SED in r Band
- Band Mag for extincted SED in r Band

- rectification of SED: while the SEDs from the model can go negative
resulting in negative model fluxes and adus. Test that if rectifySEDs in
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: "in on" should be "is on"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

…Utils into feature/rectifySNOBjectSED

Fixed git clonflicts
	examples/testSN.py
	python/lsst/sims/catUtils/supernovae/snObject.py
@rbiswas4
Copy link
Contributor Author

OK ready for another look

@danielsf
Copy link
Contributor

commit 0498d91 seems to have undone the changes in commit e639879

Why did you merge the branch into itself?

rbiswas4 added a commit that referenced this pull request May 23, 2016
Feature/sn object sed regions : 

minor BugFix, Speedups and additional feature of SED rectification in sims_catUtils.supernovae.snobject.SNObject + new tests to check feature of SED rectification.

BugFix : A bitwise and changed to and.
Speedup: When the time of observation is outside the temporal range of the model, and uses the modelOutSideTemporalRange 'zero' where the SEDs are 0, speed catsimBandflux calculations by returning 0 rather than assigning zeros to the SED, and doing a bandflux calculation.

SED rectification: At regions where the SALT model is poorly sampled in the training set, the SED can go negative. This forces such negative values to 0, which is important for tools like phosim that will sample the SED to generate photons. Tests are added. Jenkins testbuild https://ci.lsst.codes/job/stack-os-matrix/11442/ passes.

Note: This is a duplicate of a previous mangled pull request #49. That PR has a few more commits and I will delete the branch later.
@rbiswas4 rbiswas4 closed this in f40c17e Sep 26, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants