A chain of ccdslice has to be applied if the first (x) or second (y) axis needs to be reduced but the ordering of the cube coordinates to remain the same (see EXAMPLES below), see also ccdsub(1NEMO) for a better alternative.
ccdfits(1NEMO) can also remove redundant ("dummy") axes when writing out a fits(5NEMO) file.
Using the zslabs= keyword one or more sections based on the WCS along that axis can be selected, but for a regular selection (e.g. 30:50:2) it will do the right thing.
ccdslice cube.in cube.out z 2here is a cube which is re-oriented in YZX:
ccdslice cube.in cube.out xand here a somewhat cumbersome three-step process to select a subset of the X axis, but leaving the cube intact:
ccdslice cube.in - x 2:10:2 | ccdslice - - x | ccdslice - cube.out xand the same for selecting a subset of the Y axis, now in two steps:
ccdslice cube.in - y 2:10:2 | ccdslice - cube.out y
Here an example to select some ranges in Z, where the input FITS file
is in m/s, but the selection is done in km/s. After this a noise map is
computed for the selected planes:
fitsccd cube.fits - | ccdslice - - zslabs=100,200,500,600 zscale=1000 | ccdmom - cube.mom2 mom=-2Here is an example of smoothing a cube with a boxcar of 6 channels, and decimating the cube by 6:
fitsccd cube.fits - | ccdsmooth - - dir=z smooth=1/6::6 | ccdslice - cube6s.ccd zrange=-6
The coordinate system description of the new zvar axis can easily be corrupted by choosing an irregular layout with xrange=.
6-May-95 V1.0 Created PJT 27-feb-2021 V1.2 add zslabs= and zscale= PJT 11-may-2023 V1.3 better WCS handling PJT 26-aug-2024 V1.4 allow decimation with negative zrange PJT