Skip to content

Fix calibration fallback warning and surface EPWtcc/IAWtcc for unknow… - #129

Open
almilder wants to merge 1 commit into
pr-1-postprocessorfrom
pr-2-calibration
Open

Fix calibration fallback warning and surface EPWtcc/IAWtcc for unknow…#129
almilder wants to merge 1 commit into
pr-1-postprocessorfrom
pr-2-calibration

Conversation

@almilder

Copy link
Copy Markdown
Collaborator

Summary

  • The unknown-shot-number fallback in get_calibrations had a raise Warning(...) inside a try/except KeyError, which doesn't actually catch Warning (it isn't a KeyError), so it crashed instead of warning. Switched to warnings.warn(...).
  • Surfaces EPWtcc/IAWtcc from detector_specs for the imaging-calibration fallback path (previously only the non-imaging path set fallback values).
  • Docs updated to describe the detector_specs fallback fields.
  • Replaces sa_lookup's nine near-identical elif beam == branches with a data-driven dict lookup (verified exact match on all beams and the error path).

Test plan

…n shots

The unknown-shot-number fallback in get_calibrations had a raise Warning(...)
inside a try/except KeyError, which doesn't actually catch Warning (it isn't a
KeyError), so it crashed instead of warning. Switched to warnings.warn(...), and
surfaced EPWtcc/IAWtcc from detector_specs for the imaging-calibration fallback
path (previously only the non-imaging path set fallback values). Docs updated to
describe the detector_specs fallback fields.

Also replaces sa_lookup's nine near-identical elif beam == branches with a
data-driven dict lookup (verified exact match on all beams and the error path).
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