Skip to content

Commit

Permalink
Salt2 ColorLaw function correction (#389)
Browse files Browse the repository at this point in the history
* Salt2 ColorLaw function correction
* Update test_salt2utils.py
  • Loading branch information
ConstanceGanot committed Feb 21, 2024
1 parent 865f0c9 commit a0ca243
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion sncosmo/salt2utils.pyx
Expand Up @@ -482,6 +482,6 @@ cdef class SALT2ColorLaw(object):
# reconstruct input wavelengths
wave_lo = self.l_lo * SALT2CL_V_MINUS_B + SALT2CL_B
wave_hi = self.l_hi * SALT2CL_V_MINUS_B + SALT2CL_B
coeffs = [self.coeffs[i+1] for i in range(self.ncoeffs)]
coeffs = [self.coeffs[i+1] for i in range(self.ncoeffs - 1)]

return (wave_lo, wave_hi), coeffs
2 changes: 1 addition & 1 deletion sncosmo/tests/test_salt2utils.py
Expand Up @@ -109,7 +109,7 @@ def colorlaw_python(wave):

def test_salt2colorlaw_pickle():

colorlaw_coeffs = [-0.504294, 0.787691, -0.461715, 0.0815619]
colorlaw_coeffs = [-0.504294, 0.787691, -0.461715, 0.0815619, 0.0, 0.0]
colorlaw_range = (2800., 7000.)
colorlaw = SALT2ColorLaw(colorlaw_range, colorlaw_coeffs)

Expand Down

0 comments on commit a0ca243

Please sign in to comment.