Skip to content

Reference based on channel frequency instead of REF_FREQUENCY in sort_times_into_freqGroups.py

Frits Sweijen requested to merge change-sort-reference into master

sort_times_into_freqGroups.py uses REF_FREQUENCY to sort input MSes into groups. Running the https://git.astron.nl/RD/VLBI-cwl pipeline I ran into this issue where this script fell over concatenating 2 MHz chunks from the delay calibration, because the REF_FREQUENCY values were weirdly spaced even though the concatenation is valid and DP3 reports it as fully regular. It can also change depending on the origin of given MSes (old discussion at DP3#217 for example), so it might not be completely safe to rely on either.

This MR changes the frequency reference used by the script from REF_FREQUENCY to the first channel of the MS. With this change, my VLBI-cwl run now runs successfully and from a local test I didn't adverse effects on a LINC run regarding MS sorting and concatenation (the difference between REF_FREQUENCY and the first channel should be small for individual subbands I think and the script does check file bandwidth so I feel it should be ok).

Merge request reports