Closed abhi0395 closed 2 months ago
Thanks. For the record, this PR also updates the wavelength -> [-1,1] mapping to be per-camera instead of using the full wavelength basis across all cameras. I think that is what we want so that the legendre polynomials are orthogonal per camera.
I also added unit tests on reduced_wavelength
which caught a wavemax
vs. wavemin
bug which I corrected.
Thank you so much. Luckily, I hadn't run anything big yet.
Thanks @sbailey for pointing me to the issue of inconsistent legendre wavelength basis definition in code. The issue is detailed in issue#291 have now defined a separate utility function
reduced_wavelength()
inutils.py
, which is called whenever we want to define legendre wavelength basis. It makes the code cleaner and consistent in archetype mode. This consistent definition should also be included in PR#293 and PR#283.It also fixes a minor case, when an end user does not want to add a prior in the archetype mode. I have implemented a minor logic, that if
--archetype-legendre-prior
flag is <=0, then no prior will be added in archetype mode.