ska_sdp_instrumental_calibration.plot.plot_gaintable module
- class ska_sdp_instrumental_calibration.plot.plot_gaintable.PlotGaintable(refant=None, path_prefix=None)[source]
Bases:
objectBase class for plotting gaintable solutions (amplitude and phase).
This class provides the core logic for preparing gaintable data (an xarray.Dataset) and generating faceted scatter plots. It is intended to be subclassed (e.g., by PlotGaintableFrequency or PlotGaintableTime) to specify the x-axis dimension and its corresponding secondary axis.
- Parameters:
refant (int, default None) -- The reference antenna index used for normalizing the bandpass solutions. If provided, the gains will be divided by the reference antenna's gains while preserving phase.
path_prefix (str, optional) -- A prefix used to construct the output filenames for the plots. Defaults to None.
- _x_data
Data used to map between the primary and secondary x-axes.
- Type:
array-like
- _x_sec_data
Data used to map between the primary and secondary x-axes.
- Type:
array-like
- property xdim
Abstract property for the x-dimension name.
This property defines a short string used in the output plot filename to identify the x-axis dimension (e.g., 'time' or 'freq').
- Raises:
NotImplementedError -- This property must be overridden by a subclass.
- Type:
- observation_start_time(gaintable)[source]
Extract the observation start time from the gaintable.
Converts the first time timestamp in the gaintable (assumed to be seconds) to a UTC datetime object.
- Parameters:
gaintable (xarray.Dataset) -- The input gaintable containing a 'time' coordinate.
- Returns:
The start time of the observation in UTC.
- Return type:
- class ska_sdp_instrumental_calibration.plot.plot_gaintable.PlotGaintableFrequency(**kwargs)[source]
Bases:
PlotGaintablePlots gaintable solutions against frequency/channel.
This class extends PlotGaintable to handle plotting where the primary x-axis represents 'Channel' (index) and the secondary x-axis represents 'Frequency [MHz]'. It interpolates between these two domains to provide dual-axis visualizations.
- Parameters:
**kwargs -- Keyword arguments passed to the PlotGaintable parent class, such as path_prefix.
- class ska_sdp_instrumental_calibration.plot.plot_gaintable.PlotGaintableTime(**kwargs)[source]
Bases:
PlotGaintablePlots gaintable solutions against time.
This class extends PlotGaintable to handle plotting where the primary x-axis represents 'Observation Time (S)' (relative to the start) and the secondary x-axis represents 'Time Index'.
- Parameters:
**kwargs -- Keyword arguments passed to the PlotGaintable parent class, such as path_prefix.
- class ska_sdp_instrumental_calibration.plot.plot_gaintable.PlotGaintableTargetIonosphere(path_prefix)[source]
Bases:
PlotGaintableFrequencyPlots gaintable solutions as a Time vs. Frequency heatmap.
This class extends PlotGaintableFrequency to generate diagnostic plots specifically for ionospheric target calibration. It visualizes phase variations across both time and frequency channels simultaneously, creating a heatmap where the x-axis is Channel/Frequency and the y-axis is Time.
- Parameters:
path_prefix (str) -- A prefix used to construct the output filenames for the plots.