VCSBeam version
Required: >= v2.18.8
# On Garrawarla, test vcsbeam version $ module use /pawsey/mwa/software/python3/modulefiles $ module load vcsbeam $ make_mwa_tied_array_beam -V MWA Beamformer v2.18.8_99df2a4
Offline FinePFB
$ cd /astro/mwavcs/vcs/1318345216/combined $ for freq in {109..120} do sed "s/FREQ/${freq}/" < make_legacy.sbatch > make_legacy_ch${freq}.sbatch sbatch make_legacy_ch${freq}.sbatch done
Incoherent Beam
$ cd /astro/mwavcs/vcs/1318345216/vcsbeam/incoh $ sbatch vcsbeam_incoh.sbatch # ... After beamforming finishes... $ module load singularity $ pawsey/mwa/singularity/presto/presto.sif prepfold -psr J0034-0721 -nosearch -nodmsearch incoh*.fits
After beamforming finishes, fold on B0031-07:
$ module load singularity $ pawsey/mwa/singularity/presto/presto.sif prepfold -psr J0034-0721 -nosearch -nodmsearch incoh*.fits
The pulsar is clearly there, but there is a lot of RFI. After some experimenting, I find that the last 38% or so is RFI free:
$ pawsey/mwa/singularity/presto/presto.sif prepfold -psr J0034-0721 -start 0.62 -nosearch -nodmsearch incoh*.fits
Therefore, I should only use this section of the data to get a calibration solution.
Calibration
Offline Correlator
$ cd /astro/mwavcs/vcs/1318345216/cal/1318345216/vis $ for freq in {109..120} do sed "s/FREQ/${freq}/" < offline_correlate.sbatch > offline_correlate_${freq}.sbatch sbatch offline_correlate_${freq}.sbatch done
RTS
Create source list
$ cd /astro/mwavcs/vcs/1318345216/cal/1318345216 $ module load srclists/v1.0.0 $ srclist_by_beam.py -m /astro/mwavcs/vcs/1318345216/1318345216_metafits_ppds.fits -n 1000 -s ${SRCLISTS_DIR}/srclist_pumav3_EoR0aegean_EoR1pietro+ForA.txt
Set up flagged tiles
To find which tiles need to be flagged, find the broken tiles by going to the observation status page (http://ws.mwatelescope.org/observation/obs/?obs_id=1318345216). In the section "Tile errors and flags", you will find the "TileNames" for any tiles that should be flagged. Then, in the metafits file for the observation, you will find the "Input" numbers associated with the X and Y polarisations of each tile. The numbers you need to put in the "flagged_tiles.txt" are the Input numbers divided by two (and possibly rounded down). For example, in 1318345216, Tile064 is listed as broken, and in the metafits file, that tile's polarisations are associated with inputs 144 & 145. This means that the number that goes into flagged_tiles.txt for this tile is 72. In this way, the following list is constructed for this observation.
1 12 45 51 60 72 93 94 112
Set up flagged channels
Setting up the flagged channels is more straightforward. As a rule, we always flag the edge channels (80 kHz worth on either side) and the centre channel. Since we have averaged up to 40 kHz when we did the offline correlation step above, that means we will be flagging the outer two channels on either side (as 2 x 40 kHz = 80 kHz) and the single centre channel. Since there are 32 channels in this case, the final list of flagged channels is:
0 1 16 30 31
Selecting only the last 38% of the observation for calibration
One of the parameters passed to the RTS is the "basename" of the files containing the visibilities. In order to distinguish between the RFI-ridden visibilities and the clean ones, I will create soft links to the clean gpubox files (created in an earlier step) and change the case of the filenames (gpubox → GPUBOX). The first and last filenames are 1318345216_20111011150016_gpubox01_00.fits
and 1318345216_20111011151015_gpubox12_00.fits
, with the timestamp in the format YYYYMMDDHHMMSS
. To get the last 38%, I need to start 6:12 (mm:ss) into the observation, which means that my first clean file will be 1318345216_20111011150628_gpubox01_00.fits
.
$ cd /astro/mwavcs/vcs/1318345216/cal/1318345216/vis $ ls 1318345216_2011101115062[89]_gpubox*.fits 1318345216_201110111506[3-5]?_gpubox*.fits 1318345216_20111011150[7-9]??_gpubox*.fits 1318345216_20111011151???_gpubox*.fits | while read f; do ln -s ${f} $(echo ${f} | tr 'gpubox' 'GPUBOX'); done
After doing this, the RTS ".in" file must be altered so that it's only looking for files with GPUBOX in the filename (see below).
Extra flags
After running the RTS (see below) and checking the solutions (using the python scripts supplied in VCSTools), I found that I also had to add 14 to the list of flagged channels, and 52, 53, 54, 59 and 61 to the list of flagged tiles.
Run the RTS
$ cd /astro/mwavcs/vcs/1318345216/cal/1318345216/rts $ sbatch /astro/mwavcs/vcs/1318345216/batch/RTS_1318345216.batch
Make a "calibration" metafits
In order to be able to use this calibration solution for beamforming, mwalib has to be "tricked" into getting the frequency resolution right (i.e. whatever we set during the offline correlation step). To do this, make a copy of the metafits file and change
FINECHAN → 40 (kHz)
NCHANS → 768
MODE → 'HWLFILES'
I then saved this file to /astro/mwavcs/vcs/1318345216/cal/1318345216_cal.metafits.
(MEMO TO SELF: write a utility script to do this for you.)
Beamform
For the time being, we have to "trick" the beamformer into thinking this is a legacy VCS observation, instead of an MWAX VCS observation. I did this by creating a copy of the metafits file and changing the "MODE" and "NCHANS" fields to 'VOLTAGE_START' and 3072, respectively. [MEMO TO SELF: add an option to "force" the beamformer to treat it as a legacy obs, if you want to beamform from the .dat files produced by the offline PFB.]
Transfer the flagged tiles from the RTS
$ cd /astro/mwavcs/vcs/1318345216/vcsbeam $ /PATH/TO/rts_flag_ant_to_tilenames.py 1318345216_cal.metafits flagged_tiles.txt > flagged_tilenames.txt
$ cd /astro/mwavcs/vcs/1318345216/vcsbeam $ echo "00:34:08.8703 -07:21:53.409" > pointings.txt $ sbatch vcsbeam.sbatch
$ module load singularity $ /pawsey/mwa/singularity/presto/presto.sif prepfold -psr J0034-0721 -nosearch -nodmsearch C001_1318345216_00:34:08.87_-07:21:53.41_ch109-120_000?.fits