SMA users are encouraged to make their own routines for special needs in the reduction of SMA data. The routines can be integrated into Miriad if the programming rules in Miriad are followed. For example:
The system variable $MIR is assumed to be defined as the path to the ordinary Miriad . One can do Pre-Compiling using ratty and checks source-code using flint:
flint -I $MIRINC smaprog.for ratty -b -s -I $MIRINC smaprog.for smaprog.f
ratty converts certain language extensions used in the original Miriad codes into standard FORTRAN. The command line flags are recognized as:
-b If this flag is given, every backslash in the input is converted to two backslashes in the output. This is useful when the target compiler treats backslash as an ``escape character''. -I The string following this flag indicates an alternate directory to search for include files. -s The string following this flag indicates the target compilers.
Don't forget to modify the inline documentation which is usually placed in the beginning of each program and then make an inline doc file:
After editing the code, one can export the source code smaprog.for to $MIRSRC/prog/sma and the documentation code smaprog.doc to $MIRDOC/prog.
To compile the code and export the executable code, one can get an example of script and Makefile (smaprog.csh and make_smaprog) from Miriad Test Codes for SMA Specifications
and change the code name in the script to match your code. Then run the script. An example of code-compiling scripts is given in smaprog.csh.