Skip to content
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

Fix fiber aperture correction: normalization and sky fibers #2454

Merged
merged 1 commit into from
Mar 14, 2025

Conversation

rongpu
Copy link
Contributor

@rongpu rongpu commented Mar 13, 2025

This PR include two changes to fluxcalib:

  1. Excluding sky fibers from the point_source_correction normalization calculation; sky fibers are now always assigned point_source_correction=1;
  2. Changing the normalization calculation from mean to median so that it is robust against outliers.

Before this fix, fibers with very large fiber positioning offsets (mostly used as sky fibers) biases the normalization calculation, causing the FLAT_TO_PSF_FLUX value (point_source_correction in the code) to be significantly lower than 1 for the "good" fibers (see below the per-petal median FLAT_TO_PSF_FLUX value for 100 random tiles). Fortunately, downstream code cancels out this "correction" and the final flux calibration is unbiased for the good fibers. In addition to bringing the FLAT_TO_PSF_FLUX value back to a small correction around 1 as originally intended, with this PR we also fix the flux calibration of sky fibers which effectively had arbitrary normalization due to this "aperture correction".

image

I have tested the new code on one blue camera of a dark-time tile, and the changes to fluxcalib is very small (<1%) for all fibers except for sky fibers which now have the reasonable fluxcalib.

@rongpu rongpu requested a review from julienguy March 13, 2025 17:35
@coveralls
Copy link

Coverage Status

coverage: 38.955% (+0.006%) from 38.949%
when pulling a4c3bac on rongpu-fluxcalib
into 0d7d1f2 on main.

Copy link
Contributor

@julienguy julienguy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@julienguy julienguy merged commit cd0bfad into main Mar 14, 2025
26 checks passed
@julienguy julienguy deleted the rongpu-fluxcalib branch March 14, 2025 21:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants