ConjugateSpectrum

class screens.ConjugateSpectrum(conjspec, tau, fd, noise=None)[source] [edit on github]

Bases: object

Conjugate spectrum and methods to fit it.

The code is meant to be agnostic to which axes are which, but some may assume a shape of (..., doppler_axis, delay_axis).

Parameters:
conjspecndarray

Fourier transform of a dynamic spectrum.

fdQuantity

Doppler factors of the conjugate spectrum. Normally time conjugate but can be arbitrary (e.g., conjugate of f*t). Should have the the proper shape to broadcast with conjspec.

tauQuantity

Delays of the conjugate spectrum. Should have the proper shape to broadcast with dynspec.

noisefloat

The uncertainty in the real and imaginary components of the conjugate spectrum.

Attributes Summary

secspec

Secondary spectrum, i.e., the power of the conjugate spectrum.

Methods Summary

from_dynamic_spectrum(dynspec[, normalization])

Create a conjugate spectrum from a dynamic one.

Attributes Documentation

secspec

Secondary spectrum, i.e., the power of the conjugate spectrum.

Methods Documentation

classmethod from_dynamic_spectrum(dynspec, normalization='mean', **kwargs)[source] [edit on github]

Create a conjugate spectrum from a dynamic one.

Easiest if the input is a DynamicSpectrum instance.

By passing in an explicit time axis using t, one can get a different delay factor conjugate. Particularly useful with t=f*t, which takes into account the frequency dependence of the time variation of scintles.

Note that the dynamic spectrum is assumed to have shape (..., time_axis, frequency_axis).

Parameters:
dynspecarray_like or DynamicSpectrum

Input dynamic spectrum for which the fourier transform will be calculated. If it has attributes f, t, d_eff, theta, magnification, and noise, those will be used as default inputs. TODO: noise is likely wrong!

normalization‘mean’ or None

Normalize dynamic spectrum by its mean and subtract 1 before transforming and ensure the resulting conjugate spectrum is normalized as well, with the 0, 0 element equal unity.

**kwargs

Other arguments to initialize the conjugate spectrum.