1. casa
  2. casa6

Source

readme.md

CASAtasks

CASAtasks is a self-contained python module that provides the tasks from the CASA project. This package depends on the CASAtools python module being found in your PYTHONPATH at build time and runtime. The CASAtasks are stateless routines and recipes built on CASAtools.

Building CASAtasks

Install Dependencies

First make sure that the version of Python you want to use is available. MacPorts has been used to successfully install Python 3.6 on OSX. On RedHat, the Software Collections has been used to install Python 3.6.:

-bash-4.2# yum install rh-python36
-bash-4.2# yum install rh-python36-numpy
-bash-4.2# yum install rh-python36-scipy
-bash-4.2# yum install rh-python36-python-tkinter

Unfortunately, Software Collections does not supply an RPM for matplotlib. For installing matplotlib, pip can be used:

-bash-4.2# pip install matplotlib

Environment changes are required to enable python 3.6. I have something like this in my ~/.profile:

if [ -e /opt/rh/rh-python36/enable ]; then
   source /opt/rh/rh-python36/enable
fi

but you could also just source this in the shell where you will use pip and build CASAtasks.

Second build and install CASAtools using your choice of Python and the instructions found here.

Checkout

Checkout the casa6 source code:

-bash-4.2$ git clone -q --recursive https://open-bitbucket.nrao.edu/scm/casa/casa6.git

Build

After all of the dependencies have been installed and the source code for CASAtasks is available we can build CASAtasks. Make sure that =which python= returns the version of python that was used to build CASAtools. Then build the tasks with:

-bash-4.2$ cd casa6/casatasks
-bash-4.2$ PYTHONPATH=../casatools/build/lib.macosx-10.12-x86_64-3.6 ./setup.py build

Substitute the path to your build of CASAtools in the build line above.

Run Available Tests

Similar to the procedure for setting up testing of CASAtools, you can get the test data for CASAtasks by running:

-bash-4.2$ git show HEAD:almatasks-tests | bash

in the root directory of a sparse checkout of the CASA data repository (the procedure for getting a sparse data repository is described in the testing section of CASAtools).

Tests are actively being added, but you can run the existing tests with:

-bash-4.2$ PYTHONPATH=../casatools/build/lib.macosx-10.12-x86_64-3.6 ./setup.py test

Again, substitute the path to your build of CASAtools in the line above.

Available Tasks

Task NameDescription
accorNormalize visibilities based on auto-correlations
accumAccumulate incremental calibration solutions into a calibration table
applycalApply calibrations solutions(s) to data
asdmsummarySummarized description of an ASDM dataset.
bandpassCalculates a bandpass calibration solution
blcalCalculate a baseline-based calibration solution (gain or bandpass)
calstatDisplays statistical information on a calibration table
clearcalRe-initializes the calibration for a visibility data set
clearstatClear all autolock locks
concatConcatenate several visibility data sets.
conjugatevisChange the sign of the phases in all visibility columns.
cvel2Regrid an MS or MMS to a new spectral window, channel structure or frame
cvelregrid an MS to a new spectral window / channel structure or frame
delmodDeletes model representations in the MS
exportasdmConvert a CASA visibility file (MS) into an ALMA or EVLA Science Data Model
exportfitsConvert a CASA image to a FITS file
exportuvfitsConvert a CASA visibility data set to a UVFITS file:
featherCombine two images using their Fourier transforms
fixplanetsChanges FIELD and SOURCE table entries based on user-provided direction or POINTING table, optionally fixes the UVW coordinates
fixvisRecalculates (u, v, w) and/or changes Phase Center
flagcmdFlagging task based on batches of flag-commands
flagdataAll-purpose flagging task based on data-selections and flagging modes/algorithms.
flagmanagerEnable list, save, restore, delete and rename flag version files.
fluxscaleBootstrap the flux density scale from standard calibrators
ftInsert a source model as a visibility set
gaincalDetermine temporal gains from calibrator observations
gencalSpecify Calibration Values of Various Types
hanningsmoothHanning smooth frequency channel data to remove Gibbs ringing
imcollapseCollapse image along one axis, aggregating pixel values along that axis.
imcontsubEstimates and subtracts continuum emission from an image cube
imdevCreate an image that can represent the statistical deviations of the input image.
imfitFit one or more elliptical Gaussian components on an image region(s)
imheadList, get and put image header parameters
imhistoryRetrieve and modify image history
immathPerform math operations on images
immomentsCompute moments from an image
impbcorConstruct a primary beam corrected image from an image and a primary beam pattern.
importasapConvert ASAP Scantable data into a CASA visibility file (MS)
importasdmConvert an ALMA Science Data Model observation into a CASA visibility file (MS)
importatcaImport ATCA RPFITS file(s) to a measurement set
importfitsConvert an image FITS file into a CASA image
importfitsidiConvert a FITS-IDI file to a CASA visibility data set
importgmrtConvert a UVFITS file to a CASA visibility data set
importmiriadConvert a Miriad visibility file into a CASA MeasurementSet
importnroConvert NOSTAR data into a CASA visibility file (MS)
importuvfitsConvert a UVFITS file to a CASA visibility data set
importvlaImport VLA archive file(s) to a measurement set
impvConstruct a position-velocity image by choosing two points in the direction plane.
imrebinRebin an image by the specified integer factors
imreframeChange the frame in which the image reports its spectral values
imregridregrid an image onto a template image
imsmoothSmooth an image or portion of an image
imstatDisplays statistical information from an image or image region
imsubimageCreate a (sub)image from a region of the image
imtransReorder image axes
imvalGet the data value(s) and/or mask value in an image.
initweightsInitializes weight information in the MS
listcalList antenna gain solutions
listfitsList the HDU and typical data rows of a fits file:
listhistoryList the processing history of a dataset:
listobsList the summary of a data set in the logger or in a file
listpartitionList the summary of a multi-MS data set in the logger or in a file
listsdmLists observation information present in an SDM directory.
listvisList measurement set visibilities.
makemaskMakes and manipulates image masks
mstransformSplit the MS, combine/separate/regrid spws and do channel and time averaging
partitionTask to produce Multi-MSs using parallelism
plotantsPlot the antenna distribution in the local reference frame:
plotweatherPlot elements of the weather table; estimate opacity.
polcalDetermine instrumental polarization calibrations
polfromgainDerive linear polarization from gain ratio
predictcompMake a component list for a known calibrator
rerefantRe-apply refant to a caltable
rmfitCalculate rotation measure.
rmtablesRemove tables cleanly, use this instead of rm -rf
sdbaselineFit/subtract a spectral baseline
sdcalMS SD calibration task
sdfitFit a spectral line
sdfixscanTask for single-dish image processing
sdgaincalMS SD gain calibration task
sdimagingSD task: imaging for total power and spectral data
sdsmoothSmooth spectral data
setjyFills the model column with the visibilities of a calibrator
simalmaSimulation task for ALMA
simanalyzeimage and analyze measurement sets created with simobserve
simobservevisibility simulation task
slsearchSearch a spectral line table.
smoothcalSmooth calibration solution(s) derived from one or more sources:
specfitFit 1-dimensional gaussians and/or polynomial models to an image or image region
specfluxReport spectral profile and calculate spectral flux over a user specified region
specsmoothSmooth an image region in one dimension
splattotableConvert a downloaded Splatalogue spectral line list to a casa table.
splitCreate a visibility subset from an existing visibility set
spxfitFit a 1-dimensional model(s) to an image(s) or region for determination of spectral index.
statwtCompute and set weights based on variance of data.
tcleanRadio Interferometric Image Reconstruction
uvcontsubContinuum fitting and subtraction in the uv plane
uvmodelfitFit a single component source model to the uv data
uvsubSubtract/add model from/to the corrected visibility data.
virtualconcatConcatenate several visibility data sets into a multi-MS
visheadList, summary, get, and put metadata in a measurement set
visstatDisplays statistical information from a MeasurementSet, or from a Multi-MS
widebandpbcorWideband PB-correction on the output of the MS-MFS algorithm

Add shortcut

Everything looks good. We'll let you know here if there's anything you should know about.