Skip to content

INDI camera: accept fpack-compressed .fits.fz frames - #1472

Merged
agalasso merged 1 commit into
OpenPHDGuiding:masterfrom
MichaelJEvan:indi-fits-fz
Oct 20, 2026
Merged

agalasso merged 1 commit into
OpenPHDGuiding:masterfrom
MichaelJEvan:indi-fits-fz

Conversation

@MichaelJEvan

Copy link
Copy Markdown
Contributor

With CCD_COMPRESSION enabled, INDI drivers (here INDI 2.2.2) send frames as .fits.fz: fpack'ed, an empty primary HDU followed by a tile-compressed image HDU. CameraINDI::Capture only accepted .fits, so PHD2 showed "Unknown image format: .fits.fz" and stopped capturing.

This accepts .fits.fz, moves to HDU 2 before reading, and allows the two HDUs. CFITSIO decompresses the image itself.

Tested on macOS 26.6.2, Apple M5 Max, built on top of #1453, indiserver 2.2.2 with Telescope Simulator + Guide Simulator:

  1. Compression on, before: "Unknown image format: .fits.fz", capture stops.
  2. Compression on, after: calibrate, 120 s guiding (107 steps, star never lost, RMS 0.17 / 0.14 px), dither + settle, pause/resume: OK. Frames confirmed .fits.fz (742 KB instead of 2.67 MB).
  3. Compression off, after: same checks, OK.
  4. Not tested on Linux or Windows; the change is not platform-specific.

Possibly related: #1393 (INDIGO server, empty format) fails at the same format check. This PR does not change that case.

INDI drivers with CCD_COMPRESSION on send .fits.fz (an empty primary
HDU followed by a tile-compressed image). PHD2 only accepted .fits and
stopped capturing with "Unknown image format: .fits.fz".

@agalasso agalasso left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the pr!

I'm going to merge this and make a followup pr with some minor refactoring -- I'll tag you on that so you can check it.

@agalasso
agalasso merged commit 84ef5e4 into OpenPHDGuiding:master Oct 20, 2026
1 check passed
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.

2 participants