Skip to content

Flag forced-photometry sources on poorly-weighted map regions - #184

Open
axf295 wants to merge 6 commits into
mainfrom
badmap-rejection
Open

axf295 wants to merge 6 commits into
mainfrom
badmap-rejection

Conversation

@axf295

@axf295 axf295 commented Sep 25, 2026

Copy link
Copy Markdown
Collaborator

Reworks the kappa-based bad-map rejection from Harlin Toor in PR #178 onto current main.

ProcessableMap.finalize() now keeps a reference to kappa as weights (not a copy) when one was loaded. When TwoDGaussianFitter / the lmfit config is given poor_weights: PoorWeightsCriteria, gaussian_fit computes per-map weight percentiles and adds one of poor_weights_center, poor_weights_local, poor_weights_extended to the source's existing flags list. The fit is still attempted; nothing else changes when poor_weights is None (the default).

Differences from #178: box sizes are angular (default 2.5'/10' half-widths, ~the original 10x10/40x40 pix at 0.5'), boxes are centered and clipped at map edges, NaN weights count as low, and the hard-coded BAD_TIMES list is dropped.

axf295 and others added 6 commits September 25, 2026 15:30
Reworks the kappa-based bad-map rejection from #178 onto current main.

ProcessableMap.finalize() now keeps a reference to kappa as `weights`
(not a copy) when one was loaded. When TwoDGaussianFitter / the lmfit
config is given `poor_weights: PoorWeightsCriteria`, gaussian_fit computes
per-map weight percentiles and adds one of `poor_weights_center`,
`poor_weights_local`, `poor_weights_extended` to the source's existing
`flags` list. The fit is still attempted; nothing else changes when
`poor_weights` is None (the default).

Differences from #178: box sizes are angular (default 2.5'/10' half-widths,
~the original 10x10/40x40 pix at 0.5'), boxes are centered and clipped at
map edges, NaN weights count as low, and the hard-coded BAD_TIMES list
is dropped.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sqlmodel 0.0.45 started rejecting naive datetimes ("Datetime values must
have timezone information"), which breaks test_stacker and any
sotrplib -> mapcat write that uses Time.to_datetime() (e.g.
maps/database.py processing_start/processing_end). Pin until those
pass tz-aware UTC datetimes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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.

1 participant