sirius.calc_beam

calc_zpc_beam(zpc_xds, parallactic_angles, freq_chan, beam_parms, check_parms=True)[source]

Calculates an antenna apertures from Zernike polynomial coefficients, and then Fourier transform it to obtain the antenna beam image. The beam image dimensionality is [pa (paralactic angle), chan (channel), pol (polarization), l (orthographic/synthesis projection of directional cosine), m (orthographic/synthesis projection of directional cosine)].

Parameters
  • zpc_xds (xr.Dataset) – A Zernike polynomial coefficient xr.Datasets. Available models can be found in sirius_data/zernike_dish_models/data.

  • parallactic_angles (float np.array, [n_pa], radians) – An array of the parallactic angles for which to calculate the antenna beams.

  • freq_chan (float np.array, [n_chan], Hz) – Channel frequencies.

  • beam_parms (dict) –

  • beam_parms['mueller_selection'] (int np.array, default=np.array([ 0, 5, 10, 15])) – The elements in the 4x4 beam Mueller matrix to use. The elements are numbered row wise. For example [ 0, 5, 10, 15] are the diagonal elements.

  • beam_parms['pa_radius'] (float, default=0.2, radians) – The change in parallactic angle that will trigger the calculation of a new beam when using Zernike polynomial aperture models.

  • beam_parms['image_size'] (int np.array, default=np.array([1000,1000])) – This parameter should rarely be modified. Size of the beam image generated from the Zernike polynomial coefficients.

  • beam_parms['fov_scaling'] (int, default=1.2) – This parameter should rarely be modified. Used to determine the cell size of the beam image so that it lies within the image that is generated.

  • beam_parms['zernike_freq_interp'] (str, default='nearest', options=['linear', 'nearest', 'zero', 'slinear', 'quadratic', 'cubic']) – What interpolation method to use for Zernike polynomial coefficients.

  • check_parms (bool) – Check input parameters and asign defaults.

Returns

J_xds – An xds that contains the image of the per antenna beam as a function of [pa (paralactic angle), chan (channel), pol (polarization), l (orthographic/synthesis projection of directional cosine), m (orthographic/synthesis projection of directional cosine)]. Should not be confused with the primary beam, which is the beam for a baseline and is equal to the product of two antenna beams.

Return type

xr.Dataset

evaluate_beam_models(beam_models, time_str, freq_chan, phase_center_ra_dec, site_location, beam_parms, check_parms=True)[source]

Loops over beam_models and converts each Zernike polynomial coefficient xr.Datasets to an antenna beam image. The beam image dimensionality is [pa (paralactic angle), chan (channel), pol (polarization), l (orthographic/synthesis projection of directional cosine), m (orthographic/synthesis projection of directional cosine)]. The parallactic angles are also calculated for each date-time in time_str at the site_location and with a right ascension declination in phase_center_ra_dec. A subset of parallactic angles are used in the pa coordinate of the beam image, where all pa values are within beam_parms[‘pa_radius’] radians.

Parameters
  • beam_models (list) – List of beam models to use. Beam models can be any combination of function parameter dictionaries, image xr.Datasets or Zernike polynomial coefficient xr.Datasets (models can be found in sirius_data/zernike_dish_models/data).

  • time_str (str np.array, [n_time], 'YYYY-MM-DDTHH:MM:SS.SSS') – Time series. Example ‘2019-10-03T19:00:00.000’.

  • freq_chan (float np.array, [n_chan], Hz) – Channel frequencies.

  • phase_center_ra_dec (float np.array, [n_time, 2], (singleton: n_time), radians) – Phase center of array.

  • site_location (dict) – A dictionary with the location of telescope. For example [{‘m0’: {‘unit’: ‘m’, ‘value’: -1601185}, ‘m1’: {‘unit’: ‘m’, ‘value’: -5041977}, ‘m2’: {‘unit’: ‘m’, ‘value’: 3554875}, ‘refer’: ‘ITRF’, ‘type’: ‘position’}]. The site location of telescopes can be found in site_pos attribute of the xarray dataset of the radio telescope array layout (see zarr files in sirius_data/telescope_layout/data/).

  • parallactic_angles (float np.array, radians) – An array of the parallactic angles for which to calculate the antenna beams.

  • freq_chan – Channel frequencies.

  • beam_parms (dict) –

  • beam_parms['mueller_selection'] (int np.array, default=np.array([ 0, 5, 10, 15])) – The elements in the 4x4 beam Mueller matrix to use. The elements are numbered row wise. For example [ 0, 5, 10, 15] are the diagonal elements.

  • beam_parms['pa_radius'] (float, default=0.2, radians) – The change in parallactic angle that will trigger the calculation of a new beam when using Zernike polynomial aperture models.

  • beam_parms['image_size'] (int np.array, default=np.array([1000,1000])) – Size of the beam image generated from the Zernike polynomial coefficients.

  • beam_parms['fov_scaling'] (int, default=1.2) – This parameter should rarely be modified. Used to determine the cell size of the beam image so that it lies within the image that is generated.

  • beam_parms['zernike_freq_interp'] (str, default='nearest', options=['linear', 'nearest', 'zero', 'slinear', 'quadratic', 'cubic']) – What interpolation method to use for Zernike polynomial coefficients.

Returns

J_xds – An xds that contains the image of the per antenna beam as a function of [pa (paralactic angle), chan (channel), pol (polarization), l (orthographic/synthesis projection of directional cosine), m (orthographic/synthesis projection of directional cosine)]. Should not be confused with the primary beam, which is the beam for a baseline and is equal to the product of two antenna beams.

Return type

xr.Dataset