9 Individual commands

Contents of this section

9.1 accum

use: accum

parameters: none

options:

-help   produce help message 
-weight teff|time|none  choose weighting method 

description: The scan currently held by CWORK is added to the scan in CHOLD. By default, the channel contents are weighted with the integration time and the system temperature, i.e. the weighting factors are taken to be time/Tsysˆ2. The result is stored in CHOLD. To display the data you first need to use average before using show. The result of accum stays in CHOLD until you clear it with zero.

Option -weight time leads to weighting factors proportinal to the integration time only and -weight none produces simple adding of channel contents of CWORK to CHOLD .

needs: CWORK , CHOLD

see also: zero and average .

9.2 area

use: area

parameters: none

options:

-help   produce help message 
-vel min max    choose velocity interval 
-freq min max   choose frequency interval 
-chan min max   choose channel interval 

description: Calculate integrated intensities between min and max (or over whole spectra if no option is used). Several ranges, up to five, may be specified by repeating the option (see example below). The results will be expressed in the unit used for the limits and will be logged to file logfile in the following format:


AREA:    nnnn offx offy area1 area2 ...

where nnnn is the scan number, offx and offy are the map offsets in arcmin for the scan and arean is the result of the integration for the nth interval.

example: calculate integrated intensities for velocity ranges 10 -- 20, 20 -- 30 and 30 -- 40 km/s. Results will be in K*km/s.


area -vel 10 20 -vel 20 30 -vel 30 40

needs: CWORK

see also: moment

9.3 average

use: average

parameters: none

options:

-help   produce help message 

description: The scan currently held by CHOLD is copied to CWORK . This may be used to perform actions on an average of scans which needs to be copied to the work area for this purpose.

example: make an average of scans 1000 and 1010 and show it


zero 
get 1000; accum
get 1010; accum
average
show

needs: CWORK , CHOLD

see also: zero , accum

9.4 baseline

use: baseline

parameters: none

options:

-help   produce help message 
-vel   min max  choose velocity interval 
-freq  min max  choose frequency interval 
-chan  min max  choose channel interval 
-order n        choose order of baseline fit 

description: Fit a polynomial to scan data, optionally defining a range of channels for fitting. The range may be specified in velocity, frequency or channels by using the respective option. It defaults to the complete spectrum. Several ranges, up to five, may be specified by repeating the option. The scan, with the channel data replaced by the values of the polynomial fit, is stored at CTEMP . CWORK is unmodified. Note that the fitted baseline is not subtracted from the spectrum, you will have to use subtract to do that. You may plot the result of baseline by using showfit.

example: fit cubic curve to scan, given two velocity ranges and subtract the fit.


 
baseline -vel -50.0 0.0 -vel 10.0 60.0 -order 3; subtract 

needs: CWORK , CTEMP

see also: showfit , subtract

9.5 bias

use: bias value

parameters:

value   the bias value to be added to all channels 

options:

-help   produce help message

description: A constant is added to all channels of the scan currently held by CWORK . The result is returned to CWORK .

example: subtract 1.5 from all channels


bias -1.5

needs: CWORK

see also: scale

9.6 calc

use: calc

parameters: none

options:

-help   produce help message 
-add    add <sf/CTEMP/ to <sf/CWORK/ 
-subtract       subtract <sf/CTEMP/ from <sf/CWORK/ 
-multiply       multiply <sf/CWORK/ by <sf/CTEMP/ 
-divide divide <sf/CWORK/ by <sf/CTEMP/ 

description: Perform basic arithmetics with data in CWORK and CTEMP. Result is in CWORK. Only the data are effected, the header is left unchanged. In case of division, a channel of CWORK is set to 0 if the corresponding channel of CTEMP was 0.

example: calculate the ratio of two scans, channel by channel


get -file scan1
tcopy
get -file scan2
calc -divide

needs: CWORK CTEMP

9.7 clip

use: clip

parameters: none

options:

-help   produce help message 
-min value      specify minimum temperature 
-max value      specify maximum temperature 

description: The spectrum is compared against one or two values. Channels exceeding the limits are cut back to max or min, respectively. Useful for getting rid of spikes or to investigate weak features in spectra that are dominated by strong lines. The clipped spectrum is returned to CWORK , i.e. the spectrum is actually changed. If you want to clip a spectrum just for display purposes, use the features of the show command instead.

example: clip channel values $ge 1.0$ and $le -1.0$


clip -min -1.0 -max 1.0

needs: CWORK

see also: drop

9.8 convolve

use: convolve

parameters: none

options:

-help   produce help message 

description: Convolve the spectra currently held by CWORK and CTEMP with each other. The result is returned in CWORK.

needs: CWORK , CTEMP

see also: correlate , fft

9.9 correlate

use: correlate

parameters: none

options:

-help   produce help message 

description: Calculate the correlation spectrum of CWORK and CTEMP . The result is returned in CWORK.

needs: CWORK

see also: convolve , fft

9.10 data

use: data

parameters: none

options:

-help   produce help message 
-vel min max    choose velocity interval 
-freq min max   choose frequency interval 
-chan min max   choose channel interval 
-column n       choose number of columns 

description: To display the values of channels on the screen. For each channel within the given region, the velocity, frequency or channel number is displayed together with its associated temperature value. The output is formatted into several columns, the number of which may be set by the -column option (default 8). CWORK is unmodified.

example: display channels 1000 to 1100 as 2 column table


data -chan 1000 1100 -column 2

needs: CWORK

see also:

9.11 drop

use: drop

parameters: none

options:

-help   produce help message 
-vel min max    choose velocity interval 
-freq min max   choose frequency interval 
-chan min max   choose channel interval 

description: To drop any channels outside the specified range. This is a permanent loss of channels, CWORK is modified. For limiting the range of the x-axis for display purposes you may use the features of the show command.

example: drop all channels outside -50.0 to 50.0 km/s


drop -vel -50 50

needs: CWORK

see also: clip

9.12 fft

use: fft

parameters: none

options:

-help   produce help message 
-invert perform inverse transformation 
-power  calculate periodogram 

description: Performs a fast Fourier transform of the current spectrum. The inverse transform may be performed by specifying option -invert. You may also get a periodogram (power spectrum) by using the -power option.

needs: CWORK

see also: convolve , correlate

9.13 filter

use: filter

parameters: none

options:

-help   produce help message 
-boxcard n      apply (2n-1)-channel boxcar filter 
-hanning        apply hanning [1/4 1/2 1/4] filter 
-dispo m n      apply m-th order, n channel least-squares filter 
-coeff n a[0]...a[n-1]  specify your own filter (one half) 

description: Apply a digital filter to your spectrum which can be described by 2n+1 filter coefficients a[-n+1]...a[0]...a[n-1], which are symmetric around a[0]. The resulting spectrum will be the convolution of the original data with this filter. Because boxcar and hanning smoothing are so popular, they have been preprogrammed and can be invoked through the respective option. If the filter coefficients aren't normalized, i.e. don't sum up to 1, filter will do the normalization for you before applying the filter to the spectrum. For documentation on least-squares filters see: Numerical recipes, 2nd edition.

example: convolve spectrum with a 5 (=2$times$3$-$1) channel wide boxcar filter


filter -boxcar 3

needs: CWORK

9.14 fitscube

use: fitscube

parameters: none

options:

-help   produce help message 
-file filename  specify output filename (default: source.cube) 
-magnify m      fill in m addititional pixels between grid positions 
-smooth n       smooth resulting map n times 

description: The program scans through logfile , tries to read a scan for every scan number in the first column and merges these scans into a 3~dimensional, AIPS compatible, FITS formatted cube, where the first axis is velocity and the positional offsets are taken as the second and third axis. Because AIPS doesn't like maps with few pixels, the resulting cube may be interpolated along axis two and three to yield more pixels in each velocity plane. Each plane may be smoothed by applying a laplacian digital filter a given number of times.

example: produce a cube map from a number of scans, which are assumed to correspond to different map positions around a source. Because fitscube extracts scan numbers from logfile , we need to generate these entries first. (Any of the commands writing to logfile will do, we use the area command in our example. Each plane of the resulting cube is interpolated to yield a 5-fold increase in the number of pixels along the spatial axes. The example assumes that logfile is an empty file to start with. The resulting FITS file will be called HH56.CUBE.


foreach scan (HH56.*)
get -file $scan
area 
end
fitscube -magnify 5

needs: CWORK

see also: fitsmap

9.15 fitsmap

use: fitsmap

parameters: none

options:

-help   produce help message 
-file filename  specify output filename (default: source.MAP) 
-col n  specify column number in drp.log to map 
-magnify m      fill in m addititional pixels between grid positions 
-smooth n       smooth resulting map n times 

description: The results of previous calculations, which were stored in logfile , may be used to produce a 2~dimensional, AIPS compatible, FITS formatted map, where the positional offsets stored in logfile are taken as the x- and y-axis and the entries from an arbitrary column are taken as the pixel value. The column number is taken relative to the logged offsets, i.e. col 1 will actually access column 5 of logfile . Because AIPS doesn't like maps with few pixels, the resulting map may be interpolated along the spatial axes to yield more pixels. The map may be smoothed by applying a laplacian digital filter a given number of times.

example: produce spatial map of line widths resulting from fitting of gaussian profiles to a number of scans, which are assumed to correspond to different map positions around a source. The map is interpolated to yield a 5-fold increase in the number of pixels along each axis. The example assumes that logfile is an empty file to start with. It is also assumed that the line profiles are so prominent in all scans, that automatic locating of the line in gauss works. The line width is returned as the third result by gauss. The resulting FITS file will be called HH56.MAP.


foreach scan (HH56.*)
get -file $scan
gauss
end
fitsmap -col 3 -magnify 5

needs: CWORK

see also: fitscube

9.16 fold

use: fold

parameters: none

options:

-help   produce help message 
-throw value    specify frequency throw 
-shift  shift resulting spectrum by half the throw 

description: This command is meant to be used with frequency switched spectra. Channel contents ci are replaced according to

c[i] = (c[i] - c[i+j])/2
where j is the number of channels corresponding to the frequency throw. The throw may be both positive or negative. Its value is normally taken from the scan header but may be given via the throw option. If both a header value and a value specified via the runstring are given, the latter overrides the first. The spectrum header may contain frequency and velocity information refering to half way between the siganl and reference frequency. The shift option allows you to correct for this.

example: fold frequency switched spectrum (throw $=$ 20.0 MHz)


fold -throw 20

needs: CWORK

9.17 gauss

use: gauss

parameters: none

options:

-help   produce help message 
-vel min max    choose velocity interval 
-freq min max   choose frequency interval 
-chan min max   choose channel interval 
-ampl amplitude guess amplitude of gaussian 
-centre centre  guess centre of gaussian 
-width width    guess width of gaussian 

description: Fit a Gaussian profile to the scan data in CWORK . If no arguments are supplied the program will come up with guess values by looking at the part of the spectrum with maximum intensity. The range of channels over which to fit may be specified in velocity, frequency or channels. The range defaults to the whole spectrum. The values of centre, width and amplitude for the start of the iteration may be specified by using the respective option. Centre and width are given in the same unit as was used to specify the fit range. If no range was specified, velocity units are assumed. The fitted profile is stored in CTEMP and can be shown on the screen with showfit. CWORK is unmodified. Numerical results are printed to the screen, as well as logged to the file logfile in the following format:


GAUSS:  nnnn   offx  offy  amplitude  centre  width  area 

where nnnn is the scan number, offx and offy are the map offsets in arcmin for the scan. The area $a$ of the integrated profile is calculated from the fitted amplitude $A$ and width $Delta x$ according to $a = 1.06times A times Delta x$.

example: fit profile over velocity range $-5ldots+5$,km/s with guessed amplitude =7.0,K, centre =3.0,km/s and width =1.0,km/s


gauss -vel -5 5 -ampl 7.0 -centre 3.0 -width 1.0

needs: CWORK , CTEMP

see also: showfit

9.18 get

use: get

parameters:

scan    scan number 

options:

-help   produce help message 
-file filename  specify full file name 

description: This command reads a scan into memory which had been stored in DRP's own binary format. If a scan number is given, get will read the first file in the current directory which fits a file mask of '*.nnnn', where nnnn is the (up to four digit) scan number. The complete file name may be specified via the -file option, which also allows retrieval of scans from other directories.

example: get one scan via scan number and the second one via its full name. The latter one resides in the parent directory.


get 1000
get -file ../HH56.0980

needs: CWORK

see also: put , getfits , putfits , getsest

9.19 getdrsp

use: getdrsp filename}

parameters:

filename        name of data file to read from 

options:

-help   produce help message 
-file filename  specify full file name 
-scan n specify number of scan to read 
-record r       specify number of record to read 

description: Extract a scan from a DRAWSPEC file (a PC based spectral line data analysis program written by Harvey Liszt, NRAO). The scan is stored in CWORK . Scans may be specified via scan number or record number.

example: extract second scan from file MYDATA.DAT


getdrsp -file MYDATA.DAT -record 2

needs: CWORK

see also: putdrsp

9.20 getfits

use: getfits scan

parameters:

scan    file name without extension 

options:

-help   produce help message 
-file filename  specify full file name 

description: Read a scan in SEST/IRAM compatible FITS format. Unless the -file option is used, the file name is assumed to have extension .fits. The environment variable $FITSREAD is checked, and if set, will be prepended to all file names. This allows access to FITS files in different directories.

Because getfits expects FITS files on disk (one scan per file) you may have to copy scans from tape to disk first, if your data are currently on tape. You may use the UNIX command dd to do that. After mounting your tape (the way to do that will be site dependant) you may use


dd if=/dev/rmt/0mn ibs=2880 of=scan.fits

which will read the next file from device /dev/rmt/0mn (which is the DAT tape on a HP-UX work station) with a blocking factor of 2880 bytes (suitable for FITS) and store the bytes up to the next EOF in file scan.fits.

example: read file 7000s.fits stored in directory /news/sessions/yellow/ and convert to DRP binary format.


setenv FITSAREA /news/sessions/yellow/
getfits 7000s
put

needs: CWORK

see also: get , put , putfits

9.21 getsest

use: getsest

parameters: none

options:

-help   produce help message 
-file filename  specify full file name 

description: SEST data in their original, binary format may be read into DRP with this command. These files will normally be called something like =SSSSPPPPNNNN.SPE, where SSSS are the first four characters of the source name, PPPP are the four characters of the project designator and NNNN is a four digit scan number.

example: convert all SEST scans following the above mentioned naming convention to DRP format. Store them in their new format.


foreach scan (=*.*)
getsest -file $scan
put
end

needs: CWORK

see also: get , put , getfits , putfits

9.22 hardcopy

use: hardcopy

parameters: none

options:

-help   produce help message 

description: Produce a hardcopy of the current contents of drpwindow on the system printer.

needs: CWORK

9.23 header

use: header

parameters: none

options:

-help   produce help message 
-long   produce long form of header 

description: Display header information for the scan currently in CWORK . CWORK is unmodified. The information may be displayed as a one line (default), or as a more extensive listing (option -long). The listing of the header information is directed to your terminal by default, but may be redirected to a file or printer using I/O redirection. The short form consists of the following information:


nnnn sourcename longitude latitude offx offy freq Tsys time

where

nnnn    scan number 
sourcename      first eight characters of source name 
longitude       descriptive longitude of source 
latitude        descriptive latitude of source 
offx    offset in longitude (arcsec) 
offy    offset in latitude (arcsec) 
freq    rest frequency of center channel (MHz) 
Tsys    system temperature (K) 
time    integration time (s)

A listing of 1--line header information for a number of scans and of the same format as described here may be obtained with the log command.

example: produce long header of current scan, append to file orion.head


header -long >>orion.header

needs: CWORK

see also: list

9.24 inquire

use: inquire

parameters: none

options:

-help   produce help message 

description: Allows you to use the mouse to retrieve x and y coordinates of points in your current plot (scans or maps). Click with the left mouse button at any point in drpwindow. The x and y (world) coordinates will be written to your shell window (i.e. where you started inquire). Pressing any other mouse button will terminate the program.

The selected points will be marked by blue crosses in drpwindow, but will not appear in a hardcopy.

example: use inquire as a digitizer, save data to a file called position.dat. You will get tab separated x and y coordinates for all points you clicked at.


 
inquire > position.dat
( start clicking with left mouse button inside drpwindow )
( any other mouse button will terminate )

The following script (supplied with DRP in file basefit uses inquire for interactive fitting of baselines:


#!/bin/csh -f
#
# interactive fitting of baseline
#
echo 'enter baseline order:'
set order = $<
#
echo 'mark baseline regions with left mouse button'
echo '(any other mouse button to exit):'
#
# run inquire, save output on variable 'limits'
set limits = `inquire`
#
# check that number of points is even 
@ count = ( $#limits % 2 )
if $count == 0 then
  set count = 1
  set base = ( -order $order )
  while ($count < $#limits) 
    # we need strings like '-vel x1 x2'
    # every other point is x-coordinate
    set base = ( $base '-vel' )
    set base = ( $base $limits[$count] )
    @ count = ( $count + 2)
    set base = ( $base $limits[$count] )
    @ count = ( $count + 2)
  end
  baseline $base
  showfit
else
  echo 'even number of points required'
endif

9.25 list

use: list filename(s)}

parameters:

filename(s)     name(s) of file(s) to list

options:

-help   produce help message 

description: Display one line of header information for all scans whose filenames are given as part of the runstring. The listing of the header information is directed to your terminal by default, but may be redirected to a file or printer using I/O redirection. The lines are logged in a format identical to the short format produced by the header command, except that one extra header line describing the contents of each column is produced as the first line of the listing.

example: list all files matching Orion.* to the printer


list Orion.* | lp

You may use the Unix sort facility to sort the output of list. The following example will sort all scans (files with file name extensions starting with a digit) by offset (i.e. numerical sorting by columns 5 and 6 from the output of list, counting columns from 0 to 9):


list *.[0-9]* | sort -n +5 -6 -n +6 -7 | egrep '^[0-9]'

Piping through egrep suppresses the header lines produced by list.

needs: none

see also: header

9.26 mapshow

use: mapshow

parameters: none

options:

-help   produce help message 
-key command    specify command filter for 'drp.log' file 
-col n  specify column number to map 
-pen m  specify pen (line style) to be used 
-map what       what: cover|scan#|contr|value|shade|spect 
-start value    specify lowest level for contour maps 
-inc value      specify level increments 
-mark file      supply filename for offset positions to be marked 
-over   write over existing plot 
-smooth draw smooth contours 
-nodraft        use high quality fonts for text 

description: The results which were written to file logfile by commands moment, gauss and area may be used to produce coverage maps and/or contour plots. CWORK should hold a scan which is part of the map, so that mapshow can retrieve map spacing and position angle from the scan header. After use of mapshow the spectral values of CWORK are destroyed; however, the header information is left intact. Each line in the log file logfile is assumed to have the following format:


COMMAND:  nnnn offx offy column1 column2 column3 ...

where COMMAND indicates which command produced the line, nnnn is the scan number, offx and offy are the descriptive positional offsets for the scan and, finally, column$n$ ($n = 1,2,3ldots$) are numerical results. See the documentation of moment, area and gauss in order to know how many columns they produce and in what order.

The -key option tells the program which lines to look for, i.e. if you specify -key area only lines in the log file produced by the area command are considered, any other entries will be ignored. If you don't use -key all lines will be taken into account.

The col specifies which column of results you are interested in. The x and y-coordinates of your map will always be the logged offx and offy entries. The -col option lets you choose your z-coordinate.

The -map option lets you specify what to plot:

cover produce a coverage map by marking all offset positions found in logfile with a little cross

scan# same as cover, except that positions are labeled with scan numbers

value same as cover, except that positions are labeled with the value of your chosen column (see -col)

contr produce a contour plot of the chosen column versus the logged offsets. The mapshow will check the range of z-values and pick appropriate contour levels. Alternatively, you may specify the first level (option -start) and/or the increment between levels (option inc).

shade produce a grey scale map, each pixel is shaded with grey colour relative to the minimum and maximum values in the map.

spect plot all spectra belonging to the scan numbers in logfile in their respective position of the map. The scan currently in CWORK will determine the scaling for all the others.

Extra positions in your map may be marked by using the -mark option followed by a filename. This should refer to a file containing entries of the form


offx offy symbol

where offx, offy are the offsets of the position to be marked (in arcmin) and symbol is an integer, which is used as an index into a table of symbols. The most useful of these are shown in the following table (for a full listing see the documentation of the PLPLOT graphics library).

1  2  3  4  5 
.  +  *  o  x 

You may use different line patterns on the screen by using the -pen option. Default is a solid line. This does not affect the line style used for the map boundaries.

Normally a coordinate frame is drawn prior to the display of the contour lines or the coverage, but you may also plot over an already existing frame by using the -over option. This will e.g. allow you to show contours for several columns in the log file on the same plot. Different line styles are automatically chosen for different columns.

When you use mapshow, the CWORK area must contain a scan which is part of that map, not necessarily the central position. This scan must have the map parameters (step size and position angle) specified in its header, you may use header -long to find that out. If these values are missing, use pixel to fill them in.

The -smooth option lets you chose smoothed contours (fitted B-splines) instead of the straight lines normally used.

To increase the quality of text on your hardcopy you may use -nodraft which will use the extended font of the PLPLOT package.

example: show a coverage map of all entries from the gauss command, mark each position with the fitted centre velocity (column 3).


mapshow -key gauss -col 3 -map value

produce a contour plot of integrated intensities from the area command. Contours will be drawn with pen 1. First draw frame and values of column 1, then draw values of column 2 on top. Contours are drawn in steps of 0.5, starting with 1.0. Grey scale maps and contour plots may be combined similarly.


mapshow -key area -col 1 -map contr -start 1.0 -inc 0.5
mapshow -key area -col 2 -map contr -start 1.0 -inc 0.5 -over

needs: CWORK

see also: area , gauss , moment , moment pixel , fitsmap , fitscube

9.27 matlab

use: matlab

parameters: none

options:

-file filename  specify output filename 
-vel    save velocity as x-axis (default) 
-freq   save frequency as x-axis 
-chan   save channel contents only 

description: You may want to export your spectra to the commercial MATLAB program for further analysis, the matlab command will write the contents of CWORK to a data file which can be read into MATLAB via the load command (see your MATLAB documentation for a description of it). By default, the file will be called scannnnn.mat, where nnnn is the scan number. Three entities will be saved, i.e. after loading the data file into MATLAB three variables will be set:

source - a character array holding the name of the source header - a minimal spectrum header containing an array (column vector) of (currently) eight numbers, the order and meaning of which are as follows: (1) descriptive longitude of scan in degrees (2) descriptive latitude of scan in degrees (3) descriptive offset in longitude in degrees (4) descriptive offset in latitude in degrees (5) system temperature in K (6) integration time in s (7) rest frequency of centre channel in GHz (8) source velocity of centre channel in km/s T - If the -vel or -freq option has been used this will be a n by 2 array of numbers containing an array of velocities or frequencies in column 1 and the channel contents as column 2; n is the number of channels. If the -chan option it will just be a n by 1 array with channel contents as the only column.

example: write out the current scan in MATLAB format (we will get a velocity scale by default)


matlab

then within MATLAB you may look at the spectrum with (assuming the data were written to a file called scan1000.mat):


load scan1000
plot(T(:,1),T(:,2))
title(source) % use the source name as title
xlabel('velocity in km/s')
ylabel('antenna temperature in K')

needs: CWORK

9.28 moment

use: moment

parameters: none

options:

-help   produce help message 
-vel min max    choose velocity interval 
-freq min max   choose frequency interval 
-chan min max   choose channel interval 

description: Calculate a number of statistical values between min and max (or over whole spectra if no option is used). The results will be expressed in the unit used for the limits and will be logged to file logfile in the following format:


MOMENT:  nnnn offx offy int cen ew Tp Tm rms

where nnnn is the scan number, offx and offy are the descriptive offsets in arcmin for the scan, int is the integrated intensity, cen is the centroid velocity, frequency or channel, ew is the equivalent width, Tp and Tm are the peak and mean temperature for the given range. Centroid and equivalent width are calculated in the same unit as was used for specifying the range, or in velocity, if no range was given.

example: calculate moments for velocity range -10 -- 5 km/s. Results will be in K*km/s.


moment -vel -10 5

needs: CWORK

see also: area

9.29 put

use: put

parameters: none

options:

-help   produce help message 

description: The put command saves the scan currently held by CWORK to disc. Unless the -file option is given, the file name chosen will follow the following pattern: sssss.nnnn, where sssss are the alphanumeric characters of the source name and nnnn is a four digit scan number (using leading zeroes if necessary). Any other filename can be used by specifying the -file option. This option would also allow to store the file under a different directory than your current directory, which is the default.

example: store scan in $HOME directory as gustaf.m51


put -file $HOME/gustaf.m51

needs: CWORK

see also: get , getfits , putfits , getsest

9.30 putdrsp

use: putdrsp filename

parameters:

filename        name of data file to append to 

options:

-help   produce help message 
-file filename  specify full file name 

description: Write a scan in a format readable by DRAWSPEC (a PC based spectral line data analysis program written by Harvey Liszt, NRAO). The scan currently hold by CWORK is appended to the file specified via the runstring. If that file doesn't exist, it is created first. Remember to use filenames that make sense to MS-DOS, i.e. up to 8 characters plus a 3 character extension (see example).

example: append current scan to file MYDATA.DAT


putdrsp MYDATA.DAT

needs: CWORK

see also: getdrsp

9.31 putfits

use: putfits

parameters: none

options:

-help   produce help message 
-file filename  specify full file name 

description: Write a scan in SEST/IRAM compatible FITS format. Unless the -file option is used, the file name will be nnnndrp.fits where nnnn is the scan number. The environment variable $FITSREAD is checked, and if set, will be prepended to all file names. This allows stroing of FITS files in different directories.

example: write to file ngc1234.fits in directory /users/guest/fitsdata/.


setenv FITSAREA /users/guest/fitsdata/
putfits -file ngc1234.fits

needs: CWORK

see also: get , put , getfits

9.32 redres

use: redres

parameters: none

options:

-help   produce help message 
-factor f       specify redressing factor (> 1.0) 
-vel dv specify new velocity resolution  
-freq df        specify new frequency resolution 

description: To change the spectral resolution of the scan currently in CWORK . The spectrum is fitted with cubic splines and then sampled at the specified resolution. The frequency and velocity of the centre channel are preserved. So far, only a decrease in resolution is allowed. The user is responsible for properly filtering the spectrum first, so that channels are actually correlated over a range corresponding to the new resolution.

example: do hanning smoothing followed by a reduction of channels


filter -hanning
redres -factor 2.0

needs: CWORK

see also: filter

9.33 reverse

use: reverse

parameters: none

options:

-help   produce help message 

description: This command will reverse the spectrum currently hold in CWORK, i.e. turn around the order of channels. The sign of the frequency and velocity resolution are also inverted. Normally channels are stored in frequency increasing order, so that a velocity scale in a plot will increase from right to left. This command will allow you to turn the x-axis around.

needs: CWORK

9.34 scale

use: scale value}

parameters:

value   the value by which to multiply all channels 

options:

-help   produce help message

description: All channels of the scan currently held by CWORK are multiplied by (scaled with) the given constant. The result is returned to CWORK .

example: invert the temperature scale, i.e. multiply all channels by $-1.0$


scale -1.0

needs: CWORK

see also: bias

9.35 show

use: show

parameters: none

options:

-help   produce help message 
-vel min max    choose velocity interval 
-freq min max   choose frequency interval 
-chan min max   choose channel interval 
-temp min max   choose intensity range 
-histo  show as histogram 
-over   don't erase existing plot 
-zero   draw $y = 0.0$ line 
-noframe        don't draw a coordinate frame 
-nodraft        use high quality fonts for text 
-rel    label x-axis relative to centre channel 
-grid   draw grid at major tick intervals 

description: display the scan hold by CWORK on your X-terminal in drpwindow (which will have to exist). The range for both x- and y-axis may be given, where the unit for the x-region is selectable. The x-axis will be labelled accordingly. In particular with a frequency axis, it might be preferable to have the x-axis labelled with frequency relative to the rest frequency of the header: use the -rel option to achive this. (This will actually work with a velocity or channel axis as well.)

You may plot several spectra on top of each other by specifying the -over option with all but the first scan. You may use the -noframe and -grid options to alter the default axis system drawn.

To obtain the highest quality for a later hardcopy use the -nodraft option, which will draw all labels with the extended font of the PLPLOT package and this looks a lot better on a laser printer than the standard font (this is not necessarily true for plots in drpwindow).

example: show scan over velocity range -2.0 to 8.0 km/s


show -vel -2.0 8.0

show scan, do not erase screen before plotting, show temperature range -1.0 to 4.0 K, use frequency as x-axis (note that two '0's are needed as place holders after -freq, the whole range will be plotted):


show -over -temp -1.0 4.0 -freq 0 0

needs: CWORK

see also: showfit

9.36 showfit

use: showfit

parameters: none

options:

-help   produce help message 

description: showfit allows you to display fit results from e.g. baseline or gauss commands on top of a currently displayed spectrum. The showfit command may only be used after a spectrum has been plotted on the graphics screen, i.e. showfit has to be preceeded by the show command. There may be commands in between the two if they leave the CWORK area unmodified. The reason is that showfit gets the screen scaling information from show through CWORK .

example: show scan, fit gaussian profile and show fit results


show; gauss; showfit

needs: CWORK

see also: show , baseline , gauss

9.37 subtract

use: subtract

parameters: none

options:

-help   produce help message 

description: The scan currently held by CTEMP is subtracted from CWORK and the result stored in CWORK . This is useful for subtracting a fitted profile or baseline from the original spectrum to see the residual.

example: fit gaussian profile, subtract and look at residuals


gauss; subtract; show

needs: CWORK , CTEMP

see also: baseline , gauss , showfit

9.38 swap

use: swap

parameters: none

options:

-help   produce help message 

description: The swap command exchanges the contents of the CWORK and CTEMP areas.

needs: CWORK , CTEMP

see also: tcopy , temp

9.39 tcopy

use: tcopy

parameters: none

options:

-help   produce help message 

description: The scan currently held by CWORK is copied to CTEMP (i.e. the opposite operation of temp). Could be used when you want to store the spectrum temporarily.

needs: CWORK , CTEMP

see also: swap , temp , subtract

9.40 temp

use: temp

parameters: none

options:

-help   produce help message 

description: The scan currently held by CTEMP is copied to CWORK . This is useful to look at a fit spectrum resulting from e.g. baseline or gauss.

needs: CWORK , CTEMP

see also: swap , tcopy , subtract

9.41 zero

use: zero

parameters: none

options:

-help   produce help message 

description: Clear the CHOLD area. This command should be used before CHOLD is needed for accumulating scans.

example: zero accumulator and start adding spectra


zero
get 1000; accum
get 1001; accum
get 1002; accum
average

needs: CWORK

see also: accum , average

Next Chapter, Previous Chapter

Table of contents of this chapter, General table of contents

Top of the document, Beginning of this Chapter