NCAR / ucomp-pipeline

Data processing pipeline for UCoMP
Other
6 stars 3 forks source link

New quality check for matching extensions #215

Open mgalloy opened 1 year ago

mgalloy commented 1 year ago

There should be a quality check to make sure there are matching RCAM/TCAM extensions for each wavelength present in the file.

For example, 20220403.183405.99.ucomp.637.l0.fts has 3 wavelengths in RCAM, but only 1 wavelength in TCAM:

20220403$ fitscat 20220403.183405.99.ucomp.637.l0.fts
Filename: 20220403.183405.99.ucomp.637.l0.fts
No.    Name      Ver    Type      Cards   Dimensions   Format
  0  PRIMARY       1 PrimaryHDU      74   ()
  1  sci-637.350-both-rcam    1 ImageHDU        48   (1280, 1024, 4, 2)   int16 (rescales to uint16)
  2  sci-637.400-both-rcam    1 ImageHDU        48   (1280, 1024, 4, 2)   int16 (rescales to uint16)
  3  sci-637.450-both-rcam    1 ImageHDU        48   (1280, 1024, 4, 2)   int16 (rescales to uint16)
  4  sci-637.350-both-tcam    1 ImageHDU        48   (1280, 1024, 4, 2)   int16 (rescales to uint16)

This would give a better error message, as well as failing faster than when the pipeline tries to do something it can't later on.