Skip to content

nightly darks: add ability to force a break even if timing, config, detector don't change #2607

@sbailey

Description

@sbailey

Currently nightly darks use dark exposures within a time window as long as they have the same timing file (CCDTMING), CCD config (CCDCFG), and detector (DETECTOR), even if those span multiple configurations in the desi_spectro_calib yaml files. e.g. if the PSF file changes, we can still use darks spanning two different configs.

However, sometimes we need to force a boundary in what darks can be used, e.g. from desihub/desisurveyops#422, z0 was saturated while taking pixflats on 2026-01-28, leading to much higher dark current for the next several days. When we run Matterhorn, we need to make sure that nightly darks from the days leading up to that don't use darks from 2026-01-28 and beyond even though CCDTMING, CCDCFG, and DETECTOR didn't change.

Option 1

Add a new config parameter like "NEWDARKS", which if present and True/1, would cause desi_compute_dark to treat that as a boundary for selecting darks, even if CCDTMING, CCDCFG, and DETECTOR are all the same.

This would require additional bookkeeping in scripts/compute_dark.py and/or ccdcalib.py to also track configurations and whether there is an enforced boundary.

Option 2

A file in exposure_tables/YEARMM/ could serve as an override list of which exposures to use for the dark night, and if that file isn't present then it is algorithmically calculated.

Option 3

Something else. Ideas welcome.

I'm currently leaning towards Option 2 as providing more flexibility with less coding hassle.

@jbanovetz @julienguy @akremin

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions