ska_pst.stat
This module for any Python related code for STAT.
The core class in this module is the Statistics
class
which can be used to load a SKA PST STAT HDF5 file and provide
ease of use access to the underlying property.
This package depends on Pandas, Numpy and H5Py and the dependencies should get installed automatically when installing this package.
The following code snippet demonstrates how to load a file and get the header metadata of the file and plot a spectrogram.
from ska_pst.stat import Statistics
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
file_path = "/tmp/some-path-to-file/stat.h5"
stats = Statistics.load_from_file(file_path)
# this returns a Pandas DataFrame
header = stats.header
# to plot the spectrogram for polarisation A
plt.imshow(stats.pol_a_spectrogram)
plt.show()
- class ska_pst.stat.Statistics(*, metadata: StatisticsMetadata, data: StatisticsData)[source]
Data class used to abstract over HDF5 file.
Instances of this should be created by passing the location of a STAT file to the
load_from_file()
method.- property channel_numbers: nptyping.NDArray.(typing.Literal['NChan'], nptyping.Int)
Get an array of channel numbers.
- data: StatisticsData
- property frequency_averaged_stats: pandas.DataFrame
Get the frequency averaged statistics for all frequencies.
This returns the mean and variance of all the data across all frequencies, including frequencies marked as having RFI, separated for each polarisation and complex value dimension. The statistics also includes the number of samples clipped (i.e. the digital value was at the min or max value given the number of bits.)
The data frame has the following columns:
Polarisation - which polarisation that the statistic value is for.
Dimension - which complex dimension/component (i.e. real or imag) that the statistic is for.
Mean - the mean of the data for each polarisation and dimension, averaged over all channels.
Variance - the variance of the data for each polarisation and dimension, averaged over all channels.
Clipped - number of clipped input samples (maximum level) for each polarisation, dimension, averaged over all channels.
The Pandas frame has a MultiIndex key using the
Polarisation
, andDimension
columns.
- property frequency_averaged_stats_rfi_excised: pandas.DataFrame
Get the frequency averaged statistics from all channels not flagged for RFI.
This returns the mean and variance of all the data across all channels, expect those flagged for RFI, separated for each polarisation and complex value dimension. The statistics also includes the number of samples clipped (i.e. the digital value was at the min or max value given the number of bits.)
The data frame has the following columns:
Polarisation - which polarisation that the statistic value is for.
Dimension - which complex dimension/component (i.e. real or imag) that the statistic is for.
Mean - the mean of the data for each polarisation and dimension, averaged over all channels.
Variance - the variance of the data for each polarisation and dimension, averaged over all channels.
Clipped - number of clipped input samples (maximum level) for each polarisation, dimension, averaged over all channels.
The Pandas frame has a MultiIndex key using the
Polarisation
, andDimension
columns.
- property frequency_bins: nptyping.NDArray.(typing.Literal['NFreqBin'], nptyping.Float64)
Get the frequency bins used in the spectrogram data.
- get_channel_stats() pandas.DataFrame [source]
Get the channel statistics.
While this method is a public method, it is recommened to use the following properties as they provide more specific access to the data based on polarisation and specific dimension of the complex voltage data.
The data frame has the following columns:
Channel - the channel number the statistics are for.
Polarisation - which polarisation that the statistic value is for.
Dimension - which complex dimension/component (i.e. real or imag) that the statistic is for.
Channel Freq. (MHz) - the centre frequency for the channel.
Mean - the mean of the data for each polarisation and dimension, averaged over all channels.
Variance - the variance of the data for each polarisation and dimension, averaged over all channels.
Clipped - number of clipped input samples (maximum level) for each polarisation, dimension, averaged over all channels.
The Pandas frame has a MultiIndex key using the
Channel
,Polarisation
, andDimension
columns.- Returns
a data frame with statistics for each channel split by polarisation and complex voltage dimension.
- Return type
pd.DataFrame
- get_frequency_averaged_stats() pandas.DataFrame [source]
Get the frequency averaged statistics.
This will return a data frame that includes statistics across all frequencies/channels as well as only the frequencies/channels that weren’t marked as having RFI.
While this method is a public method, it is recommened to use the following properties directly:
The data frame has the following columns:
Polarisation - which polarisation that the statistic value is for.
Dimension - which complex dimension/component (i.e. real or imag) that the statistic is for.
RFI Excised - a boolean value of whether the statistic after RFI had been excised.
Mean - the mean of the data for each polarisation and dimension, averaged over all channels.
Variance - the variance of the data for each polarisation and dimension, averaged over all channels.
Clipped - number of clipped input samples (maximum level) for each polarisation, dimension, averaged over all channels.
The Pandas frame has a MultiIndex key using the
Polarisation
,Dimension
, andRFI Excised
columns.
- get_histogram_data(rfi_excised: bool) pandas.DataFrame [source]
Get the histogram of the input data integer states for each polarisation and dimension.
While this method is a public method, it is recommened to use one of the following 8 properties as they provide the data in a more usable format:
The number of bins in the histogram is 2^(number of bits). For 8 bit data this is 256 bins and for 16 bit data this is 65536 bins.
The data frame has the following columns:
Bin - the bin for the histogram count.
Polarisation - which polarisation that the statistic value is for.
Dimension - which complex dimension/component (i.e. real or imag) that the statistic is for.
Count - the number/count for the bin.
The Pandas frame has a MultiIndex key using the
Bin
,Polarisation
, andDimension
columns.- Parameters
rfi_excised (True) – a bool value to report on all (False) or RFI excised (True) data
- Returns
a data frame for histogram data split polarisation and complex voltage dimension.
- Return type
pd.DataFrame
- get_rebinned_histogram2d_data(rfi_excised: bool, polarisation: ~ska_pst.stat.hdf5.consts.Polarisation) -> nptyping.NDArray.(typing.Literal['NRebin, NRebin'], nptyping.UInt32)[source]
Get the 2D histogram data.
This returns a Numpy array rather than a Pandas Dataframe.
While this is a public method the following properties should be used as they provide a more user friendly API.
- Parameters
rfi_excised (bool) – use the RFI excised data (True) or all data (False)
polarisaion – which polarisation of the data to use.
- get_rebinned_histogram_data(rfi_excised: bool) pandas.DataFrame [source]
Get rebinned histogram data.
While this method is a public method, it is recommened to use one of the following 8 properties as they provide the data in a more usable format.
The number of bins that the data has been rebinned to is
Num. Histogram Bins (Rebinned)
value found in theheader
.The data frame has the following columns:
Bin - the bin for the histogram count.
Polarisation - which polarisation that the statistic value is for.
Dimension - which complex dimension/component (i.e. real or imag) that the statistic is for.
Count - the number/count for the bin
The Pandas frame has a MultiIndex key using the
Bin
,Polarisation
, andDimension
columns.- Parameters
rfi_excised (True) – a bool value to report on all (False) or RFI excised (True) data
- Returns
a data frame for the rebinned histogram data split polarisation and complex voltage dimension.
- Return type
pd.DataFrame
- get_spectral_power() pandas.DataFrame [source]
Get the mean and max spectral power values for each channel.
This data frame includes both the mean and max of the spectral power for each channel for all polarisations.
The following properties are provided for each polarisation:
The data frame has the following columns:
Polarisation - which polarisation that the statistic value is for.
Channel - the channel number the statistics are for.
Mean - the mean of the spectral power for the current channel.
Max - the maximum of the spectral power for the current channel over the time sample of the statistics file.
The Pandas frame has a MultiIndex key using the
Polarisation
, andChannel
columns.- Returns
the mean and max spectral power values for each channel.
- Return type
pd.DataFrame
- get_timeseries_data(rfi_excised: bool) pandas.DataFrame [source]
Get the timeseries data.
While this is a public method, the following properties should be used as they provide a more user friendly access to the data.
The timeseries is binned in time (see
Num. Temporal Bins
inheader
) and is summed over all frequencies. If rfi_excised is True then the summing happens over the frequency that are not RFI excised.The data frame has the following columns:
Polarisation - which polarisation that the statistic value is for.
Temporal Bin - the time bin.
Time Offset - the offset, in seconds, for the current temporal bin.
Max - the maximum power recorded in the temporal bin.
Min - the minimum power recorded in the temporal bin.
Mean - the mean power recorded in the temporal bin.
The Pandas frame has a MultiIndex key using the
Polarisation
, and Temporal Bin columns.- Parameters
rfi_excised (bool) – whether to use all frequencies (False) or those that are not marked as having RFI.
- Returns
a data frame with the timeseries statistics.
- Return type
pd.DataFrame
- property header: pandas.DataFrame
Get the header metadata for the data file.
This returns a Pandas data frame of the header data from the HDF5 file. This the user of the API to see what is in the HEADER dataset without the need of using a HDF5 view tool
The header has the following fields:
Key
Example
Description
File Format Version
1.0.0
the version of the SKA PST STAT file format that the file is from.
Execution Block ID
eb-m001-20230921-245
the execution block ID of the generated data file
Telescope
SKALow
the telescope used for the generated data file (i.e. SKALow or SKAMid)
Scan ID
42
the ID of the scan that the file was generated from.
Beam ID
1
the PST BEAM ID that was used for the scan
UTC Start Time
2023-10-23-11:00:00
an ISO formated string of the UTC time at the start of the scan
Start Scan Offset
0.0
the time offset, in seconds, from the UTC start time to represent the time at the start of the data in the file.
End Scan Offset
0.106168
the time offset, in seconds, from the UTC start time to represent the time at the end of data in the file.
Frequency (MHz)
87.5
the centre frequency for the data as a whole
Bandwidth (MHz)
75.0
the bandwidth of data
Start Channel Number
0
the starting channel number
End Channel Number
431
the last channel that the data is for
Num. Polarisations
2
number of polarisations, this should be 2
Num. Dimensions
2
number of dimensions in the data (should be 2 for complex data)
Num. Channels
432
number of channels in the data
Num. Frequency Bins
36
he number of frequency bins in the spectrogram data
Num. Temporal Bins
32
the number of temporal bins in the spectrogram and timeseries data
Num. Histogram Bins
65536
the number of bins in the histogram data
Num. Histogram Bins (Rebinned)
256
number of bins to used in the rebinned histograms
Num. Samples
21012480
total number of samples used to calculate statistics
Num. Samples (RFI Excised)
19456000
total number of samples used to calculate statistics, excluding RFI excised data
Num. Invalid Packets
0
total number invalid/dropped packets in the data used to calculate statistics.
- Returns
a human readable version of the header scalar fields.
- Return type
pd.DataFrame
- static load_from_file(file_path: pathlib.Path | str) Statistics [source]
Load a HDF5 STAT file and return an instance of the Statistics class.
- Parameters
file_path (pathlib.Path | str) – the path to the file to load the statistics from
- Returns
the statistics from the HDF5 file as a Python class
- Return type
- metadata: StatisticsMetadata
- property nchan: int
Get the number of channels for the voltage data.
- property ndim: int
Get the number of dimensions of voltage data.
This value should be 2 as SKAO uses complex voltage data and the statistics has real and imaginary dimensions.
- property npol: int
Get the number of polarisations.
- property pol_a_channel_stats: pandas.DataFrame
Get the polarisation A channel statistics.
This property includes both the real and complex dimension of the data. The following utility properties are provided to get the statistics of each dimension directly:
The data frame has the following columns:
Channel - the channel number the statistics are for.
Dimension - which complex dimension/component (i.e. real or imag) that the statistic is for.
Channel Freq. (MHz) - the centre frequency for the channel.
Mean - the mean of the data for each polarisation and dimension, averaged over all channels.
Variance - the variance of the data for each polarisation and dimension, averaged over all channels.
Clipped - number of clipped input samples (maximum level) for each polarisation, dimension, averaged over all channels.
The Pandas frame has a MultiIndex key using the
Channel
, andDimension
columns.- Returns
a data frame of polarisation A with statistics for each channel split complex voltage dimension.
- Return type
pd.DataFrame
- property pol_a_imag_channel_stats: pandas.DataFrame
Get the imaginary valued, polarisation A channel statistics.
The data frame has the following columns:
Channel - the channel number the statistics are for.
Channel Freq. (MHz) - the centre frequency for the channel.
Mean - the mean of the data for each polarisation and dimension, averaged over all channels.
Variance - the variance of the data for each polarisation and dimension, averaged over all channels.
Clipped - number of clipped input samples (maximum level) for each polarisation, dimension, averaged over all channels.
- Returns
a data frame of the imaginary component of polarisation A with statistics for each channel.
- Return type
pd.DataFrame
- property pol_a_imag_histogram: pandas.DataFrame
Get the histogram of the imaginary valued, polarisation A, input data integer states.
The number of bins in the histogram is 2^(number of bits). For 8 bit data this is 256 bins and for 16 bit data this is 65536 bins.
The data frame has the following columns:
Bin - the bin for the histogram count.
Count - the number/count for the bin
- Returns
a data frame for histogram data for imaginary valued, polarisation A, voltage data.
- Return type
pd.DataFrame
- property pol_a_imag_histogram_rfi_excised: pandas.DataFrame
Get the histogram of the imag valued, pol A, input data from all channels not flagged for RFI.
The number of bins in the histogram is 2^(number of bits). For 8 bit data this is 256 bins and for 16 bit data this is 65536 bins.
The data frame has the following columns:
Bin - the bin for the histogram count.
Count - the number/count for the bin
- Returns
a data frame for histogram data for imaginary valued, polarisation A, voltage data from all channels not flagged for RFI.
- Return type
pd.DataFrame
- property pol_a_imag_rebinned_histogram: pandas.DataFrame
Get the rebinned histogram of the imaginary valued, pol A.
The data frame has the following columns:
Bin - the bin for the histogram count.
Count - the number/count for the bin
- Returns
a data frame for rebinned histogram data for imaginary valued, polarisation A.
- Return type
pd.DataFrame
- property pol_a_imag_rebinned_histogram_rfi_excised: pandas.DataFrame
Get the rebinned histogram of the imag valued, pol A except those flagged with RFI.
The data frame has the following columns:
Bin - the bin for the histogram count.
Count - the number/count for the bin
- Returns
a data frame for rebinned histogram data for imaginary valued, polarisation A except those flagged with RFI.
- Return type
pd.DataFrame
- property pol_a_real_channel_stats: pandas.DataFrame
Get the real valued, polarisation A channel statistics.
The data frame has the following columns:
Channel - the channel number the statistics are for.
Channel Freq. (MHz) - the centre frequency for the channel.
Mean - the mean of the data for each polarisation and dimension, averaged over all channels.
Variance - the variance of the data for each polarisation and dimension, averaged over all channels.
Clipped - number of clipped input samples (maximum level) for each polarisation, dimension, averaged over all channels.
- Returns
a data frame of the real component of polarisation A with statistics for each channel.
- Return type
pd.DataFrame
- property pol_a_real_histogram: pandas.DataFrame
Get the histogram of the real valued, polarisation A, input data integer states.
The number of bins in the histogram is 2^(number of bits). For 8 bit data this is 256 bins and for 16 bit data this is 65536 bins.
The data frame has the following columns:
Bin - the bin for the histogram count.
Count - the number/count for the bin
- Returns
a data frame for histogram data for real valued, polarisation A, voltage data.
- Return type
pd.DataFrame
- property pol_a_real_histogram_rfi_excised: pandas.DataFrame
Get the histogram of the real valued, pol A, input data from all channels not flagged for RFI.
The number of bins in the histogram is 2^(number of bits). For 8 bit data this is 256 bins and for 16 bit data this is 65536 bins.
The data frame has the following columns:
Bin - the bin for the histogram count.
Count - the number/count for the bin
- Returns
a data frame for histogram data for real valued, polarisation A, voltage data from all channels not flagged for RFI.
- Return type
pd.DataFrame
- property pol_a_real_rebinned_histogram: pandas.DataFrame
Get the rebinned histogram of the real valued, pol A.
The data frame has the following columns:
Bin - the bin for the histogram count.
Count - the number/count for the bin
- Returns
a data frame for rebinned histogram data for real valued, polarisation A.
- Return type
pd.DataFrame
- property pol_a_real_rebinned_histogram_rfi_excised: pandas.DataFrame
Get the rebinned histogram of the real valued, pol A except those flagged with RFI.
The data frame has the following columns:
Bin - the bin for the histogram count.
Count - the number/count for the bin
- Returns
a data frame for rebinned histogram data for real valued, polarisation A except those flagged with RFI.
- Return type
pd.DataFrame
- property pol_a_rebinned_histogram2d: nptyping.NDArray.(typing.Literal['NRebin, NRebin'], nptyping.UInt32)
Get the rebinned 2D histogram data for polarisation A.
This returns a Numpy array with data for all frequencies.
the first array dimension is the real valued data.
the second array dimension is the imaginary valued data.
- Returns
the rebinned 2D histogram data for polarisation A.
- Return type
np.ndarray
- property pol_a_rebinned_histogram2d_rfi_excised: nptyping.NDArray.(typing.Literal['NRebin, NRebin'], nptyping.UInt32)
Get the rebinned 2D histogram data for polarisation A except frequencies flagged with RFI.
This returns a Numpy array with data for frequnecies that aren’t RFI excised.
the first array dimension is the real valued data.
the second array dimension is the imaginary valued data.
- Returns
the rebinned 2D histogram data for polarisation A.
- Return type
np.ndarray
- property pol_a_spectral_power: pandas.DataFrame
Get the mean and max spectral power values for each channel for polarisation A.
The data frame has the following columns:
Channel - the channel number the statistics are for.
Mean - the mean of the spectral power for the current channel.
Max - the maximum of the spectral power for the current channel over the time sample of the statistics file.
- Returns
the mean and max spectral power values for each channel for polarisation A.
- Return type
pd.DataFrame
- property pol_a_spectrogram: nptyping.NDArray.(typing.Literal['NFreqBin, NTimeBin'], nptyping.Float32)
Get the spectrogram data for polarisation A.
This returns a Numpy array that can be used with Matplotlib to plot a Spectrogram. The data in the spectogram in binned by channel and within time (see
Num. Frequency Bins
,Num. Temporal Bins
inheader
for more details.)- Returns
the spectrogram data for polarisation A.
- Return type
np.ndarray
- property pol_a_timeseries: pandas.DataFrame
Get the timeseries data for polarisation A for all frequencies.
The timeseries is binned in time (see
Num. Temporal Bins
inheader
) and is summed over all frequencies.The data frame has the following columns:
Temporal Bin - the time bin.
Time Offset - the offset, in seconds, for the current temporal bin.
Max - the maximum power recorded in the temporal bin.
Min - the minimum power recorded in the temporal bin.
Mean - the mean power recorded in the temporal bin.
- Returns
a data frame with the timeseries statistics for polarisation A.
- Return type
pd.DataFrame
- property pol_a_timeseries_rfi_excised: pandas.DataFrame
Get the timeseries data for polarisation A for all frequencies except for RFI excised frequencies.
The timeseries is binned in time (see
Num. Temporal Bins
inheader
) and is summed over all frequencies.The data frame has the following columns:
Temporal Bin - the time bin.
Time Offset - the offset, in seconds, for the current temporal bin.
Max - the maximum power recorded in the temporal bin.
Min - the minimum power recorded in the temporal bin.
Mean - the mean power recorded in the temporal bin.
- Returns
a data frame with the timeseries statistics for polarisation B except for frequencies that have been RFI excised.
- Return type
pd.DataFrame
- property pol_b_channel_stats: pandas.DataFrame
Get the polarisation B channel statistics.
This property includes both the real and complex dimension of the data. The following utility properties are provided to get the statistics of each dimension directly:
The data frame has the following columns:
Channel - the channel number the statistics are for.
Channel Freq. (MHz) - the centre frequency for the channel.
Mean - the mean of the data for each polarisation and dimension, averaged over all channels.
Variance - the variance of the data for each polarisation and dimension, averaged over all channels.
Clipped - number of clipped input samples (maximum level) for each polarisation, dimension, averaged over all channels.
The Pandas frame has a MultiIndex key using the
Channel
, andDimension
columns.- Returns
a data frame of polarisation B with statistics for each channel split complex voltage dimension.
- Return type
pd.DataFrame
- property pol_b_imag_channel_stats: pandas.DataFrame
Get the imaginary valued, polarisation B channel statistics.
The data frame has the following columns:
Channel - the channel number the statistics are for.
Channel Freq. (MHz) - the centre frequency for the channel.
Mean - the mean of the data for each polarisation and dimension, averaged over all channels.
Variance - the variance of the data for each polarisation and dimension, averaged over all channels.
Clipped - number of clipped input samples (maximum level) for each polarisation, dimension, averaged over all channels.
- Returns
a data frame of the imaginary component of polarisation B with statistics for each channel.
- Return type
pd.DataFrame
- property pol_b_imag_histogram: pandas.DataFrame
Get the histogram of the imaginary valued, polarisation B, input data integer states.
The number of bins in the histogram is 2^(number of bits). For 8 bit data this is 256 bins and for 16 bit data this is 65536 bins.
The data frame has the following columns:
Bin - the bin for the histogram count.
Count - the number/count for the bin
- Returns
a data frame for histogram data for imaginary valued, polarisation B, voltage data.
- Return type
pd.DataFrame
- property pol_b_imag_histogram_rfi_excised: pandas.DataFrame
Get the histogram of the imag valued, pol B, input data from all channels not flagged for RFI.
The number of bins in the histogram is 2^(number of bits). For 8 bit data this is 256 bins and for 16 bit data this is 65536 bins.
The data frame has the following columns:
Bin - the bin for the histogram count.
Count - the number/count for the bin
- Returns
a data frame for histogram data for imaginary valued, polarisation B, voltage data from all channels not flagged for RFI.
- Return type
pd.DataFrame
- property pol_b_imag_rebinned_histogram: pandas.DataFrame
Get the rebinned histogram of the imaginary valued, pol B.
The data frame has the following columns:
Bin - the bin for the histogram count.
Count - the number/count for the bin
- Returns
a data frame for rebinned histogram data for imaginary valued, polarisation B.
- Return type
pd.DataFrame
- property pol_b_imag_rebinned_histogram_rfi_excised: pandas.DataFrame
Get the rebinned histogram of the imag valued, pol B except those flagged with RFI.
The data frame has the following columns:
Bin - the bin for the histogram count.
Count - the number/count for the bin
- Returns
a data frame for rebinned histogram data for imaginary valued, polarisation B except those flagged with RFI.
- Return type
pd.DataFrame
- property pol_b_real_channel_stats: pandas.DataFrame
Get the real valued, polarisation B channel statistics.
The data frame has the following columns:
Channel - the channel number the statistics are for.
Channel Freq. (MHz) - the centre frequency for the channel.
Mean - the mean of the data for each polarisation and dimension, averaged over all channels.
Variance - the variance of the data for each polarisation and dimension, averaged over all channels.
Clipped - number of clipped input samples (maximum level) for each polarisation, dimension, averaged over all channels.
- Returns
a data frame of the real component of polarisation B with statistics for each channel.
- Return type
pd.DataFrame
- property pol_b_real_histogram: pandas.DataFrame
Get the histogram of the real valued, polarisation B, input data integer states.
The number of bins in the histogram is 2^(number of bits). For 8 bit data this is 256 bins and for 16 bit data this is 65536 bins.
The data frame has the following columns:
Bin - the bin for the histogram count.
Count - the number/count for the bin
- Returns
a data frame for histogram data for real valued, polarisation B, voltage data.
- Return type
pd.DataFrame
- property pol_b_real_histogram_rfi_excised: pandas.DataFrame
Get the histogram of the real valued, pol B, input data from all channels not flagged for RFI.
The number of bins in the histogram is 2^(number of bits). For 8 bit data this is 256 bins and for 16 bit data this is 65536 bins.
The data frame has the following columns:
Bin - the bin for the histogram count.
Count - the number/count for the bin
- Returns
a data frame for histogram data for real valued, polarisation B, voltage data from all channels not flagged for RFI.
- Return type
pd.DataFrame
- property pol_b_real_rebinned_histogram: pandas.DataFrame
Get the rebinned histogram of the real valued, pol B.
The data frame has the following columns:
Bin - the bin for the histogram count.
Count - the number/count for the bin
- Returns
a data frame for rebinned histogram data for real valued, polarisation B.
- Return type
pd.DataFrame
- property pol_b_real_rebinned_histogram_rfi_excised: pandas.DataFrame
Get the rebinned histogram of the real valued, pol B except those flagged with RFI.
The data frame has the following columns:
Bin - the bin for the histogram count.
Count - the number/count for the bin
- Returns
a data frame for rebinned histogram data for real valued, polarisation B except those flagged with RFI.
- Return type
pd.DataFrame
- property pol_b_rebinned_histogram2d: nptyping.NDArray.(typing.Literal['NRebin, NRebin'], nptyping.UInt32)
Get the rebinned 2D histogram data for polarisation B.
This returns a Numpy array with data for all frequencies.
the first array dimension is the real valued data.
the second array dimension is the imaginary valued data.
- Returns
the rebinned 2D histogram data for polarisation B.
- Return type
np.ndarray
- property pol_b_rebinned_histogram2d_rfi_excised: nptyping.NDArray.(typing.Literal['NRebin, NRebin'], nptyping.UInt32)
Get the rebinned 2D histogram data for polarisation B except frequencies flagged with RFI.
This returns a Numpy array with data for frequnecies that aren’t RFI excised.
the first array dimension is the real valued data.
the second array dimension is the imaginary valued data.
- Returns
the rebinned 2D histogram data for polarisation B.
- Return type
np.ndarray
- property pol_b_spectral_power: pandas.DataFrame
Get the mean and max spectral power values for each channel for polarisation B.
The data frame has the following columns:
Channel - the channel number the statistics are for.
Mean - the mean of the spectral power for the current channel.
Max - the maximum of the spectral power for the current channel over the time sample of the statistics file.
- Returns
the mean and max spectral power values for each channel for polarisation B.
- Return type
pd.DataFrame
- property pol_b_spectrogram: nptyping.NDArray.(typing.Literal['NFreqBin, NTimeBin'], nptyping.Float32)
Get the spectrogram data for polarisation B.
This returns a Numpy array that can be used with Matplotlib to plot a Spectrogram. The data in the spectogram in binned by channel and within time (see
Num. Frequency Bins
,Num. Temporal Bins
inheader
for more details.)- Returns
the spectrogram data for polarisation B.
- Return type
np.ndarray
- property pol_b_timeseries: pandas.DataFrame
Get the timeseries data for polarisation B for all frequencies.
The timeseries is binned in time (see
Num. Temporal Bins
inheader
) and is summed over all frequencies.The data frame has the following columns:
Temporal Bin - the time bin.
Time Offset - the offset, in seconds, for the current temporal bin.
Max - the maximum power recorded in the temporal bin.
Min - the minimum power recorded in the temporal bin.
Mean - the mean power recorded in the temporal bin.
- Returns
a data frame with the timeseries statistics for polarisation B.
- Return type
pd.DataFrame
- property pol_b_timeseries_rfi_excised: pandas.DataFrame
Get the timeseries data for polarisation B for all frequencies except for RFI excised frequencies.
The timeseries is binned in time (see
Num. Temporal Bins
inheader
) and is summed over all frequencies.The data frame has the following columns:
Temporal Bin - the time bin.
Time Offset - the offset, in seconds, for the current temporal bin.
Max - the maximum power recorded in the temporal bin.
Min - the minimum power recorded in the temporal bin.
Mean - the mean power recorded in the temporal bin.
- Returns
a data frame with the timeseries statistics for polarisation B except for frequencies that have been RFI excised.
- Return type
pd.DataFrame
- property timeseries_bins: nptyping.NDArray.(typing.Literal['NTimeBin'], nptyping.Float64)
Get the timeseries bins used in the spectrogram and timeseries data.