This recipe shows how to import and display a data cube observed with the
ROSAT
X-ray astronomy satellite (Röntgensatellit). ROSAT data come
in a number of different formats. The example used here is an Asterix
binned dataset of the irregular galaxy M82 (NGC 3034). This format is
used by the Asterix package (see SUN/98[9]).
The data cube comprises a grid of 216 by 216 points on the sky, with a
spectrum of 22 points at each position. The example data are available
as file m82ast.sdf. The procedure for importing and displaying these
data is very similar to the corresponding procedure for JCMT data
described in Section
.
convert
to make the CONVERT applications available. Then type:
ast2ndf m82ast m82ndf
Note that though the input Asterix binned dataset and output NDF are respectively held in files called m82ast.sdf and m82ndf.sdf they are specified to application ast2ndf without the `.sdf' file type.
It is also worth noting that an Asterix binned dataset is itself almost a standard Starlink NDF. ast2ndf merely makes the data format completely standard and rearranges the order of the axes.
hdstrace m82ndf
Again the file name is specified without the `.sdf' file type. This facility is useful because it lists the value of much of the auxiliary information contained in the data set. hdstrace is documented in SUN/102[10]. In addition, hdstrace and many other standard Starlink applications, will also work on the original Asterix binned dataset.
$SX_DIR/ndf2dx m82ndf m82.dx
Note that though the file type is not specified for the input NDF file, it should be given for the output native DX format file.
The above example will convert the entire data cube. However, often the useful information will be contained in only a small range of energies. For example, in the example dataset most of the useful information lies between energy steps 5 and 15. It is possible to convert a subset of the NDF corresponding to a given range of energy steps. For example, to convert a subset corresponding to steps 5 through to 15 type:
$SX_DIR/ndf2dx 'm82ndf(5:15,,)' m82sub.dx axes=no
The syntax to specify a subset of an NDF is to give the bounds of the required region inside parentheses after the file name. Unfortunately however, by default the Unix shell will attempt to interpret these parentheses. Thus, in the above example the input file name and NDF subset are enclosed in single quotes in order to prevent this behaviour and ensure they are passed correctly to ndf2dx. The use of `escape mechanisms' of this sort to prevent the premature interpretation of special characters sent to Starlink applications is discussed in SC/4[3].
The axes=no option causes ndf2dx to ignore any axis information present in the input dataset and write the output DX file with axes consisting of simple pixel numbers. This option may or may not be appropriate depending on the details of your data. In the present case it leads to a better visualisation.
shows a DX network to display a sequence
of slices through a ROSAT data cube Each slice corresponds to the
grid of points seen on the sky at a given radial velocity. The network
is available as files rosatslice.net and rosatslice.cfg
(rosatslice.net is the basic network and rosatslice.cfg is
a `configuration file' which controls some aspects of its behaviour).
Start DX (as described in Section
). Then proceed as
follows.
for further details.
The network includes a `scale bar' showing how the colour displayed
for each pixel in each slice corresponds to the value of the pixel.
In this example the value of each pixel is the count rate in counts
per second. This network for displaying ROSAT data is virtually
identical to the corresponding network for JCMT data (see
Section
and Figure
). The only differences
are the defaults for the file names and the axis labels. Similarly,
the network for generating an iso-surface in JCMT data (see
Figure
) requires only minor cosmetic modifications
to display ROSAT data.
The DX Cookbook