-
Type:
Task
-
Status: Open (View Workflow)
-
Priority:
Normal
-
Resolution: Unresolved
-
Labels:None
We currently always save full 4k images for the "REF" IRP HDUs in the PFSB files; when we do not acquire an IRP plane we write a full image of 0-valued pixels. The intent was to make all ramp files look the same regardless of whether IRP was used during acquisition.
But it turns out that we might not use IRP, and that PFSB simplification comes with some overhead. Yes, RICE compression shrinks all-0 images to ~300k HDUs, but they still need to be read in, etc. [and it turns out that the standard IDL FITS I/O routines find this all very expensive]
Besides, given how we process ramps there might be value in memory-mapping uncompressed PFSB files instead of RICE-compressing. In which case expanding empty REF HDUs to a full 32MB on disk would be significant.
So I propose writing "empty" HDUs for IRP=0 REF frames, specifically by setting NAXIS=0. Both astropy and (c)fitsio (what the DAQ uses) are happy reading and writing these, accepting and returning None to the various routines. A minor difference is that astropy sets BITPIX=8 and (c)fitsio sets BITPIX=16, but I don't think that is in any way significant.
Robert and I have talked about the (fairly minor) DRP changes which would be required. This is FITS-compliant, but I'd like to check with NAOJ. Hisanori Furusawa ?