Skip to content

Record installed pyobs package versions in FITS headers #739

Description

@thusser

Problem

There is no way to reconstruct which versions of pyobs packages were running when a given frame was taken. This matters for understanding data processing, WCS solutions, and troubleshooting issues retrospectively.

Complication

Different modules (telescope, camera, dome, filterwheel, etc.) can each depend on different pyobs packages at different versions. A single monolithic version string wont capture this. Possible approaches need discussion:

  • One keyword per package (e.g., PYBROT, PYOBSSCMOS, etc.) — straightforward but could balloon the header.
  • A single keyword with a serialised list (e.g., PYOBS-VERSIONS: pyBROT=2 pyobs-scmos=1.4.0) — compact but harder to query.
  • Only record versions of modules that actually contributed headers to that frame — most practical, but requires tracking.
  • Record the full pip freeze or environment hash at night level, not per-frame — cheaper but less granular.

Where it would fit

FitsHeaderMixin.add_fits_headers() or the individual module IFitsHeaderBefore/IFitsHeaderAfter implementations. Each module could contribute its own package name + version if that approach is chosen.

Open questions

  • Per-module or global snapshot?
  • One keyword per package or packed into one?
  • Per-frame or per-night (cached)?
  • Which packages qualify — only the module driver, or all pyobs packages in the environment?
  • FITS keyword name?

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions