snr_chk

Signal to Noise ratio (SNR) test for making images

The goal of using the SNR is to compute only scientifically meaningful images. The SNR is computed as follows:

Use visibilities from Detectors 6,7,8. If there are not at least 2 visibilities (after prep, edit,combine) then try Detectors 5,6,7,8. If there still are not enough visibilities then can not calculate SNR.

Compute mean of SNR (obsvis amplitude / sigamp) for those visibilities (obsvis is the semicalibrated complex visibility in photons/cm^2/s, the amplitude is the magnitude of the complex number, and sigamp is the sigma in the amplitude). Use resistant_mean routine to reject all values > 3 standard deviations from median. SNR is the mean of the remaining values.

The following parameters control the use of the SNR:

snr_chk - Values are 0,1,2 to control whether to check SNR before attempting to make image (default is 2):
0 - do not check SNR
1 - try to check SNR. If can't (no vis, or not enough vis), DON'T make image. If can, make image if SNR < snr_thresh
2 - try to check SNR. If can't (no vis, or not enough vis), MAKE image anyway. If can, make image if SNR < snr_thresh

snr_thresh - If SNR is < this threshold, don't make image. Default is 2 (might want to use 4. for MEM_GE images).

snr_vis_file - Visibility file name to use in SNR calculation for SNR check (if available, so don't have to make vis again). If none, makes vis.

If the SNR of visibilities in a time/energy bin is < snr_threshold (and snr_chk is 1 or 2), we do not even attempt to make an image. The image will be zero-filled.

Info parameters:

snr_msg - String message indicating reason if image was not made due to SNR

snr_value - Value of Signal to Noise Ratio computed from visibilities