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. Thesineandcosineof the parallactic angles are stored separately for each COMPONENT type incropped_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_beamto perform the rotation on the device.- Parameters
*cropped_src – [inout] A populated
catsource_tsky 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 abeam_settings_tandcatsource_tstruct with appropriate attributes to be used in primary beam modelling.If using a
GAUSS_BEAMprimary beam, calculate the hour angle and declination of the pointing centre for all times steps, and for all components in sky modelcropped_src. If usingFEE_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_tsky model*woden_settings – [in] A populated
woden_settings_tstruct*lsts – [in] All local sidereal times in the simulation
- Returns
beam_settings- a populatedbeam_settings_tstruct containing attributes necessary to simulate the requested beam response