CS1 Calibration
Step 1: Read MS into aips++ imager and then close (e.g., myimg := imager('data.MS'). This creates columns in the MS needed by MeqTrees.
Step 2: Flag data
Step 3: Run the calib script:
http://lofar9.astron.nl/websvn/filedetails.php?repname=Timba+svn&path=%2Ftrunk%2FTimba%2FWH%2Fcontrib%2FSBY%2FCS1calib%2Fcalibrate.py&rev=4940&sc=1
You can try the advanced calibration script with MMSE correction and several post-correction flagging steps:
http://lofar9.astron.nl/websvn/filedetails.php?repname=Timba+svn&path=%2Ftrunk%2FTimba%2FWH%2Fcontrib%2FSBY%2FCS1calib%2Fpeel0_mmse.py&rev=4981&sc=1
I have added the complete pipeline code to svn. For first time users of CS1 data, I recommend running the pipeline instead of using the aforementioned scripts. You can get the code from Timba/WH/contrib/SBY/CS1calib/pipeline.
FAQ
Some problems one might experience and some solutions (these might not necessarily be correct)
1. Errors caused by not being able to find global_model.py:
Download global_model.py
include in the script:
import sys
sys.path.append('/directory/where/globalmodel/resides/')
before import global_model.py
2. Errors caused by not being able to find global.txt:
make sure that global.txt is in the directory you are running MeqBrowser from
3. MeqServer suddenly quits about half a minute after you began the calibration run
Cause: you did not create the tables "CORRECTED" and "MODEL" (I am not sure the second one is really necessary), so repeat the process of reading the measurement set into AIPS++ and check in the log that the tables CORRECTED and MODEL are created.
To fill up missing columns you can also do something like:
include 'tables.g'
t:=table("XXX.MS",readonly=F)
orig_data := t.getcol("DATA")
t.putcol("CORRECTED_DATA", orig_data)
t.putcol("MODEL",orig_data)
t.flush()
t.close()
Note that if using this code MODEL data is set equal to OBSERVED data. If using the imager code (see step 1) AIPS++ will set the MODEL data equal to unity; it is just a matter of conventions and should not influence your calibration.
4. There is nothing to see when you image the corrected data:
Make sure you are writing and reading from the same source. The script allows to write out a BOIO file instead of writing to the MS. Check that you set the output to a MS. The BOIO format can only be used internally to MeqTrees. AIPS++ does not understand the BOIO format.
5. The calibration screwed up the CORRECTED table and you want to reset it to be equal to the OBSERVED table again:
Repeat the steps mentioned at 3.
6. There is some complaint about the beams library:
recompile the library
7. The calibration produces obscure results:
Don't forget to flag the data!
