-
Notifications
You must be signed in to change notification settings - Fork 24
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
Flux-calibration and resolution matrices #2419
Comments
With the #2422 merged, I intend to proceed to make a patch for this issue, as I think this is the right approach. If we have and extracted spectrum S and some kind of true model spectrum M and resolution matrix R, then If we now want to use the calibrated spectrum Now the question is, what if when we calibrate some of the Imagine we can come up with with the calibration vector where all zeros in If we agree on what's above therefore Therefore it means, when we apply the Any thoughts ? If it makes sense, I'll write a patch for apply_fluxcalibration. |
Hi,
It is my understanding that while at extraction time it is true that the extracted spectrum S probably can be written as
$S = R * M$ where M is the "unconvolved" spectrum, and R is the resolution matrix. The unconvolved spectrum however is the uncalibrated spectrum.
Therefore, strictly speaking, after dividing your uncalibrated spectra by the flux calibration vector, the resolution matrix must be updated to still apply.
To first order I think if your the calibration vector is C you need a new resolution matrix which is
$C_d^{-1} R C_d$ $C_d$ is the diagonal matrix from the calibration vector.
where
Obviously if calibration vector doesn't change with wavelength ( or is very smooth) , it's a non-issue, but if does have sharp changes (which it does for DESI), then the effect will be noticeable.
From my quick look at the code, I don't think this correction is applied in desispec (please correct me if I am wrong).
A quick test on a single z-band exposure shows that ~ 1% of pixels the resolution matrix values change by more than 0.05 (i.e 10% of the peak value).
From what I can see the change is kind'a trivial -- just update this :
desispec/py/desispec/fluxcalibration.py
Line 1437 in 255647f
by changing the resolution matrix after calibration.
Thoughts ?
Thanks,
S
PS I haven't tested this obviously, but if that is a correct thing to do I'd expect this to lead to improvement in chi-squares.
The text was updated successfully, but these errors were encountered: