primary_beam

API documentation for primary_beam.c.

Functions to calculate the parallactic angle, and fill in primary beam settings requested for the simulation, based on settings in woden_settings and the sky model cropped_src

Functions

void calc_para_angle(catsource_t *cropped_src, double *lsts, double latitude, int num_time_steps)

Given the component positions in the sky model cropped_src, calculate the parallactic angle.

The MWA FEE beam is stored in instrumental polarisations (aligned with azimuth and elevation), which must be rotated to align with celestial based XX/YY. This is achieved by rotating by parallactic angle. Parallactic angle is calculated using <erfa> eraHd2pa. The sine and cosine of the parallactic angles are stored separately for each COMPONENT type in

  cropped_src->sin_point_para_angs
  cropped_src->cos_point_para_angs
  cropped_src->sin_gauss_para_angs
  cropped_src->cos_gauss_para_angs
  cropped_src->sin_shape_para_angs
  cropped_src->cos_shape_para_angs

as they are used later by kern_rotate_FEE_beam to perform the rotation on the device.

Parameters
  • *cropped_src[inout] A populated catsource_t sky model

  • *lsts[in] All local sidereal times in the simulation

  • latitude[in] Latitude of the array (radians)

  • num_time_steps[in] Number of time steps in the simulation

beam_settings_t *fill_primary_beam_settings(woden_settings_t *woden_settings, catsource_t *cropped_src, double *lsts)

Given the settings specified in woden_settings, populate a beam_settings_t and catsource_t struct with appropriate attributes to be used in primary beam modelling.

If using a GAUSS_BEAM primary beam, calculate the hour angle and declination of the pointing centre for all times steps, and for all components in sky model cropped_src. If using FEE_BEAM, calculate the parallactic angle for all times steps, for all components.

Todo:

For all sky simulations, there can be millions of components, so calculating parallactic angle can be expensive. Consider multi-threading this somehow

Parameters
  • *cropped_src[inout] A populated catsource_t sky model

  • *woden_settings[in] A populated woden_settings_t struct

  • *lsts[in] All local sidereal times in the simulation

Returns

beam_settings - a populated beam_settings_t struct containing attributes necessary to simulate the requested beam response