ska-sa / katsdpcal

MeerKAT calibration pipeline
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

SPR1-1964: Reference Antenna Selection #69

Closed tamerakassie closed 2 months ago

tamerakassie commented 2 months ago

This is a new PR for reference antenna selection as per the initial investigation done in SPR1-1964. We have restarted the PR for this ticket (previous one in select_mad-ref_antenna ), as a better way to deal with previous commits, also this PR is branched of the updated master.

A select_med_deviation_pnr_ants function has been added to calculate the median deviation of antenna peak-to-noise (PNR) values, this function returns an array of antenna indices that have a relatively good PNR. We have considered antenna PNRs that are one normalized deviation below the median as being relatively high quality antennas for selection as the reference antenna. The best_refant, which is the function that calculates the PNR across antennas, has been modified to call the select_med_deviation_pnr_ants and thereafter return the corresponding best antenna solution for the reference antenna selection. The test_calprocs.py contains the corresponding unit tests for the new solution in select_med_deviation_pnr_ants and best_refant . The changes in scan.py is the addition of a conditional statement (previous PR review) that checks and updates if the refant is in the antenna index list of the best_refant function output.