Skip to content

tetarenk/AstroCompute_Scripts

 
 

Repository files navigation

AstroCompute CASA Scripts

A collection of python scripts to create high time resolution light curves from calibrated interferometric data sets. These scripts run in the Common Astronomy Software Application (CASA) and have been tested with VLA, ALMA, SMA, ATCA, and NOEMA data sets.

Importing data into CASA

  • VLA: Can be directly imported into CASA, and downloaded from the archive in CASA format.
  • ALMA: Can be directly imported into CASA, and downloaded from the archive in CASA format.
  • SMA: Can be imported into CASA with a little extra work. Follow instructions here on converting to a CASA MS data set.
  • NOEMA: Must be calibrated beforehand, but can be imaged in CASA. Follow instructions here for converting to a CASA MS data set.
  • ATCA: Can be directly imported into CASA. Follow instructions here on converting to a CASA MS data set.

Requires

  • CASA (get it here, scripts are tested up to version 5.4)
  • The following python packages need to be installed within CASA; jdcal, astropy, astroML
    For importing python packages into CASA (detailed instructions),
casa --no-logger --log2term -c "from setuptools.command import easy_install; easy_install.main(['--user', 'pip'])"
casa --no-logger --log2term -c "import pip; pip.main(['install', 'astropy', '--user']); pip.main(['install', 'astroML', '--user']); pip.main(['install', 'jdcal', '--user'])"
  • analysisUtils (get it here)
  • (optional) For UV plane fitting, uvmultifit (get it here)
  • (optional) To use object detection, you need the aegean package (see here)
casa --no-logger --log2term -c "import pip; pip.main(['install', 'git+https://github.com/PaulHancock/Aegean.git', '--user'])"

To make your own high time-resolution lightcurves you will need:

  1. casa_timing_script.py: intended to be run within CASA. This is the script that does all the hard work.
  2. param.txt: All input parameters are set in this parameter file. A complete description of each parameter is provided in param_description.txt.
  3. utils.py: module of tools.
  4. (optional), Aegean_ObjDet.py: object detection algorithm.
    • Integrated into the timing script, but can also be run on its own, with a fits image as input. Output is a labelled image and region files (DS9 and CASA format) of detected sources.

How to use the scripts:

casa -c casa_timing_script.py [path_to_param_file] [path_dir] [path_to_repo]
  • All MSs need to be in path_dir/data, all output goes into path_dir/data_products (directory created by script).
  • Make sure to include trailing / in all directory names.
  • Please create a split MS, with only the target present.
  • All parameters need to be carefully considered and changed for each new data set.
  • If you have a complicated field with other sources it is recommended that you use your own mask file (with clean boxes around bright sources; mask_option='file') for cleaning, or run object detection, which will create a mask file with a boxed region around each detected source (mask_option='aegean').
  • If you are using an outlier field file, please follow the example template in example_outlier_file.txt.
  • If you are doing uv-fitting, please follow the example initial parameters template in uv_init_example.txt.
  • The option to run basic variability analysis is included (var_anal='T'):

Support from the SKA/AWS AstroCompute in the Cloud Program

About

CASA timing scripts for high time resolution analysis of interferometric data sets

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 89.6%
  • HTML 10.4%