BoA Template Documentation
SCRIPT #1
Kindly provided by Dr. Thomas Stanke (ESO)
As soon as you unpack the file template_boa.tar.gz, you will see the next configuration:

This, it will create two subdirectories: raw and boa. Within boa, it will create two more subdirectories: reduced and calib. Then copy your raw data to the 'raw' directory.
Important: The first thing you have to do is to change the names of the raw data files back to their original names containing the scan numbers. There's a little script to do that called: arc2orig.sh, and then you can run BoA.
account:> cd boa
account boa:> boa
There are a bunch of macros and calibration files, some of which you will have to modify to your local stuff. Most of the things you will have to change are in the YOURSOURCE_parameters.boa macro. Mainly, you'll have to update the 'PROJDIR' variable, the scan list and few more parameters neccesaries for adjusting to your project. Edit YOURSOURCE_parameters.boa and change them according to your needs.
Other macro routines:
- YOURSOURCE_main.boa is the 'master' macro, from which all the other macros are called. It has set it up for an iterative data reduction (each new reduction uses a source model from the previous round to improve the performance mainly on extended structures).
- YOURSOURCE_start.boa sets a few general things, and calls:
YOURSOURCE_parameters.boa sets a number of things specific to the target you are working on (e.g., scans to use, map boundaries; which rcp file to use; a list of bad bolometer channels (which it is better to have explicitly listed somewhere in the reduction rather than just relying on the list of bad channels from the APEX Laboca receiver parameter webpage, you have to update this list to reflect the state of the array when your data were taken).
- red_scan_n.boa is the real reduction macro, with 'n' standing for the iteration.
- comb_n.boa does the combination of individual scans and produces the source model for the next iteration.
It needs a YOURSOURCE_edge.pol polygon which is used to mask low coverage (high rms) regions at the edge of the map. You have to create this polygon the first time you get to try to run the comb_1.boa...
* Things to be updated for the next iteration:
in red_scan_n.boa:
- base(order=2, subscan=0) (degree of baseline can be set higher; if you set subscan=1 it will subtract the baseline subscan by subscan rather than on the entire scan; don't set the baseline order too high if you use subscan=1)
- nbloop=2 can be set higher (in medianNoiseRemoval, correlbox, correlgroup) - more brutal despiking - you may also want to try out the other skynoise removal algorithms, but there is not much experience with those...
in comb_n.boa:
- SMOOTHBY = 12./3600. (you should somewhat reduce the smoothing applied in higher iterations to get point sources modeled better; e.g., reduce the Size by 1 arcsec in each iteration)
* Concerning flux calbration:
You need a Laboca_opacities.dat file which contains tau values from skydips; you can either download one here, calibration web page or make one yourself. You also need a LabocaCalibratorsForBoA.dat file which contains corrective factors to the flux calibration obtained from observations of flux calibrator sources (which you can also downloaded from here, (same webpage), or make one yourself - but make sure that you either use BOTH from the webpage or BOTH made yourself, to make sure you did things consistently).