Analysis Utilities (or analysisUtils for short) is a small set of Python source code files that provide a number of analysis and plotting utilities. The utilities were developed for ALMA data reduction and are, in many cases, also useful for EVLA data reduction. This CASA Guide documents some of the most useful functions contained in the analysisUtils Python module from a user's perspective.
If you are working on a machine at NRAO Charlottesville, Socorro, or Santiago, then you can skip Step 1, because the latest modules are already available at: /users/thunter/AIV/science/analysis_scripts.
Step 1: Download Analysis Utilities from here and extract the tar ball. From a Unix command line this can be done with
$ tar xvf analysis_scripts.tar
Seven files will be extracted -- a README file, and six python scripts. The README file contains the time and date that the tar ball was generated, which can be useful for reporting bugs. The history file available at the ftp site contains a list of major changes in each version.
Step 2: Edit your existing casapy initialization file in $HOME/.casa/init.py or create a new empty file if it does not already exist, and add the following
import sys sys.path.append("/PATH_TO_ANALYSIS_SCRIPTS") import analysisUtils as au
where /PATH_TO_ANALYSIS_SCRIPTS is the path to the directory you just extracted from the tar ball. When this is done, start casapy and you will have access to all the functions contained in the analysisUtils module.
For help with analysisUtils submit a helpdesk ticket to the CASA department of https://help.almascience.org/. If your question is with regard to plotbandpass, then please provide the version number of this program (it is printed at execution time). In all cases, please provide the release date of your analysisUtils, which can be viewed from inside casapy as follows:
- a faster version of plotcal for bandpass tables, with useful overlay capabilities
- change the intents for a specified field in an ms (based on John Lightfoot's pipeline script)
- returns a dictionary of the baseline lengths in your ms, by default sorted by length
- lists the range of LST, UT, MJD for the whole ms, and for scans with OBSERVE_TARGET intent (including the elevation range)
- prints the antenna station coordinates in local offsets from the Center of Array, and computes longest/shortest baselines
- contacts the JPL Horizons telnet service and returns the J2000 position and velocity of a solar system object
- plot any standard telescope configuration of observatories known to casa, and return an array of the sorted baseline lengths
- shows relative location of pointings in an .ms
- plot weather conditions vs. time for your ms
- smooths an existing bandpass table with options for window length and type (Ed Fomalont)
- performs a least-squares fit to the multi-spw output from fluxscale
- compute the total time spent integrating on-source for each specified field