Frequency or velocity smoothing is performed using Kappa:block. It uses a rectangular box filter with each output pixel either the mean or the median of the input pixels within the filter box. The box size can be set to 1 for dimensions which do not require smoothing. In the example below the spatial pixels remain untouched while the velocity axis is smoothed using a box of five channels.
Two-dimensional NDFs can also be smoothed using gausmooth. This smooths using a symmetrical Gaussian point spread function (PSF) of specified width(s) and orientation. Each output pixel is the PSF-weighted mean of the input pixels within the filter box.
Note that the
fwhm option is given in the number of pixels. For example, to smooth a map with 4′′pixels by a
12′′Gaussian you would set
Baselines can be removed using Kappa:mfittrend. This routine can fit polynomials up to order 15, or cubic
splines, to each spectrum in your cube. You can specify the ranges to fit via the
ranges parameter, or
you can allow them to be determined automatically (
auto), say if the number of observations is
If using automatic range determination you should set the
numbin option. This is the number of bins in which to
compress the trend line. A single line or average may be noisy so binning is used to improve the signal-to-noise
in order to enhance features that should be masked.
Ideally the bin size should match your line width to get maximum single to noise between the emission and the background. Be aware that bins that are too big can dilute weaker features. Likewise, bins that are too small will get noisy at the edges of broad lines. We recommend you experiment with the bin size to find the best fit for your data.
To exclude features that are not part of the baseline trend you can use the
clip option. Use
to provide an array of standard deviations for progressive clipping of outliers within each bin.
Once the data have been binned a trend is fit within each bin and the outliers clipped, the
trend is then re-fitted and the outliers again clipped etc. By default this will clip at 2, 2, 2.5 and
successively but you may wish to experiment with your own clip levels. The
clip option is only used when
For convenience Gaia has a Baseline tab in its cube control panel—see Section 10.1 for an example. This invokes mfittrend.
These steps give a more in depth way of determining the baselines and mimic the pipeline.
The Cupid routine findback offers an alternative for background subtraction however there are more limitations. It applies spatial filtering to remove structure with a size scale less than a specified box size. Within each box the values are replaced by the minimum of the input values. The data are then filtered again and this time replaced with the maximum in each box.
Using findback results in a baseline trend that hugs the lower limit of the noise and can contain sharp edges. These problems can be mitigated but extra steps are required. See SUN/255 for more details.
An integrated intensity map can be created by collapsing your cube along the frequency/velocity axis using Kappa:collapse. For each output pixel, all input pixels between the specified bounds are collapsed and combined using one of a selection of estimators. Amongst others, the estimators include the mean, integrated value, maximum value, the mean weighted by the variance, RMS value and total value. See SUN/95 for a full list.
The example below includes the options
high which can be specified to
limit the range over which the cube is collapsed on the given axis (in this case from
km s to
variance flag indicates the variance array should be used to define weights and generate an output
variance. The option
wlim sets the fraction of pixels that must be ‘good’ in the collapse range for a valid output
pixel to be generated. You may find you need to reduce the value for
wlim below its default of 0.3 for some
If you do not know the axis name you can give the number instead (1=RA, 2=Dec, 3=vrad).
For convenience Gaia has a Collapse tab in its cube control panel—see Section 10.6 for an example. This invokes collapse.
These steps mimic the pipeline and show the procedure for generating an integrated map collapsed only over regions with emission greater than 3 .
You can use collapse to generate the moments maps by selecting the appropriate
Integ) for the integrated map (zeroth moment), Intensity-weighted co-ordinate (
Iwc) to get the velocity
field (first moment), or Intensity-weighted dispersion (
Iwd) to get the velocity dispersion (second
Your cube will come out of makecube and the pipeline, in units of . To convert this to main-beam brightness temperature, divide your cube by the main-beam efficiency, . Alternatively, to convert to receiver temperature, , divide by the forward scattering and spillover efficiency, . See Section 3.2 for efficiency values for RxA and HARP, and the JCMT webpages for further information and historical numbers.
You can use the Kappa command cdiv to divide any NDF by a constant.
You may want to regrid your data onto larger pixels, for instance to allow direct comparison with data from other observatories. In the example below a JCMT map is regridded and aligned to match a Herschel map. See Appendix B for instructions on converting your FITS file to NDF format.
Alternatively, to resample your data onto smaller pixels you should use the Kappa command sqorst. In the example below ’map’ has a pixel size of 8′′, while ‘resamplemap’ has a pixel size of 4′′– the number of pixels has been doubled by applying a factor of 2 to the spatial axes. A factor of 1 was applied to the frequency (third) axis leaving it unchanged.
mode=factors is the default setting so it was not specified in the example above. The example below however,
mode=pixelscale to define a pixel size for the third axis; here the spectra are rebinned into
2 km s channels.
Remember you can check your current pixel size and channel spacing with ndftrace (see Section 2.3).
If you pass raw files covering different regions of the sky to makecube it will automatically mosaic them together. This can be heavy work for your processor so you may wish to make individual cubes and combine them during post-processing. To co-add multiple reduced maps you should use wcsmosaic.
Note that this is not the same as stitching the tiles of a reduced cube from a single makecube command. Such tiles share common pixel co-ordinates and so can be combined with paste (Section 6.6.1). Separately created cubes will not have the same pixel co-ordinates, and therefore the world co-ordinates are required to align the tesserae in the mosaic of an extended region.
By selecting the lower bound (
lbnd) and upper bound (
ubnd) to be default (!) you are including all of the input
tiles. You can change these if you want to only mosaic a sub-region of the input maps. As with makecube there
are a number of regridding options available to you describing how to divide an input pixel between a group of
neighbouring output ones (the default is
Note that by default wcsmosaic aligns reduced cubes along the spectral axis using the heliocentric standard of rest (the Orac-dr pipeline also does this). If you want to align using a non-heliocentric standard of rest, you should set the AlignStdOfRest attribute for your NDFs using wcsattrib before running wcsmosaic. The following example sets the alignment to the kinematic LSR.
where list_of_separate_cubes is group of cubes specified as a comma-separated list or as one per line in a text file.
Cropping an ACSIS map can be fiddly. The simplest way is to create an ARD mask in Gaia and apply it to your map. The steps below work on both two- and three-dimensional data.
inside=falsewill mask the pixels outside rather than inside your mask. The masked pixels will appear blank when you open it with Gaia; see the left-hand panel of Figure 8.2.
trimbadoption. This leaves just your selected region; see the right-hand panel of Figure 8.2.
An alternative method is to use ndfcopy while defining the section of the map or cube you wish to extract as an output cube. See Section 2.5.
If you wish to extract only a region which overlaps with an existing file you have, e.g. from a different observing
campaign or telescope, you can also use ndfcopy but with the
The shape of the file supplied by
like will determine the shape of the output file. This shape can be in either
pixel indices or the current WCS Frame. If the WCS Frame is required, include the parameter
likewcs to the
command line otherwise it can be omitted.
Open your map with Gaia.
In Gaia go to Image-analysisImage regions.
Select the shape of the ARD region you wish to define and drag it on your map by holding the mouse button down, dragging the shape out, then releasing the button.
In the "
window go to
ARD description to
save your ARD mask
for later use.
You may come across empty pixels in your map due to dead receptors or receptors which have failed quality assurance in the pipeline. The second half of 2013 in particular had only twelve working receptors for HARP.
You can fill these holes using Kappa:fillbad. This replaces the bad values with a smooth function derived from neighbouring values, derived by iterating to a solution of Laplace’s equation.
The default values for fillbad will fill the holes but smooths by five pixels along
each axis. If you prefer not to smooth in the spectral axis, set the parameter
is the scale length in pixels. The zero means do not smooth along the third axis.
The scale length should have a value about half the size of the largest region of bad data to be replaced. Since the largest bad regions apart from the cube peripheries are two pixels across, a size of 1 is appropriate.
Figure 8.3 shows an initial map with holes and the final filled map.
You can use Kappa:stats to check the noise in your map. It will report the statistics for all pixels so be aware that
noisy edges and strong signal will contribute to the standard deviation. You can mitigate this by trimming any
noisy edges and by examining the square root of the VARIANCE component (hereafter referred to as the error
although bright emission will still increase your noise. You can select the error component with
comp=err on the
Including the option
order allows the ordered statistics such as the median and percentiles to be reported. Note
that percentile options will need to be specified via the
You can plot the noise or error component of your map using the Kappa command histogram. This allows you
to visualise the distribution with more ease. Again the
comp=err option is used.
The output is shown in Figure 8.4. An alternative to setting the number of bins via the
numbin parameter is to
set the width of each bin using the
It is also useful to view the noise map itself. Figure 8.5 shows how to select the error component in Gaia. Other
options available from the "
Select NDF in container file" window include the exposure time, the effective
time and, if
spread=nearest when running makecube, the system temperature. To return to your main image
select the top level and click the Data button.
The individual detectors in the HARP array do not respond exactly the same to the incoming signal, returning different temperatures for the same flux. If uncorrected, this can lead to artificial net-like patterns in the reduced spectral cube. As with any flatfield correction, the goal is to expose to a uniform source to measure the relative responses of the detectors. However, this is not possible with HARP observations, and the approach is assume that during an observation the detectors see approximately the same signal from the various sources. For extended emission at low galactic latitudes this is a reasonable assumption. For isolated compact sources it is likely to be invalid.
It may be possible to use a flatfield determined on the same night in a high-signal region and apply that to a low-signal or compact-source observation. The flatfield can change during the night, but it might better than no flatfield.
The method of Curtis et al. (2010) creates a map for each detector and integrates the measured
flux in the main spectral line. Use the
DETECTORS parameter to create a spectral cube from just that
The simplest way to sum the flux across a line run stats over a chosen spectral range, such as km s to 7.2 km s.
If there might be bad pixels present, the mean is more accurate than the sum. This assumes that the line is located within these bounds across the whole spatial region. It is wise not to push too far into the wings of the line and baseline errors and noise have a greater impact on the integrated flux.
The receptors are normalised to the flux of the reference receptor, near the centre, normally H05, but given by
the FITS header
There are other methods in Orac-dr, one to cope with multiple lines. It sums all the signal above some threshold, such as the median plus four standard deviations, to exclude the baseline noise. Since the flat ratio biases this sum, Orac-dr iterates to converge to a solution.
1No such component exists in the NDF.