ska_sdp_instrumental_calibration.data_managers.sky_model.local_sky_model module
- class ska_sdp_instrumental_calibration.data_managers.sky_model.local_sky_model.LocalSkyModel(components, solution_time)[source]
Bases:
objectA class representing a local sky model composed of various sky components.
This class manages a collection of sky components and handles the generation of predicted visibilities based on these components for specific observation parameters.
- Parameters:
- create_vis(uvw, frequency, polarisation, phasecentre, antenna1, antenna2, beams_factory=None, station_rm=None, output_dtype=<class 'numpy.complex64'>)[source]
Calculate predicted visibilities for all components in the sky model.
This method iterates through the model's components, calculates the visibility contribution of each, and sums them to produce the total predicted visibility for the specified baseline configuration and frequency channels. It optionally applies beam attenuation and Faraday rotation if provided.
- Parameters:
uvw (numpy.ndarray) -- The UVW coordinates of the baselines. Shape is typically (n_times, n_baselines, 3).
frequency (numpy.ndarray) -- The frequency channels for the simulation in Hz. Shape: (n_channels,).
polarisation (numpy.ndarray) -- The polarisation frames (e.g., Stokes I, Q, U, V or linear XX, XY). Shape: (n_pols,).
phasecentre (SkyCoord or object) -- The phase centre of the observation direction.
antenna1 (numpy.ndarray) -- Indices of the first antenna in the baseline pairs. Shape matches the baseline dimension of
uvw.antenna2 (numpy.ndarray) -- Indices of the second antenna in the baseline pairs. Shape matches the baseline dimension of
uvw.beams_factory (BeamsFactory, optional) -- A factory object capable of generating beam models. If provided,
get_beams_lowwill be called to apply beam effects. Default is None.station_rm (numpy.ndarray, optional) -- Rotation measure values for the stations to apply Faraday rotation. If None, no Faraday rotation is applied. Default is None.
output_dtype (data-type, optional) -- The data type of the output visibility array. Default is
np.complex64.
- Returns:
The total predicted visibilities summing contributions from all components. Shape: (n_times, n_baselines, n_channels, n_pols).
- Return type:
Notes
The method dynamically creates LocalSkyComponent instances for each component in self.components and aggregates their create_vis outputs.
- class ska_sdp_instrumental_calibration.data_managers.sky_model.local_sky_model.GlobalSkyModel(phasecentre, fov=10.0, flux_limit=1.0, alpha0=-0.78, gleamfile=None, lsm_csv_path=None)[source]
Bases:
objectA class representing a Global Sky Model (GSM).
This class manages the initialization of sky components from various catalogues (e.g., GLEAM or local CSV files) and provides functionality to generate local sky models for specific observation times and array locations.
- Parameters:
phasecentre (
SkyCoord) -- The phase centre of the observation, used as the reference point for the field of view searchfov (
float, default:10.0) -- The field of view diameter in degreesflux_limit (
float, default:1.0) -- The minimum flux density threshold in Jy. Sources below this limit are excludedalpha0 (
float, default:-0.78) -- The default spectral index to use if not specified in the cataloguegleamfile (
str, default:None) -- Path to the GLEAM catalogue file. If provided, the model is generated from this filelsm_csv_path (
str, default:None) -- Path to a CSV file containing sky model components. Used ifgleamfileis None
- Raises:
RequiredArgumentMissingException -- If neither
gleamfilenorlsm_csv_pathis provided.
- get_local_sky_model(solution_time, array_location)[source]
Generate a Local Sky Model for a specific time and location.
Filters the global components to include only those currently visible (above the horizon) for the given array location and time.
- Parameters:
solution_time (
float) -- The time of the observation (e.g., MJD or Unix timestamp) used to calculate source positions.array_location (
EarthLocation) -- The geographical location of the telescope array.
- Return type:
- Returns:
A new object containing only the visible components for the specified parameters.