Joint Astronomy Centre
Show document only
JAC Home
JCMT
UKIRT
Contact info
JAC Divisions
OMP
Outreach
Seminars
Staff-only Wiki
Weather
Web Cameras
____________________

JCMT home
Observing at JCMT
OMP Observation Manager
Telescope
Spectral Line Observing
Continuum Observing
Schedule
Data Archive
Future Developments
Legacy Surveys
Newsletter & Publications
How to reduce ACSIS data with CLASS

Reducing ACSIS data with CLASS

When it seems (at the JCMT) that the GAG software (cfits, class, greg, graphic, gfits, astro) is not there,
you should type first:

setenv PATH /jac_sw/gag/linux-intel/bin:$PATH

The latest installed version (December 2005) can be reached via:

source /local/progs/gildas/gildas-exe/pc-redhatrelease-g95/etc/login

If you prefer to use CLASS and other Gildas software to reduce your spectra these are the steps to take:
(at this moment one is working in Grenoble on methods to do the conversion in CLASS itself)
First make cubes of the ACSIS data with makecube or oracdr. Then extract subcubes of dimension 1,1,nspec from the cubes in ndf format and convert these to fits format. Read the fits files into class.

This can be done with the kappa command ndfcopy and the convert command ndf2fits.

The following assumes that you are using the most recent (Humu) release of the Starlink software.

to FITS

If you have multisubsystem observations made with RxA3, where the first subband is in LSB (USB) and another is in USB (LSB), you have to change the sideband in the header of the USB (LSB) cube:

kappa
wcsattrib file.sdf set sideband USB (LSB)

The simplest ways to convert .sdf files to fits format is for:
RxA3 and RxW (single spectra):

convert
ndf2fits file.sdf file.fits encoding="fits-class"
RxA3, HARP, RxW (maps) - one single spectrum from position (1,1) in map:
kappa
ndfcopy in='file(1,1,)' out=file.sdf
convert
ndf2fits file.sdf file.fits encoding="fits-class"

To convert maps one needs to do this for all positions in the map.
This is an example of a csh script that does that for a 4x4 map:

#!/bin/csh -f
source /star/etc/login >& /dev/null
source /star/etc/cshrc >& /dev/null
kappa >& /dev/null
convert >& /dev/null
if (`alias kappa` == "") then
echo ""
echo "Fatal: Initialization error of kappa environment"
echo ""
exit
endif
@ i = 0
while ($i <= 3)
@ j = 0
while ($j <= 3)
ndfcopy in='file('${i}','${j}',)' out=file_${i}_${j}.sdf
ndf2fits file_${i}_${j}.sdf file_${i}_${j}.fits encoding="fits-class"
echo "Finished file_${i}_${j}.fits"
@ j ++
end
@ i ++
end

The size of a cube and pixel bounds can be found with the kappa command ndftrace, e.g.
Dimension size(s): 45 x 45 x 2048
Pixel bounds : -23:21, -23:21, -1024:1023

Problems

Currently there are some problems with the fits files converted in this way.
Some header variables are not yet present in the fits files. The most important ones are the system temperature and the integration time. We are working to solve these problems.
Missing are:
scannumber
line (= molecule+transition)
tau
Tsys
Time (integration time)
elevation (now correct in Hilo version)
weather parameters (H2O - from WVM?, Pamb, Tamb)
beameff (put to 1.0?)
forweff (put to 1.0?)
Because of limitations of the CLASS headers, observations made with very large radial velocities will have incorrect velocities and velocity resolutions in CLASS. It is recommended in such cases to observe with a calcalated sky frequency and velocity 0 km/s.

to CLASS

These files can be converted into class format

%class
class>file out jcmtdata new (add new if the file does not yet exist)
class>las\fits read file.fits
(or alternatively)
class>las\fits read "/dir/subdir/file.fits"
class>write n

(note: because the scannumber is missing in the fits header one needs to give a number when writing to the output file)

If you have large maps it is useful to do the conversion to class format with a commandfile, e.g.
%ls *.fits > files.class
and then edit files.cfits with your favourite editor from
file.fits
to
las\fits read file.fits
write 1
etc
then
%class
to start class

class>@files.class

For help within cfits, class, etc type help, or look at the GILDAS homepage.

In the newest version of Greg/Graphic the Explain command is not working. Here is a list of available tasks (run task).

Jan Wouterloot

Contact: Per Friberg. Updated: Tue Mar 4 11:50:19 HST 2008

Return to top ^