The RTDC
Processing SMA Data
1.2 m Telescopes
AST/RO
Extra

SMA Data Reduction with MIRIAD


MIRIAD introduction

MIRIAD (Multichannel Image Reconstruction, Image Analysis, and Display) is a command line based software package, originally developed to handle data from the Hat Creek (BIMA) telescope. It is an open source package, and at the CfA several SMA-specific tasks have been added to allow the reading, calibration, and imaging of SMA data.

We recommend using MIR for calibration and MIRIAD for imaging only.

If you plan to read raw SMA SWARM data into MIRIAD you will need to run it through a pre-processing script as the first step. MIRIAD has a number of problems reading SWARM data, so this step will identify any known issues with the data structure, fix them and convert the data into MIRIAD format for further processing. If this step fails you should email smamiriad@cfa.harvard.edu and a patch will be created for your data.


From outside the CfA

You can find information for users outside the CfA here. If you need full access to MIRIAD to reduce your data we recommend requesting a guest account so you can access the latest version of the software.


Getting started on the RTDC

  1. Source the MIRIAD setup scripts. The version you source depends on the age of of your data. For 4 chunk SWARM data (with or without ASIC) use

    $ source /home/miriad/miriad_WB/automiriad.csh

    For a full list of the available versions see this link.

  2. Run the data through a pre-processing script. If this returns an error you should email smamiriad@cfa.harvard.edu or file a bug report.

    As of the end of 2017 around 50% of data requires a patch before it can be processed with MIRIAD. This memo describes recent tests and highlights the errors and warnings you may encounter.

    Run the pre-processing script in tcsh by giving the directory name, the receiver (230/240/345/400), and an optional path to the data. If a path is not provided, it is presumed the data directory is in your current working directory. E.g.

    $ swarmDRXload_rtdc.csh 170101_011530 230

    Note: this _rtdc version of the pre-processing script does the same as the one provided on the MIRIAD webpage, except you can supply the filename and receiver as arguments instead of having to edit the file.

    On this MIRIAD page you can find an the pre-processing script for ASIC + SWARM hybrid data.


Rechunking data

The pre-processing scripts do not reliably support SMA data that has been rechunked with SMARechunker. It may work if the data structure was unaffected but this is not always the case.

MIRIAD does not have the same memory requirements as IDL, so it is possible to load full resolution SWARM data sets. Pre-processed data can then be rebinned within MIRIAD using the uvaver task.


A note on running MIRIAD

After sourcing the relevant MIRIAD file you can run MIRIAD commands from a normal shell. You do not need to type miriad and enter the MIRIAD environment as you do with IDL.


Useful MIRIAD commands

  • uvindex - checks the header content of a dataset and outputs a list for each integration, frequency, source and polarization state.
  • uvlist - checks the actual visibility.
  • uvplt/smauvplt - checks fringes in a GUI (sma option included color coding by source).
  • uvspec/smauvspec - checks spectra in GUI (sma option included color coding by source).
  • prthd - looks at the header information and reports the first frequency configuration detected.
  • uvcat - concatenates and copies uv datasets.
  • uvaver - performs spectral binning for a single frequency configuration. Can extract a subset of the data.
  • smafix - applies system temperature corrections.
  • fits - exports SMA data to uvfits. This can handle multiple sources but you may encounter problems when reading the output into CASA. We recommend running it source by source then recombining the sources in CASA.

Sample calibration and imaging scripts

Find some example reduction scripts for SMA data at the external links below:


MIRIAD links


Getting help

Email smamiriad@cfa.harvard.edu with questions.
File a MIRIAD bug report.

CENTER FOR ASTROPHYSICS | HARVARD & SMITHSONIAN
60 GARDEN STREET, CAMBRIDGE, MA 02138