ska_sdp_instrumental_calibration.data_managers.sky_model.component module

Module for generating the local sky model.

Note that these are temporary functions that will be replaced by functions that connect to ska-sdp-global-sky-model functions.

class ska_sdp_instrumental_calibration.data_managers.sky_model.component.Component(component_id, ra, dec, i_pol, ref_freq=200000000.0, spec_idx=None, major_ax=0.0, minor_ax=0.0, pos_ang=0.0, beam_major=0.0, beam_minor=0.0, beam_pa=0.0, log_spec_idx=True, source_id='', epoch=0.0)[source]

Bases: object

Class for LSM components.

Class to hold catalogue data for a component of the local sky model. For components with elliptical Gaussian parameters, if beam parameters are also supplied, the beam will be deconvolved from the component parameters. If the component parameters have already had the beam deconvolved, the beam parameters should be left at zero.

component_id: str

Name of the component

ra: float

Right Ascension J2000 (degrees)

dec: float

Declination J2000 (degrees)

i_pol: float

I polarization - flux at reference frequency, ref_freq

ref_freq: float = 200000000.0

Reference frequency (Hz)

spec_idx: list | None = None

Spectral index polynomial coefficients (up to 5 terms).

major_ax: float | None = 0.0

Fitted semi-major axis (arcsec) at reference frequency

minor_ax: float | None = 0.0

Fitted semi-minor axis (arcsec) at reference frequency

pos_ang: float | None = 0.0

Fitted position angle (degrees) at reference frequency

beam_major: float = 0.0

Semi-major axis of a beam that is still convolved into the

beam_minor: float = 0.0

Semi-minor axis of a beam that is still convolved into the

beam_pa: float = 0.0

Position angle of a beam that is still convolved into the

log_spec_idx: bool = True

True if logarithmic spectral model, False if linear. Default=True

source_id: str | None = ''

ID of the source this component belongs to

epoch: float | None = 0.0

Epoch of observation

property direction

Return the SkyCoord direction of the component.

get_altaz(solution_time, array_location)[source]

Get the AltAz coordinate of the component at given solution time and array location.

Parameters:
  • solution_time (float) -- Solution time (seconds since mjd epoch)

  • array_location (EarthLocation) -- Location of the array.

Return type:

SkyCoord

Returns:

A new object with the component's direction coordinate represented in the given AltAz frame.

Notes

The solution time is converted to a datetime object using the py:func:convert_time_to_solution_time function before being passed to AltAz.

is_above_horizon(solution_time, array_location)[source]

Checks if the component is above horizon for the given solution time and array location

Parameters:
  • solution_time (float) -- Solution time.

  • array_location (EarthLocation) -- Array Locations

Return type:

bool

Returns:

True if the given component is above the horizon at the solution time for the given array location.

deconvolve_gaussian()[source]

Deconvolve MWA synthesised beam from Gaussian shape parameters.

This follows the approach of the analysisutilities function deconvolveGaussian in the askap-analysis repository, written by Matthew Whiting. This is based on the approach described in Wild (1970), AuJPh 23, 113.

Return type:

tuple[float, float, float]

Returns:

Tuple of deconvolved parameters (same units as data in self)

calculate_flux(freq)[source]

Calculate the flux density at given frequencies.

Computes the flux using either a power-law with a frequency-dependent spectral index (in log-log space) or a standard polynomial expansion based on the log_spec_idx toggle.

Parameters:

freq (np.ndarray) -- The frequencies at which to evaluate the flux.

Returns:

The calculated flux density values corresponding to the input frequencies.

Return type:

np.ndarray