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:

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.


amanda said...

Hi Laura,

Thanks for this list.

Several things that I noticed with CASA are
-- that, unlike AIPS, task 'taskname' doesn't work to change tasks. You can use inp 'taskname' to change tasks without changing the defaults.
-- the commands tasklist and taskhelp are good for figuring out what tasks CASA has.
--The logger at least on the last release is icky. I usually open CASA with casapy --nologger and then do a tail -f -n 1000 casapy.log to see the log messages.
--Scripting is easy because you can do it in Python. I like this Python tutorial.

amanda said...

P.S. I think I fixed the big space problem. I added a link to the fix in the post.

Anonymous said...
This comment has been removed by a blog administrator.
Laura said...

Thanks, Amanda! You rock!

Anonymous said...
This comment has been removed by a blog administrator.
Anonymous said...

Hi Laura,

Here's some tweaks for your list:

AIPS casapy
---- ------
prtan plotants
apropos tasklist
fitld importuvfits, importfits
fittp exportuvfits, exportfits
uvfix fixvis

Everything should be lowercase for the casapy column.

Rob Reid said...

That last comment was from me...NoScript anonymized it.

Laura said...

Hey Rob! Thanks for your comments and suggestions! I've improved the table to incorporate them.

Anonymous said...

I am trying to copy a VLA split uv data set from AIPS to CASA because I want to image it interactively in CASA. But when I use importuvfits, I get the following message:
Found Binary table of type AIPS NX following data
Skipping table, duplicate or unrecognized type
Found Binary table of type AIPS OF following data
Skipping table, duplicate or unrecognized type

Leap second table TAI_UTC seems out-of-date.

Until table is updated time and coordinates derived by UTC could be wrong by 1s or more.

It seems to recognize AN and FQ tables but not others. So, how do I copy other tables?