Tuesday, November 8, 2011

Remote login to AIPS

So, you're away from your computer (say it's in Wisconsin and you're in South Africa), but need to log in to AIPS remotely to get some (simple) work done. Since I do this about once every six months and have to relearn how to do it every time, here's the solution.
ssh into your machine, then instead of just typing at the terminal:

> aips
or
> aips da=<computer name=>
both of which give me errors or repeatedly ask for me to retype my password, try:
> aips notv da=<computer name>
Eh, voila! I can use AIPS without complaint.
True, you can't use the tv to view your data, but that would be a pain to do remotely anyway. When I make an image, I output an .PS file and rsync it to my local machine. rsync is nifty and worth learning, if you don't know it already.

Read more!

Thursday, July 15, 2010

Gridding with SDIMG

I am trying to use SDIMG to grid some GBT data to 25 arcmin. The gridding parameters are set like in IMAGR, with XTYPE, YTYPE, XPARM, YPARM. Does anyone know how to make sense of the gridding parameters? Right now I use mysterious parameters given to me by Jay Lockman, which are idealized to the 9 arcmin L-band beam. I can't figure out what they mean to change them. The AIPS help files are just as mysterious to me.

Read more!

Monday, July 5, 2010

Inconsistencies between UVPLT and TVFLG?

Here's a question from Anonymous:

I am re-reducing 1667 MHz OH spectral line data from project AC319 (JUN-92, polarizations RR, LL, RL, LR). I chose one spectral channel from one day, and I plotted the visibility amplitudes with both TVFLG and UVPLT. The data are split, and they are for the program source W22.

I plotted the visibility amplitudes in UVPLT (stokes 'rr'), and I don't see any amplitudes over 20 Jy for baseline lengths 4 - 9 kilolambda. However, when I plot the same data in TVFLG (stokes 'rr', sorted by length), I see a number of amplitudes higher than 20 Jy in the same baseline range.

Why would the higher amplitudes be displayed by TVFLG but not by UVPLT? In both cases, I chose flagver =-1, so no flagging should have been applied when I ran either task.


I'm not sure of the exact answer to your question, but there are lots of ways for TVFLG and UVPLT to give slightly different pictures of your data:

--Is XINC set in UVPLT?
--Are you sure your looking at the same channel in each case, and not averaging channels in either case?
--TVFLG may be secretly time averaging your visibilities. To make sure that it's not time averaging, find out what your integration time is and input this as DPARM(6). Then, once the data are actually loaded, look at the AVG parameter stated in the bottom left of the tv screen. If it is set to a number greater than 1, than time averaging is occurring. To change this averaging time, click on 'enter smooth time'.

Read more!

Monday, June 7, 2010

Excluding single-channel flux peaks

Reader Linda asks

I'm trying to use the AIPS task BLANK to blank an HI data cube. I am using the method where you blank a convolved version of your cube to exclude flux < 2-3*noise and then use that convolved cube as a filter to blank your original image. With the help of other kind folks, I've got this part worked out. But I would also like to exclude single-channel flux peaks. Does anyone know of a way to ask AIPS to only keep pixels with signal that is above a set level in a specified number of consecutive channels? It seems like using OPCODE = 'FLTW' might be helpful, but my attempts at using this haven't produced anything useful.

I'd really appreciate any help!


Any suggestions?

Read more!

Friday, March 26, 2010

BPLOT is a really cool task


I recently learned about a task in AIPS which is very good for assessing bandpass stability---BPLOT. If you have multiple bandpass solutions, it will plot each one, stacking them one on top of each other as a time sequence. To the left is an example plot from BPLOT. Try it, you'll like it!


Read more!

Getting rid of distracting black lines in TVFLG/SPFLG

Have you ever loaded your data into TVFLG or SPFLG and seen what looks like lots of blank times (manifested as horizontal black lines cutting through your data)?

This is because TVFLG/SPFLG is trying to load your data with a time bin that is not a multiple of your integration time. So---the solution is to set DPARM(6)! Set DPARM(6) to your integration time in seconds; e.g., for GMRT data:


DPARM(6) = 16.7

(or, if you have time averaged your data, set it equal to your averaging time).


Read more!

Tuesday, March 23, 2010

Watch out for the STOKES parameter when plotting (even if you don't care about polarization)

When using the many plotting/flagging programs in AIPS, make sure to check the value of the STOKES parameter before plotting (try help stokes to see the options and select the one appropriate for that data set). Different tasks have different STOKES defaults, so sometimes displaying data in one program results in a totally different plot than in another program because one is including some polarizations the other is not. This particularly can be a problem if you have cross-polarization values you don't care about (yet).



Read more!

Wednesday, March 3, 2010

CVEL bug

I received an email yesterday informing people of a bug in CVEL - that is, if you run CVEL on a data set after SPLIT with an NX table, you are affected! I wanted to post it here in case you're not on the Midnight Job (MNJ) list (which I wasn't). Essentially, CVEL will only shift the first scan to the new velocity axis, while the other scans are not shifted. This bug is explained here. I think the possible fixes are to either run CVEL before SPLIT or to run the midnight job to update your AIPS version and then rerun the new CVEL version on your data.

Read more!

Wednesday, February 17, 2010

CASA guides

Hey! If you're learning CASA, check out this new collection of tips and tutorials that I've been contributing to:
http://casaguides.nrao.edu/

And let me know if you see obvious holes in the documentation there (which is, clearly, still under development).


Read more!

Error in PCAL

Here's a question from Akshaya Rane:

I am doing polarization calibration and while trying to run 'pcal', I have encountered the following error. Does this has to do something with qualifiers?

PCAL 3: TOTAL INTENSITIES MUST BE PROVIDED
PCAL 3: Purports to die of UNNATURAL causes

Any thoughts?

I should add that Eric Greisen says that if you spend an hour trying to figure out something in AIPS, and you can't, you should feel free to email him and ask his help.


Read more!

Thursday, February 4, 2010

AIPS to CASA cheat sheet

So, i've been spending the last couple days learning CASA, and I think the most intuitive way to think about it is in terms of what I would be doing in AIPS. Hence the below table. Most tasks in AIPS have a parallel in CASA, although it's not always a one-to-one transfer.

Update: New and improved as of March 5, 2010:

































































AIPSCASA Purpose
APROPOS taskhelp List tasks with a short description of their purposes
BLCAL blcal Calculate a baseline-based gain calibration solution
BLCHN blcal Calculate a baseline-based bandpass calibration solution
BPASS bandpass Calibrate bandpasses
CALIB gaincal Calibrate gains (amplitudes and phases)
CLCAL applycal Apply calibration to data
COMB immath Combine images
CPASS cpass Calibrate bandpasses by polynomial fitting
DBCON concat Concatenate ''u-v'' datasets
DEFAULT default Load a task with default parameters
FILLM importvla Import old-format VLA data
FITLD importuvfits Import a ''u-v'' dataset which is in FITS format
FITLD importfits Import an image which is in FITS format
FITTP exportuvfits Write a ''u-v'' dataset to FITS format
FITTP exportfits Write an image to FITS format
FRING --- Calibrate group delays and phase rates.
GETJY fluxscale Determine flux densities for other cals
GO go Run a task
HELP help Display the help page for a task
IMAGR clean Image and deconvolve
IMFIT imfit Fit gaussian components to an image
IMHEAD vishead View header for ''u-v'' data
IMHEAD imhead View header for an image
IMLIN imcontsub Subtract continuum in image plane
IMLOD importfits Import a FITS image
IMSTAT imstat Measure statistics on an image
INP inp View task parameters
JMFIT imfit Fit gaussian components to an image
LISTR listobs Print basic data
MCAT ls List image data files
MOMNT immoments Compute moments from an image
OHGEO imregrid Regrids an image onto another image's geometry
PBCOR immath Correct an image for the primary beam
PCAL polcal Calibrate polarization
POSSM plotcal Plot bandpass calibration tables
POSSM plotms Plot spectra
PRTAN listobs Print antenna locations
PRTAN plotants Plot antenna locations
QUACK flagdata Remove first integrations from scans
RENAME mv Rename an image or dataset
SETJY setjy Set flux densities for flux cals
SMOTH imsmooth Smooth an image
SNPLT plotcal Plot gain calibration tables
SPFLG viewer Flag raster image of time v. channel
SPLIT split Write out ''u-v'' files for individual sources
TASK inp Load a task with current parameters
TGET tget Load a task with parameters last used for that task
TVALL viewer Display image
TVFLG viewer Flag raster image of time v. baseline
UCAT ls List ''u-v'' data files
UVFIX fixvis Compute ''u'', ''v'', and ''w'' coordinates
UVFLG flagdata Flag data
UVLIN uvcontsub Subtract continuum from ''u-v'' data
UVLSF uvcontsub Subtract continuum from ''u-v'' data
UVPLT plotms Plot ''u-v'' data
UVSUB uvsub Subtracts model ''u-v'' data from corrected ''u-v'' data
WIPER plotms Plot and flag ''u-v'' data
ZAP rmtables Delete data files



Do you have a favorite AIPS-to-CASA pair? Disagree with any of the above? Let me know in the comments! I'm still learning.

p.s. I'm supposed to be writing CASA documentation for the beginner (e.g., myself), so I doubt this is the last time I will be seeking feedback.

p.p.s. Why is blogger putting this horrific space before my table? I can't get rid of it and it looks fine in the preview. quack. This tip seemed to get rid of it.


Read more!

Plot labels and tick marks

Reader René would like to know about some aesthetic issues in plotting:

I have a question regarding labeling. The LTYPE-parameter (eg. in task 'greys') lets you plot "Label in arcsec or other units from reference pixel". This is just what I need, but it stupidly plots it in degrees instead of arcminutes. Is there a way to change this? (Except transforming the coordinates of the whole image I mean ...)

Also is there a way to adjust the number of ticks to plot? (Add minor and major ticks?)


Read more!

Monday, January 25, 2010

Joining Spectral Line Data with Multiple IFs

Occasionally I've encountered line data that are taken in 4-IF mode - that is, where you have 2 IFs, each tuned to different frequencies, that overlap on their edges. I found these to be a pain to combine the last time I worked with them (in my first Astronomy research project ever!), and they have resurfaced again now.. but I've discovered a much easier solution: UJOIN!

UJOIN takes a data set with 2 IFs tuned to different frequencies (as from 4-IF mode at the VLA), and joined them together. It even deals with re-weighting the overlap regions because now there's more data there! You will want to use UJOIN on data that has already been calibrated (gain AND bandpass).

Here are the inputs:


AIPS 1: UJOIN Converts IFs to additional spectral channels
AIPS 1: Adverbs Values Comments
AIPS 1: ----------------------------------------------------------------
AIPS 1: INNAME ' ' Input UV file name (name)
AIPS 1: INCLASS ' ' Input UV file name (class)
AIPS 1: INSEQ 0 Input UV file name (seq. #)
AIPS 1: INDISK 0 Input UV file disk unit #
AIPS 1: OUTNAME ' ' Output UV file name (name)
AIPS 1: OUTCLASS ' ' Output UV file name (class)
AIPS 1: OUTSEQ 0 Output UV file name (seq. #)
AIPS 1: OUTDISK 1 Output UV file disk unit #.
AIPS 1: CHANSEL *all 0 Begin, end input channels,
AIPS 1: begin output channel each IF
AIPS 1: OPCODE ' ' 'DIFF' to output the vis
AIPS 1: difference in the overlap
AIPS 1: DOWEIGHT 1 0 => delete spectrum if any
AIPS 1: IF or channel is flagged
AIPS 1: < -0.5 => keep data even if
AIPS 1: one of the IFs is flagged
AIPS 1: > 0.5 => delete channel if
AIPS 1: one of the IFs is flagged


The main thing to set is CHANSEL. This is a 6-element array:

chansel(1) - first channel to use from IF 1
chansel(2) - last channel to use from IF 1
chansel(3) - output channel that corresponds to 1st input channel from IF 1 (ugh)
chansel(4) - first channel to use from IF 2
chansel(5) - last channel to use from IF 2
chansel(6) - output channel that corresponds to 1st input channel from IF 2 (ugh again)


The AIPS help file on UJOIN has some helpful information on how to set these values properly, but I will reproduce what I did to set these - it's not completely straightforward.

Using UJOIN on your own data
First, you should apply all your calibrations in SPLIT. Make sure that when you SPLIT off your science source, you keep BIF and EIF set to 0 - this will create a single source file with both IFs.

Then, you will need to figure out the frequency and reference pixel of each of your observations (f_1, p_1, f_2, p_2). I did this by SPLITting each IF off separately from the LINE data and then running IMHEAD on each. You should also record delta_f (from IMHEAD again - this should be the same for each IF). In my case, f_2 was bigger than f_1 - if this is different for you, you'll have some sign differences somewhere and CHANSEL will be in a different order.

Next, figure out if any of the channels in your IFs are on the edges of the bandpass. You will not want to keep these channels as they will add noise into the final, combined UV data. Typically, look at the region where the bandpass is flat-ish, and use that. To find these, you will want to use POSSM to take a quick look at your bandpass solutions for each antenna:


default possm
aparm = 0, 1, 0.7, 1.3, -180, 180, 0, 2, 0, 0
source [bpass calibrator]
solint -1
nplots 9
dotv 1
bpver 0


Find the first and last channels of the flat-ish region for each IF (n_first,1; n_last,1; n_first,2; n_last,2).

Now you can start setting CHANSEL with the first and last channels for IF 1:


chansel(1) = n_first,1 # first channel from flat-ish part of bpass, if 1
chansel(2) = n_last,1 # last channel from flat-ish part of bpass, if 1
chansel(3) = 1 # ichansel(1) goes into output channel 1
chansel(4) = n_first,2 # first channel from flat-ish part of bpass, if 2
chansel(5) = n_last,2 # last channel from flat-ish part of bpass, if 2


Now we move on to chansel(6), which is not nearly as easy as the above part was. Here you have to figure out which output channel corresponds to chansel(4). You'll have to take into consideration all the other ichansel values. Here is the equation I came up with for ichansel(6):



You can find the derivation at the end of this post if you're interested or getting incorrect answers. (As Martha Haynes once said, "You get what you pay for and this is free!")



As a reminder, here's what all of the variables stand for:

n = this is the value for ichansel(6)
f_1,0 = reference frequency of IF 1
f_2,0 = reference frequency of IF 2
delta_f = frequency steps between channels
n_first,1 = first channel of IF 1 used in output
n_first,2 = first channel of IF 2 used in output
p_1 = reference channel of IF 1
p_2 = reference channel of IF 2


Testing that UJOIN did the right thing
You'll probably want to check that this actually worked correctly. The UJOIN help recommends that you use POSSM to check that the spectrum of the phase calibrator is flat.

- First, SPLIT off the phase calibrator separately.

- Next, run UJOIN on this phase calibrator file with the same inputs as for the galaxy.

- Check that the spectrum of the UJOIN data is flat in POSSM:

default possm
aparm 0
solint 0
nplots 0
source [phase calibrator]


This should plot the phase calibrator spectrum with data from all antennas averaged together.


My derivation of the ichansel(6) equation:
To figure this out, I wrote some equations to find the frequency at a given channel (f1, f2):



These tell you the frequency (f_1, f_2) at an arbitrary channel (n_1, n_2) for each IF. f_1,0 tells you the frequency at reference pixel p_1 for IF 1. f_2,0 tells you the frequency at reference pixel p_2, for IF 2. delta_f is the frequency steps between each channel.

Now we can write an equation to for the frequency of the output channels:


We can sub in for f_out,0 because we know what channel we're setting as the first output channel (ichansel 1!), and we know its frequency from the above equation for f_1 (n_1) for IF 1:



Now we want to know what output channel (n) corresponds to the first channel of IF 2 (n_first,2). Where does this occur in f_out?




Now just rearrange that for n!



Read more!

Tuesday, January 19, 2010

TV suddenly red?

Is your TV suddenly mis-behaving and showing everything in red rather than in black and white? Make sure that TVCHAN=1.


Read more!

Friday, January 8, 2010

IBLED error (related to the TV?)

Reader Ruta asks:

hi, i have come across an error message copied below while running task 'ibled' on a single source datafile. whats happening and why am i getting this error..? thanks in advance.
localh> IBLED1: Loading data for baseline 1 - 2
localh> IBLED1: Loading data from ***/12:00:53 to ***/11:54:54
localh> IBLED1: There are 25 valid vis. points on this baseline
localh> IBLED1: Loading AMPLITUDE
localh> IBLED1: with Stokes I chs 1- 1 IFs 1- 1
localh> IBLED1: Displaying pixels 1 to 35
localh> IBLED1: Data range 1.092369E+04 1.093816E+04
localh> IBLED1: VISLAB: ERROR 2 RETURNED FROM IMVECT
localh> IBLED1: IBFOAD: ERROR 2 FROM VISLAB
localh> IBLED1: LOADING ERROR 2 FROM IBFOAD
localh> IBLED1: TELEVISION I/O ERROR 2 FROM SETFRM
localh> IBLED1: Temporary master file to be destroyed
localh> IBLED1: Destroyed 1 extension files of type FC
localh> IBLED1: Destroyed UV image file: catno= 540 disk= 3
localh> IBLED1: Purports to die of UNNATURAL causes
localh> IBLED1: voodoo 31DEC09 TST: Cpu= 1.8 Real= 3 IO= 17

Does anyone have any ideas other than double-checking the parameters to make sure that they are correct?


Read more!

Tuesday, November 10, 2009

Heads Up! Inverted Axes for EVLA-VLA data..

I recently encountered an issue with one spectral line data set observed during the EVLA-VLA transition (like all my other data sets). So far, only this data set in particular is affected, but it could possibly apply to others if you notice this behavior. If you notice rotation that should not be there compared to other images, this may affect you!

Here are the weird things about this data set:

  1. The velocity axis appears to be backwards, but the header seems normal (is, the cdelt3 value in the header is not of the opposite sign).
  2. Compared to other observations of the same galaxy taken in different configurations, the map is rotated by 180 degrees on the plane of the sky, but again, the header seems normal (cdelt1/2 are both normal).
I spent a lot of time trying to figure out the cause of this and originally chalked it up to user error - i.e., something went wrong in the calibration, which gave the phases the opposite sign. Or so I thought.

Well! Turns out it was a bona fide problem with the EVLA transition, which inverted the velocity axis and gave the phase an incorrect sign. This has mostly been corrected in the archive, but is apparently still present in a few, lingering data sets. The fix for this is to use the task "FLOPM" on the data (after SPLIT) with opcode "VLAE".

Voila! Problem solved. Now if I could only get back the three weeks I spent banging my head against the proverbial AIPS wall.

Read more!

IMERG SECRETS

IMERG is a program that combines single dish and interferometer data (see Stanimirovic (2002) for details on the algorithm). In short, this algorithm (also referred to as "feathering") fourier transforms both the single dish and the interferometer data, uses the overlap region in uv space between the interferometer and single dish data to determine a scaling factor for the single dish data, adds the interferometer image and the scaled single dish image in fourier space, and then fourier transforms it back.

IMERG has a couple of extra caveats that the user should be aware of before running:

  • Both images need to be square and the dimensions a power of two.
  • Make very sure there are no blanks in either image. Use REMAG to replace any blanks with zero. Note that OHGEO will blank any region in the transformed image that is outside the boundaries of the original image. One of the signs that you may have some blanks in your image is really small scaling factors (~1e-8).
  • Make sure that the single dish image is big enough, i.e., make sure the galaxy is much smaller than the entire image.

Edit (11/13/09): As far as I can tell, IMERG does absolutely no checking that the two images have the same axes, so beware and double check that both images are the same. Also the beam that gets put in the resulting image is the single dish beam, not the interferometer beam. Use ADDBEAM to change.


Read more!

Friday, November 6, 2009

Multi-frequency synthesis in AIPS?

(Edited based on re-reading the documentation this morning.)

Does any one here have experience with multi-frequency synthesis in AIPS? I've got a WSRT data set with 8 continuous IFs each with 64 channels. I'm currently setting

bif=1; eif=8
bchan=2; echan=50; nchav=49

in IMAGR.

I was going to run it through self-calibration as usual.(See the following post for details.) Is there anything else I need to do?

[Edited 11/11/09: See Michael Rupen's comment on this post for the answer.]


Read more!

Friday, September 25, 2009

"Air Mass Chart" for Radio Observations?

A question that has plagued me for quite some time, as I prepare my EVLA proposal:
Do you all know of a tool to find the rise/set times and elevations of radio sources? My favorite tool for seeing the trajectory of an object through the sky is 'airchart' in IRAF, but unfortunately IRAF assumes you are an optical astronomer and only tracks your sources through the nighttime. Anyone know of something similar for all 24 hours? (the GMRT has one, but it assumes the GMRT's latitude, which is rather different than the VLA's).


Read more!

Monday, September 14, 2009

Combining VLA Spectral Line Data with Different Channel Spacings: a Solution!

I remember thinking about this briefly in a post further down, and neither Amanda nor I could come to a good solution without resorting to Miriad. After running into the problem myself and spending a lot of time dealing with AIPS, I think I've come to a solution.

Caveat: this is only valid for combining VLA data with other VLA data. I don't think it will work with ATNF/GMRT + VLA data, but I haven't tried.

I managed to fix this problem in the case of VLA data with a combination of UVCOP, SPECR, and CVEL. Basically, it works because the VLA correlator setup is all multiples of two. In general, if you have a data set with twice as many channels, it has half the channel spacing. This is not always true due to an observer's ability to set up IFs in different ways, but the channel spacings should always differ by some power of two.

Now for the solution(s).

For example, imagine you have spectral line data set A with 127 channels and spacing of 6.1 kHz, and data set B with 255 channels and spacing of 3.05 kHz. (The extra channel from each needed to make a power of two is the Channel 0 data set. So you really only have 127 instead of 128 and 255 instead of 256 channels.) Effectively, you will have to either double the channel spacing of data set B, or half the channel size of data set A.

In order to DBCON, you will need to jump through many AIPS hoops in order to make sure that both data sets have:
- the same number of channels
- the same spectral resolution
- the same frequencies assigned to the same channels

To degrade the high-resolution data:
- First, you will need to use UVCOP to chop off one channel in data set B, so an integer number of channels in SPECR will give you the correct velocity resolution. It shouldn't matter if you chop one off from the beginning or from the end, as these are generally line free.

- Next, use SPECR to regrid data set B to the proper channel spacing. In this case, you will want a channel spacing of 6.1 kHz. This means that you need to tell SPECR to regrid to half as many channels. Each new channel has twice the original channel spacing. In this case, you will tell SPECR to use npoints 127, which is conveniently half of 254.

- Now run CVEL on both data sets. The correct inputs are described at the bottom of this guide. The main APARM values to set are:

aparm(1) = [velocity in m/s to be assigned to..]
aparm(2) = [..this channel number]

Essentially, you have regridded both of your data sets to a system where the given velocity is assigned to the given channel. It may spit out a lot of errors saying that it is shifting the channels by many km/s, but as long as the same channels in both data sets correspond to the same velocities, you're set.

- Run UVCOP to chop off additional channels if necessary. In this case, the data sets should be the same, but depending on correlator settings, you may have to chop off additional channels. This time, always chop them off from the end, because you have regridded your data so that the first channels in the set line up with the first channels in the other data set.

- Run DBCON to combine both data sets. DBCON will shift RA and Dec as long as the pointing centers aren't vastly different.

To oversample the low-resolution data:

- Use SPECR to regrid data set A to 254 (NOT 255) channels. This will effectively chop your channel width in half, so it matches data set B. You will deal with the fact that both data sets have a different number of channels in a few steps, so don't worry.

- Use CVEL to assign the same frequency to the same channel for both observations. This will shift each spectrum in frequency/channel, but will not resize the channel spacing. More instructions for using CVEL are at the bottom of the guide. The important inputs are:

aparm(1) = [velocity in m/s to be assigned to..]
aparm(2) = [..this channel number]


Essentially, you have regridded both of your data sets to a system where the given velocity is assigned to the given channel. CVEL may spit out a LOT of errors telling you that you are shifting your channels by a lot, but as long as your galaxy shows up in the same channels in both datasets, you should be okay.

- use UVCOP to chop off additional channels. Data set A (after SPECR) has 1 fewer channel than data set B. Fix this by chopping off the last channel of data set B using UVCOP. Set BCHAN 0 and ECHAN 254.

- Use DBCON to combine data set A (after SPECR + CVEL) and data set B (after CVEL + UVCOP). It should shift the RA and Dec of the one of the data sets unless they have vastly different pointing centers.


Now for something completely different (aka additional notes):

Occasionally you will have to chop off more channels from data set A, depending on your correlator set up for both observations. The key point is to make sure that both data sets have the same number of channels with the same channel spacing and the same velocity definition (e.g., channel 52 = -50 km/s).

And now some info on running CVEL. In some of our observations, we did not use Doppler tracking (Oh, EVLA, you'll be awesome one day), so we also had to tell CVEL the rest frequency of our HI line so it could calculate gas velocity. You may not need all of these inputs, but here's how I had to set the APARM values, which is really the meat of CVEL:

aparm -50000 52 1 0 1.420e09 5752 1 0

What does this mean? Well!


aparm(1) = -50000
aparm(2) = 52


Together these two values shift the spectrum so that a velocity of -50000 m/s lines up with channel 52. This will be different for each galaxy - in our case, it's a galaxy with a systemic velocity of -50000 m/s (NGC 404 in fact).


aparm(3) = 1
aparm(4) = 0


These set the velocity definition. The first sets the reference to heliocentric velocity, and the second tells AIPS to use the optical definition.


aparm(5) = 1.420e09
aparm(6) = 5752


This sets the rest frequency of your line in GHz. AIPS does not have enough precision for all the significant figures, so you have to use two APARM values. If you're working with something other than HI, I recommend reading the help file to figure out how to input your frequency.


aparm(7) = 1


This is set to 1 for VLA data.

Read more!