SMA Technical Memo #166 (Draft)

Subject:  MIRIAD for SMA -
A single distribution for handling data produced from generations of SMA correlators: SWARM, hybrid ASIC+SWARM, ASIC-4GHz and ASIC-2GHz
Date: July 21, 2017$
From: Jun-Hui Zhao (SAO)
$Updated from the versions since June 21, 2016

1. Introduction -

Since the spring 2004, SMA has joined the Miriad[1] devlopment to support SMA data reduction. Over the past decade, the SMA frontend and correlator have been upgraded in order to confront with the cutting edge technology. Three remarkable major upgrades in correlators and online software that the SMA has gone through or been going through in addition to early testing efforts are: (i) ASIC single bandwidth (2 GHz), (ii) ASIC doubled bandwidth (4 GHz) and (iii) SWARM wideband. A size of SMA data set produced from a full-observing track has been increased from ~2 GB to ~100 GB, as the SMA upgrading from the ASIC single bandwidth correlator to a hybrid correlator with ASIC doubleband and two quadrants of SWARM band at the time when this Memo is written. The data size will be doubled when the SWARM is fully implemented. The SMA will potentially expand to a wider bandwidth in the future.

The Miriad distribution of Miriad-SMASD described in this memo intends to deliver an offline software package to cover the reduction of interferometer data produced from generations of SMA correlators over the past decade as well as new hardware upgrade in the future.
































Figure 1 - the software architecture of the Miriad-SMASD, consisting two major developed blocks: build-sma2G/build-sma4G and build-smaWB. The sub-blocks marked with grey characters under the developing block SWARM+ASIC in which we are implementing more features and algorithms for handling SMA wideband data. The routines developed for handling hybrid ASIC+SWARM and SWARM correlator data have been placed there.

In addition, the platform provided with Miriad-SMASD can also be used as the testing bench in the further development of new algorithms for the reduction of wideband data produced from the future SMA. The software facility provided for imaging spectral line data appears to be excellent. Implementation and development for continuum imaging are needed for wideband data. Meanwhile, Miriad supports exporting calibrated data to the CASA of the NRAO for imaging.



2. Architecture -

Figure 1 shows the software architecture of the Miriad-SMASD package. Three developed components of the software, i.e. build-sma2G, build-sma4G, and build-smaWB, have been configured into a single distribution for SMA users. The former two contain both the source and binary codes, which are needed for the reduction of historical data archived in the SMA data system. During the transition period between November 15, 2014 and November 15, 2016 before the SMA operation with SWARM-only correlator, the Miriad-SMASD is subject to frequent updating for implementing the patches and new programs to match the data produced from the hybrid configuration of ASIC and SWARM correlators. During this period, the ASIC correlator runs into a maintance issue, and the internal data structure appears to be subject to frequent changes caused by reconfiguring spectral structure in online software due to failures of ASIC crates.


3. Environment -

The current Miriad-SMASD is only supported in Linux OS Redhat 6 or CentOS 6 and higher versions. Three C-shell scripts, i.e. miriadWB.csh, miriad4G.csh and miriad2G.csh, are provided in the distribution. The script miriadWB.csh provides the environmental setting for running the specific block of code build-smaWB to reduce the SMA data produced from the SMA observations operated since November 15, 2014 with various observing modes, ASIC only, hybrid ASIC+SWARM, SWARM only and etc. The SMA data taken during this period of observations are packed into a new format by the data collecting software online.

The data taken in the period before November 15, 2014 were in the old format. To reduce the old SMA data in Miriad, one must use routines provided in either build-sma2G for single band ASIC data taken before November of 2009 or build-sma4G for the double band data taken before November 15, 2014. The scripts miriad2G.csh or miriad4G.csh can trigger an appropriate script to set environmental variables for running build-sma2G or build-sma4G, respectively. Users must be aware of what observing dates of the SMA data that they are going to reduce. Using a corresponding script provided in the Miriad-SMASD, users can set up environemental variables for the reduction of SMA data taken in the three specific periods SMA-2G, SMA-4G and SMA-WB, see Table 1 in Appendix A1.


4. Version identification -

Over the years, many Miriad versions have been distributed around; many of them have been out of date, which do not match SMA specifications. The Miriad-SMASD provides its own identifications. The subdirector 'miriad-SMASD/' containing the code in the Miriad-SMASD distribution is recommended to place under user's home director. If 'miriad-SMASD/' is located elsewhere, say '/usr/local/miriad-SMASD/', one needs to make a symbolic link:


ln -s /usr/local/miriad-SMASD ~/miriad-SMASD

One must make appropriate environmental setting for the specific Miriad-SMASD block corresponding to the SMA data produced from a given period.

Finally, users must disable environment settings from other versions of Miriad to avoid any possible conflicts in using an appropriate Miriad for their reduction of SMA data. We note that only C-shell (csh or tcsh) scripts for the environment setting have been developed; we are also considering implementations of the corresponding Bourn-shell (sh) scripts in near future.


Appendix -



Reference -
[1]Sault, R. J., Teuben, P. J., & Wright, M. C. H. 1995, in ASP Conf. Ser. 77,
     Astronomical  Data  Analysis  Software  and  Systems  IV,  ed.  R.  A.  Shaw,
     H. E. Payne, & J. J. E. Hayes (San Francisco, CA: ASP), 433 

[2]A Step-by-Step Procedure -
    https://www.cfa.harvard.edu/sma/miriad/miriad4sma/stepbystep.html

[3]Data Reduction Scripts -
    https://www.cfa.harvard.edu/sma/miriad/spec/SMAscripts/