Beam Correction & Source Counts

Functions for computing the primary beam correction and expected source counts.

sourcefinding.beam_tools.expected_nsrc(pri_freq, rms, max_angle=1.5, sigma=5.0)[source]

Calculates expected number of sources that would have been detected within a maximum distance from the image center (max_angle) based on the detection threshold (sigma) in the image from logN-logS fit of WENSS catalog scaled to 341 MHz from 325 MHz with alpha= -0.7, rms at center of image (mJy), and fitted beam.

Parameters:
  • rms (float) – Estimate of the noise in the center of the image in mJy/beam.
  • max_angle (float, optional) – Maximum angular distance in degrees from image center within which to count/estimate the number of sources. Default value is 1.5 degrees.
  • sigma (float, optional) – The detection threshold used when source finding. Default value is 5.
Returns:

nexp – The expected number of sources within ‘max_angle’ given the detection threshold, ‘sigma’, and the image noise.

Return type:

int

sourcefinding.beam_tools.find_nearest_pbcorr(angle, pri_freq)[source]

Finds the primary beam correction factor corresponding to the angle value closest to the given distance from the image center.

Parameters:
  • angle (float) – Distance from the image center in degrees.
  • pri_freq (float) – Primary frequency of the observations in GHz.
Returns:

pbdata[‘power’][idx] – Primary beam correction factor.

Return type:

float

sourcefinding.beam_tools.read_fitted_beam(pri_freq)[source]

Reads the fitted beam file which contains the correction factor as a function of distance from the image center at every 10 arcseconds.

Parameters:pri_freq (float) – Primary frequency of the observations in GHz.
Returns:pbdir – Dictionary containing the primary beam correction factor (‘power’) as a function of the distance from the image center in degrees (‘angle’).
Return type:dictionary