Coverage for python/lsst/sims/photUtils/SedUtils.py : 91%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
""" Calculate the flux normalization of an SED in the imsim bandpass.
Parameters: ----------- sed is the SED to be normalized
magmatch is the desired magnitude in the imsim bandpass
Output ------ The factor by which the flux of sed needs to be multiplied to achieve the desired magnitude. """
# This method works based on the assumption that the imsim bandpass # is a delta function. If that ever ceases to be true, the unit test # testSedUtils.py, which checks that the results of this method are # identical to calling Sed.calcFluxNorm and passing in the imsim bandpass, # will fail and we will know to modify this method.
getImsimFluxNorm.imsim_wavelen > sed.wavelen.max()):
raise RuntimeError("Cannot normalize sed " "at wavelength of %e nm\n" % getImsimFluxNorm.imsim_wavelen + "The SED does not cover that wavelength\n" + "(Covers %e < lambda %e)" % (sed.wavelen.min(), sed.wavelen.max()))
|