Feature/aperture photometry#125
Closed
capetillo wants to merge 7 commits into
Closed
Conversation
…prove target measurement in extended fields. Improve target measurement for sources blended into extended light (e.g. supernovae on a host galaxy): - Accept a centroid only within 6px of the WCS-predicted position; otherwise (or on centroid failure) measure at the source's provided coordinates, so the centroid won't be pulled onto a brighter neighbour or galaxy structure. Records a per-frame diagnostic. - Skip frames whose catalog lacks RA/Dec/mag instead of aborting. - Establish comparison stars at >=80% frame coverage rather than 100%. Extract a Django-free AstroImageJ equivalent centroid and sigma-clipped annulus background into analysis/centroiding_core.py; centroiding.py maintains the Django view. The aperture photometry pipeline and the interactive centroiding endpoint then share one common implementation (verified faithful to AstroImageJ's Centroid). Collapse three duplicate background estimators into one, using AIJ's convergence (100/1e-4) for photometry and its centroid convergence (9/0.1) for centroiding. Remove dead code (comparison_strategy, FrameResult, unused helpers and fields) and redundant calibration intermediates. Add characterization and synthetic regression tests.
…option Comparison-star selection ranked candidates by |catalog_mag - target_proxy|, comparing a calibrated catalog magnitude against an instrumental target proxy on a different zero point. That zero-point offset collapsed the ranking to pick Rank comparison stars by measured brightness and add arcsec aperture option Comparison-star selection ranked candidates by |catalog_mag - target_proxy|, comparing a calibrated catalog magnitude against an instrumental target proxy on a different zero point. That zero-point offset collapsed the ranking to "pick the brightest catalog star" instead of stars matching the target's brightness. Rank instead on each candidate's own measured magnitude (median over frames), which shares the target proxy's zero point. The catalog magnitude is still used, correctly, only for the ensemble zero-point calibration. Because that allows a blended/mismatched candidate with a corrupt catalog magnitude to bias the catalog magnitude weighted zero point, add a guard that drops candidates whose (catalog_mag - measured_instrumental_mag) departs from the ensemble median by more than MAX_ZERO_POINT_RESIDUAL_MAG. Add an aperture_unit="px"|"arcsec" option to generate_light_curve. With "arcsec" the aperture is an angular size converted to pixels per frame from its plate scale (WCS, PIXSCALE fallback), so a fixed aperture covers the same sky across telescopes of differing pixel scale. Reword the target recenter fallback diagnostics from "recenter rejected" to "recenter skipped ... Frame retained" so they are not misread as frame drops: the frame is always measured at the WCS position and kept.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
FEATURE: Aperture Photometry Operation
Background:
Rachel requested aperture photometry as an operation. In adding this operation, centroiding was refactored.
Implementation:
NOTE

I see that for
elp1m008-fa16-20250705-0217-e91we are gettingnanundercatalog fluxandcatalog magfor a comp star @sfoale any thoughts?