CASA: DFT Dynamic Spectra (pwkit.environments.casa.dftdynspec)¶
This module provides code to extract dynamic spectra from CASA Measurement Sets. CASA doesn’t have a task that does this.
The function dftdynspec() computes the dynamic spectrum of a point
source using a discrete Fourier transform of its visibilities. The function
dftdynspec_cli() provides a hook to launch the computation from a
command-line program.
You can launch a computation from the command line using the command
casatask dftdynspec.
Due to limitations in the documentation system we’re using, the options to the
dynamic spectrum computation are not documented here. You can read about them
by running casatask dftdynspec --help.
The Loader class¶
Unlike the other DFT tasks, dftdynspec() produces output that is not
easily represented as a table. It is saved to disk as a set of Numpy arrays.
The Loader class provides a convenient mechanism for loading an
output data set.
To load and manipulate data, create a Loader instance and then access
the various arrays described below:
from pwkit.environments.casa.dftdynspec import Loader
path = 'mydataset.npy' # this gets customized
ds = Loader(path)
print('Maximum real part:', ds.reals.max())
- class pwkit.environments.casa.dftdynspec.Loader(path)[source]¶
Read in a dynamic-spectrum file produced by the dftdynspec task.
Constructor arguments
- path
The path of the file to read.
Members
- counts = None¶
A 2D array recording the number of visibilities that went into each average. Shape is (mjds.size, freqs.size).
- freqs = None¶
A 1D sorted array of the frequencies of the data samples, measured in GHz.
- imags = None¶
A 2D array of the imaginary parts of the averaged visibilities. Shape is (mjds.size, freqs.size).
- mjds = None¶
A 1D sorted array of the MJDs of the data samples.
- property n_freqs¶
The size of the frequency axis of the data arrays; an integer.
- property n_mjds¶
The size of the MJD axis of the data arrays; an integer.
- reals = None¶
A 2D array of the real parts of the averaged visibilities. Shape is (mjds.size, freqs.size).
- u_imags = None¶
A 2D array of the estimated uncertainties on the imaginary parts of the averaged visibilities. Shape is (mjds.size, freqs.size).
- u_reals = None¶
A 2D array of the estimated uncertainties on the real parts of the averaged visibilities. Shape is (mjds.size, freqs.size).