In a PICARD recipe, I'm running Kappa fitsurface/makesurface/sub on
data from SMURF makemap and the resulting file has inconsistent
dimensions/WCS info.
Makemap produces a 3-d image (third axis is a single-pixel wavelength)
with a compound SKY-SPECTRUM frame; fitsurface/makesurface produces a
2-d image. When I subtract the two.... you can probably see where this
is going.
If I run ndftrace on the subtracted image I see something like this:
NDF structure /data0/agibb/reduced/misc/s2fluxnoi/test1/sub1:
Label: Flux Density
Units: pW
Shape:
No. of dimensions: 2
Dimension size(s): 31 x 31
Pixel bounds : -14:16, -14:16
Total pixels : 961
Data Component:
Type : _DOUBLE
Storage form: SIMPLE
Bad pixels may be present
World Co-ordinate Systems:
Number of co-ordinate Frames: 5
Current co-ordinate Frame (Frame 5):
Frame title : "3-d compound coordinate system"
Domain : SKY-SPECTRUM
First pixel centre : 4:31:41.106, 18:13:27.00, 0.00045
Axis 1:
Label : Right ascension
Units : hh:mm:ss.sss
Nominal Pixel scale: 2.00000 arc-sec
Axis 2:
Label : Declination
Units : ddd:mm:ss.ss
Nominal Pixel scale: 2.00000 arc-sec
Axis 3:
Label : Wavelength
Units : m
Nominal Pixel scale: 0 m
Ideally the image dimensions and WCS should be preserved. However, I
realize that in general it's not a good idea to fit a surface in one
plane of a cube and subtract it from all planes.
I run into problems in the SCUBA-2 pipeline because at some point I
test for the presence of a SKY domain. If the image has 3 dimensions
then I ndfcopy the first two to a temporary file to guarantee a SKY
fomain, and work with that. Clearly a file such as the above will
cause my dimension test to fail.
Cheers,
Andy
|