mmt_binospec: split setups by mask, require INCAN=on for flats#2142
Conversation
Fixes the two pypeit_setup issues reported in pypeit#2137: - Add `decker` (FITS MASK) to `configuration_keys()` so frames taken with different slit masks get separate setups and calibration groups instead of all sharing calibrations by grating alone. Also propagate `MASK` via `raw_header_cards()`. - Map the incandescent flat lamp as `lampstat03` (FITS INCAN) and require `INCAN=on` in the pixelflat/trace/illumflat branch of `check_frame_type()`, so dark/noisy `INCAN=off` exposures are no longer auto-typed as flats. Adds unit tests for setup grouping and INCAN-based frame typing, plus documentation and release-note updates. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
This PR closes #2137. |
kbwestfall
left a comment
There was a problem hiding this comment.
Looks good to me. We should run tests...
i'll run a local dev-suite on |
|
Charlie has contributed four test frames:
https://www.dropbox.com/scl/fo/0s19fvi3plzwngtou6k11/AGZ-vft3kA01hjLFmQU3zEE?rlkey=4mbvd90iqrqrbukkp4gbvvs0f&st=lpba3j97&dl=0
see:
#2137
…On Thu, Jun 4, 2026 at 9:40 PM T. E. Pickering ***@***.***> wrote:
*tepickering* left a comment (pypeit/PypeIt#2142)
<#2142 (comment)>
Looks good to me. We should run tests...
i'll run a local dev-suite on mmt_binospec overnight. this PR does
include unit tests of the changed functionality. to really exercise the
changes requires a pypeit_setup vet test with some appropriate test
data...
—
Reply to this email directly, view it on GitHub
<#2142?email_source=notifications&email_token=AAJJHGWH25RQHBGLBFQLT6L46JFLLA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTINRSHAZDKMBRGQYKM4TFMFZW63VKON2WE43DOJUWEZLEUVSXMZLOOSWGM33PORSXEX3DNRUWG2Y#issuecomment-4628250140>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJJHGXQVH4YIRKHLS4FFPT46JFLLAVCNFSM6AAAAACZWKTK2SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHM2DMMRYGI2TAMJUGA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
|
grabbed the provided files and ran mmt_binospec_A.pypeit.txt @charliekilpatrick, check these out and make sure they match your expectations. (i had to append a |
Thanks, this looks correct to me - there should be two setups with the "A" setup flat file ignored due to INCAN=off. I appreciate the PR for our future Binospec science! |
|
local dev suite for |
this brings up a point we should discuss at a tagup meeting: what is the threshold for adding new tests to the dev-suite versus doing unit tests? in this case, the code/logic changes are pretty minor and easily covered by the included unit tests. behavior against real instrument headers is covered by existing |
Fixes #2137.
Problem 1 — different slit masks in one setup
mmt_binospec.configuration_keys()only returned['dispname'], so all frames with the same grating were grouped into one setup regardless of slit mask, mixing slit traces, pixel flats, and wavelength solutions across mask geometries.Fix: add
decker(FITSMASK) toconfiguration_keys()so different masks get separate setups and calibration groups. Also propagateMASKviaraw_header_cards().Problem 2 — INCAN=off frames typed as flats
check_frame_type()forpixelflat/trace/illumflatonly requiredHENEAR=offandSCRN=deployed, so dark/noisyINCAN=offexposures were auto-typed as flats.Fix: map the incandescent lamp as
lampstat03(FITSINCAN) ininit_meta()and requireINCAN=onin the flat/trace branch ofcheck_frame_type().Tests
New
pypeit/tests/test_binospec_setup.pycovering:deckeris inconfiguration_keys()INCAN=on(screen deployed, arc off) → typed as pixelflat/trace/illumflatINCAN=off→ not typed as a flat/traceDocs
doc/spectrographs/mmt_binospec.rstdoc/releases/2.1.0dev.rst🤖 Generated with Claude Code