Commit 96065e14 authored by vertighel's avatar vertighel
Browse files

Viewer/guider read live device state instead of re-reading FITS



Viewer (fits_image.py, stream.py) and guider (guider.py) now read a
camera's current frame straight from device.matrix instead of
re-opening the FITS file download() just wrote. Disk writes are
unchanged (still needed for /fits download and archival), but the
live-display and autoguiding paths no longer round-trip through disk.

- devices.viewer_devices: cam_id -> live device instance registry
- mako.py: bake the FITS-orientation flip into matrix itself
- all 5 devices: capture _last_binning at exposure time (mirrors
  _last_datetime), so the guider never queries the camera live
- stx.py: matrix was an HTTP GET to the camera on every access; added
  a _fetch() that caches (data, header) per frame under a lock, shared
  by matrix and download(), so N pollers cost one HTTP round-trip
- loop acquisition (_run_loop) now writes only the last completed
  frame to disk per loop, not one write per iteration
- /tile (REST + WS) now ships uint16 instead of float32 - native ADC
  bit depth for every camera behind it, half the bytes, no precision
  loss; client expands to Float32Array right before GPU upload

Not yet tested against real hardware.

Co-Authored-By: default avatarClaude Sonnet 5 <noreply@anthropic.com>
parent 53e0364c
Loading
Loading
Loading
Loading