Repository navigation
Radiometric calibration checks: image-combine seams and surface saturation - #4
Merged
Merged
Conversation
…uration Per-frame image-combine check (effective-weight recovery + residual seam offset, on by default) and a season-level saturation second pass (split by surface source image, piecewise plateau fit, measured cross-cap bias). New per-trace store variables img_comb_offset_dB, img_comb_pair, surface_source_image_index, surface_ceiling_margin_dB plus per-frame status attrs; appends auto-migrate older stores. Handles param layouts from the 2012 era onward; per-image noise floors guard against mid-ice record tails. Verified: reprocessing reproduces all existing store values on 5 frames across both production stores. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YPMWF1uxKRL2pmtgdyJuM8
Equal-width bins under min_traces_per_bin are greedily merged with their neighbors instead of discarded, so thin ceiling-following tails extend the fitted span (recovers 2012_Antarctica_DC8 and 2014_Greenland_P3 img1 ceilings) without concentrating bins in dense altitude bands, which diluted Theil-Sen slopes and admitted false flats under pure equal-count binning. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YPMWF1uxKRL2pmtgdyJuM8
The piecewise plateau+decline model decided zero fits on real data across all stores — every ceiling came from the flat-envelope rule — and its constraints complicated the two-regime hardening. Removed along with its parameters and output fields; fits on all three stores are unchanged. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YPMWF1uxKRL2pmtgdyJuM8
Documents the calibration fields landing in the ase/greenland/antarctica stores: variable semantics, statuses, saturation metadata, suggested QC filters, and rollout status. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YPMWF1uxKRL2pmtgdyJuM8
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YPMWF1uxKRL2pmtgdyJuM8
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YPMWF1uxKRL2pmtgdyJuM8
It belongs to the separate Joe-comparison workstream and imports scripts/analysis/greenland_joe_comparison.py, which is not committed — breaking CI collection for both test jobs. Restored to untracked. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YPMWF1uxKRL2pmtgdyJuM8
…ipts/ Drops one-shot exploration/prototype scripts whose findings are recorded in the claude_notes .md write-ups and whose methods now live in calibration.py. The reusable store-verification tools (reprocessing regression check, science snapshot/verify) move to scripts/. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YPMWF1uxKRL2pmtgdyJuM8
…nd (0.4.1) Seven review fixes: backfill invalidates saturation when source indices change (docs order swapped to backfill-first); update_frame_calibration is all-or-nothing; pair coverage spans expected images so a trailing missing image yields partial_images, never ok; weight recovery is NaN-robust; the flat rule is a two-sided band (a rising envelope is not a ceiling — rescinds 2018_Antarctica_DC8 img2); saturation pass fits and writes in one session; calibration arrays carry descriptive attrs and docs/changelog corrections. Method 0.4.1. Local re-run diff: claude_notes/review_fixes_diff.md. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YPMWF1uxKRL2pmtgdyJuM8
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YPMWF1uxKRL2pmtgdyJuM8
Now also in .git/info/exclude locally so it cannot ride along a third time. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YPMWF1uxKRL2pmtgdyJuM8
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.
Human-written context: I found a couple of types of calibration issues from other work. This PR adds metrics that allow downstream data users to filter out these types of calibration issues. It does not remove any data from the dataset -- decisions about how to filter are left to downstream users.
The two calibration issues targeted are:
Flagging the image combine issues requires that this pipeline downloads all of the individual images as well as the combined version. This increases the data downloads by almost 4x (most frames have 3 images plus the combined), but everything still seems to run fine and the total dataset build for both ice sheets still takes less than 2 days on a single machine.
Claude description:
Adds two radiometric calibration checks to the pipeline and exposes their results as per-trace/per-frame values for downstream filtering (values and statuses, not verdicts).
What's included
w_i = median(combined − img_i)over its sourced section — works regardless ofimg_comb_weights_mode, including auto seasons with >100 dB scalings), then measures the residual seam step in the overlap of weight-corrected images. New per-traceimg_comb_offset_dB/img_comb_pair, per-frame status/mean attrs, full status vocabulary; failures degrade to statuses and never skip a frame.surface_source_image_index(provenance flag) andsurface_ceiling_margin_dB(NaN where no credible ceiling), season dict with levels/CI/pileup/support and measured img2 bias (cross_cap_step_db).docs/dataset_changelog.mdwith suggested QC filters.param_combine_wf_chan, old 2-element img_comb, wfs-as-list-of-dicts) and a mid-ice-record-tail noise-floor guard.Validation
Key findings shipped in the data: systematic seam errors in 2016_Greenland_P3 (+7.4 dB), 2017/2013_Antarctica_Basler; saturation ceilings for 2012_Antarctica_DC8 (−30 dB), 2014_Greenland_P3 (−31.6 dB, 16.2 dB img2 bias step), 2013_Greenland_P3 (−50.6 dB).
🤖 Generated with Claude Code
https://claude.ai/code/session_01YPMWF1uxKRL2pmtgdyJuM8