Fix bug in fiber aperture correction that affects cframe IVAR #2452
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The calibration vector
ccalibration
is normalized by the fiber aperture correction factorFLAT_TO_PSF_FLUX
(point_source_correction
in the code), but its inverse variance was not normalized accordingly. This PR fixes that.I tested the new code on a B camera for a dark tile. For most fibers with good fiber positioning (
FIBERSTATUS==0
), the effect should be negligible (less than 1% change in the average cframe IVAR). However, for very bright sources (standard stars and particularly bright galaxies), the new IVAR can be on average ~40% lower.The largest effect is on the stuck positioners used as sky fibers. They have particularly large
FLAT_TO_PSF_FLUX
due to their large DELTA_X/Y, and combined with this bug their IVARs are much underestimated. For example, below is the signal-to-noise (flux * np.sqrt(ivar)
) of a sky spectrum from such a stuck positioner (fiber 179 of exposure 235175; it is 140 micron "off target" and it hasFLAT_TO_PSF_FLUX
of ~28 compared to the typical value of ~0.7). As expected, the distribution becomes a standard Gaussian with the fix.