Post processing - Fringe fitting

This step of the processing is usually done on (usr: observer). The notes below are written using legacy S/X or mixed-mode experiments in mind


Create a directory for the experiment in /data/AUSTRAL/ and transfer the four digit code directory full of mark4 files into this directory (e.g. final path to mark4 data should look something like: /data/AUSTRAL/si1134/1134/).

Most stations we are dealing with do not have working phase cals, so we need to find a bright scan to sort out phase calibration in the control files. This can be done by manually trying some scans out or searching the vex file for scans with known bright sources.

First, determine whether this is a mixed-mode session (i.e. VGOS stations such as Hb/Ke are present) as these sessions will require extra steps for the VGOS stations. Then make a directory named control on the same directory level as the directory containing your fringe data (e.g. /data/AUSTRAL/si1134/control). Copy a previous control file to the directory and zero out the pc_phases and delays (if set).

Delay fitting for VGOS stations in mixed mode sessions:

  1. Choose one station to be the reference (ideally an S/X station like Yg)
  2. Run fourfit with the ‘-tx’, ‘-m0’ options before the scan data and ‘set pc_mode manual’
  3. Look at the baselines to the reference station from the mixed mode stations - note the single band delay for both polarisations of S and X
  4. Edit the control file and add these delays for each polarisation of S and X band (e.g. pc_delays_l) - add the value for each channel
  5. Run fourfit with the control file to check that single band delays are now zeroed.
  6. Now proceed as normal (see below)

Phase calibrations all stations:

  1. Run fourfit with the ‘-tx’, ‘-m0’ options before the scan data and ‘set pc_mode manual’
  2. Look at the terminal for the phase offset output on all baselines with the reference station for both S and X band (and both polarisations if required).
  3. Add these phase offsets into the control file for all stations - except reference station
  4. For mixed mode stations make sure to add _l or _r depending on the polarisation.

Once the delays and phases are calibrated, check this control file looks good across all scans. Phases should be reasonably flat, with low scatter and no steps between bands (they do not need to be zero - other than on the scan you used for determining the manual phase offsets).

A useful check for mixed mode stations

For mixed mode stations we need to check that the polarisations are combining properly. To check this is the case:

  1. Find an appropriate scan with decent SNR fringes - fourfit on this scan with the control file.
  2. For each mixed mode station, check the SNR of both polarisations for S and X band on your reference station baseline - note these SNR values down. They should be very similar for both polarisations in each band.
  3. Next, fourfit again but with the option ‘-PLR+RR’ - check that the combined polarisation SNRs increase by the expected amount (added in quadrature | ~sqrt(2))
  4. If they do not increase by enough - check that you have properly calibrated the delays!

Production fringe-fitting

Once we are happy with the control file we can move on to the production fringe fitting. As fourfit is a single threaded process, it is best to do the production fringe fitting using the parallel tool in linux.

 parallel -v fourfit -c cf_pcal ::: $(ls -d 16*) 

For the mixed-mode baselines we need to do the final fringe fitting with the polarisation combination option. However, do not use this option on RCP-RCP baselines (e.g. Yg-Ht) as it will produce fringe files with zero channels that throw errors when running the vgosDbMake script in later stages! Be certain to check the LR/RL order for each baseline pair - also need to do -PRR+LL on baselines with two vgos receivers (e.g. Ke & Hb). Also, for VGOS-VGOS baselines, use the option -PI.

The most straightforward way to do this, from a user input point of view:

  1. Identify what the most common polarisation combination option will be (like no option if there are many of legacy S/X stations present)
  2. Run fourfit on all baselines with this option
  3. Now from this base you need to identify each of the other required combinations, deleting the existing fringes before proceeding.

Example production fitting run

Fringe fit all data using most common options.

parallel -v fourfit -c cf_pcal ::: $(ls -d 16*)

Next we are doing baselines where Hobart (L) is the first station, therefore requiring the -PRR+LR option.

rm */L?.?.*
parallel -v fourfit -PRR+LR -c cf_pcal -bL?  ::: $(ls -d 16*)

Then we do stations where Ke (i) is second, requiring the -PRR+RL option.

rm */?i.?.*
parallel -v fourfit -PRR+RL -c cf_pcal -b?i  ::: $(ls -d 16*)

Then we do stations where Ke (i) is first, requiring the -PRR+LR option.

rm */i?.?.*
parallel -v fourfit -PRR+LR -c cf_pcal -bi?  ::: $(ls -d 16*)

Then we finally do the Hb-Ke (Li) VGOS baseline, requiring the -PI option.

rm */Li.?.*
parallel -v fourfit -PI -c cf_pcal -bLi  ::: $(ls -d 16*)

At the end of this, we should have the correct polarisation combinations for all fringe data. Depending on what stations are present in the session you are fringe fitting, the order you will need to do them in (so that you do not overwrite some baselines with the incorrect combination option) may change. You can also do each baseline manually to save wasting processing time on fringe data you are going to delete, however, this requires much more frequent user input. This is likely something that could be scripted in the future (I might do this if I get bored).