[DAMD-135] RFC: Allow empty (NAXIS=0) REF HDUs for PFSB ramps Created: 19/Aug/22  Updated: 02/Oct/22

Status: Open
Project: Data Model
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Normal
Reporter: cloomis Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

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 ?


Generated at Sat Feb 10 15:34:37 JST 2024 using Jira 8.3.4#803005-sha1:1f96e09b3c60279a408a2ae47be3c745f571388b.