If you prefer to reduce your data manually, regridding your data is the best place to start. (See Appendix D for an explanation of what regridding is.)
To convert your raw time-series cubes with spectral channel number, receptor index, time-slices axes into a spatial cube with RA, Dec (or Galactic longitude, Galactic latitude) and spectral axes use the Smurf application makecube. In this chapter we will show an example of processing data using makecube, discuss what to look out for and introduce the various parameters with which to tailor your reduction.
The Smurf application used for regridding your raw data is makecube.
autogrid option allows the software to determine the optimal projection parameters for regridding. This is
usually fine for stares and jiggles but is not so good for raster maps. See Section 7.2.5 for more
The screen report generated by makecube includes the input files, instrument, source, UT date and observation number, and observing mode. The pixel size can be checked in the projection parameters section, while the bounding box of the resulting cube (RA, Dec and velocity) is reported in the output section.
You can visualise your map by opening it with Gaia—see Figure 7.1.
You can supply makecube a group in a text file containing a list of all the raw files you want reduced. These filenames should include the full path if they are not in the local directory.
When you pass such group files to makecube (and any Starlink command) you should prefix the filename with an up-caret ( ̂).
Alternatively you can use wild cards. The example below reads in all the raw files for observation 10.
To save disk space and processing time you can specify the region of the
spectra to be processed with
SPECBOUNDS. If you know your line lies close to
0 km s, you may chose to process
only the central 100 km s as
in the example below.
When combining several maps with masked bad receptors one can use the
BADMASK parameter of makecube.
This option determines the way in which bad pixels are propagated from input to output. The one
that produces the best map is
badmask=and, which uses all the data so an output pixel will be bad
only if all the input pixels that contribute to it are bad. This generates an output map with the
lowest noise and fewest bad pixels. However, for large datasets the memory requirements may be
Other options are
badmask=or (default) and
Or means that an output pixel will be bad if any of
the input pixels that contribute to it are bad and is the default. The flag
first means that the decisions on
which pixels will be flagged as bad will be made with the first input spectrum while the rest are
To make a cube with only certain receptors you can use the
detectors option on the command line. This allows
you to either include or exclude specific receptors without the need for masking. The example below makes a
HARP map using all HARP receptors except H04 and H11.
This alternative example makes a map using only receptor H10. Maps made with single receptors may be used to evaluate the receptor-to-receptor flat-field.
When reduced by makecube—either by hand or through the pipeline—it is possible to find out
which good receptors contributed to the reduced cube by inspecting that file’s FITS header. This
can be done using fitslist or fitsval to examine the
RECPUSED parameter. Here are examples for
and HARP respectively.
You can use the
REF option to specify a reference NDF that defines an output grid. This NDF can have only two
spatial dimensions, even though your data may be in three dimensions.
If you do not supply a reference file makecube will revert to the
autogrid=true, the output grid is determined automatically so that as many data samples as possible fall
close to the centre of pixels in the output cube.
REFLAT are set to the first pointing BASE position,
CROTA2 is set to the
value in the FITS header (converted to the requested sky co-ordinate system), PIXSIZE is set to 6 arcseconds,
REFPIX2 are both set to zero. See SUN/258 for a full description of each of these
There are several regridding options available to you through the makecube command. These are specified
SPREAD parameter on the command line. For instance,
The default method is
Nearest, which assigns the input pixel completely to the nearest output pixel. This is the
fastest method available but is not optimal. In particular it may result in blank pixels in HARP maps due to
missing receptors (see Figure 7.2).
We recommend you select one of the other methods available which spread the emission to neighbouring
pixels. These include
SincSinc which are the most common, although the latter sometimes gives
noisy edges with negative values in some pixels.
SincCos will give neater edges. For each of these you will need
to provide the size of the convolution function through the
params option as in the example above. See
SUN/258 for more details.
GENVAR can be used to generate a variance array for your cube. This is important if you are adding
multiple maps with different variances as it allows them to be accurately weighted. There are three options for
Spread The output variance values are based on the spread of input data values contributing to each output
pixel. Note that this option is not available if parameter
SPARSE is set
true. If the
BADMASK value is
first, then a single variance value will be produced for each output spectrum. However, when
and, an independent variance value is calculated for each channel in each output spectrum.
Tsys The output variance values are based on the system noise temperature values supplied in the input NDFs. Since each input spectrum is characterised by a single Tsys value, each output spectrum will have a constant variance value (i.e. all channels in an output spectrum will have the same variance value). [Default].
None No output variance values are created.
If one has observed a number of offset positions which are not on a regular grid or are widely spaced, it is of
little use to make a normal cube with makecube, which then would have a large size and which would be
mostly empty. Then one can use the makecube parameter
sparse=true a one-dimensional array
is created which stacks spectra in the order in which they were observed (from left to right when viewed with
This is generates a one-dimensional array where spectra are displayed by Gaia in the order where they were observed (from left to right).
You can use the option
OUTCAT to generate a catalogue of the spatial positions of the receptors used to make
your final cube. The label associated with each row in the catalogue is the detector name. The detector positions
in the catalogue are ordered as follows: all the positions for the first input NDF come first, followed by those for
the second input NDF, etc. Within the group of positions associated with a single input NDF, the
positions for the first time slice come first, followed by the positions for the second time slice, and so
The catalogue produced will be in FITS format. In the example above a file called
cat.FIT is created. When
viewing your map with Gaia this catalogue can be overlaid to identify the receptors contributing to each pixel
(see Figure 7.3).
For large data sets, it may be beneficial to break the output array up into a number of smaller rectangular tiles.
This can be controlled by the
TILEDIMS parameter. The files can be stitched together later using the
Kappa application paste which may be used any time the tiles to be abutted have the same pixel co-ordinates.
Each tile may also have a rim of extra data to allow for future co-adding, the width of which is set by the