sigpyproc.FourierSeries¶
-
class
sigpyproc.FourierSeries.FourierSeries(input_array, header)[source]¶ Bases:
numpy.ndarrayClass to handle output of FFT’d time series.
- Parameters
input_array (
numpy.ndarray) – 1 dimensional array of shape (nsamples)header (
Header) – observational metadata
-
conjugate()[source]¶ Conjugate the Fourier series.
- Returns
conjugated Fourier series.
- Return type
Note
Function assumes that the Fourier series is the non-conjugated product of a real to complex FFT.
-
formSpec(interpolated=True)[source]¶ Form power spectrum.
- Parameters
interpolated (bool) – flag to set nearest bin interpolation (def=True)
- Returns
a power spectrum
- Return type
-
iFFT()[source]¶ Perform 1-D complex to real inverse FFT using FFTW3.
- Returns
a time series
- Return type
-
reconProf(freq, nharms=32)[source]¶ Reconstruct the time domain pulse profile from a signal and its harmonics.
- Parameters
- Returns
a pulse profile
- Return type
-
rednoise(startwidth=6, endwidth=100, endfreq=1.0)[source]¶ Perform rednoise removal via Presto style method.
- Parameters
- Returns
whitened fourier series
- Return type
-
class
sigpyproc.FourierSeries.PowerSpectrum(input_array, header)[source]¶ Bases:
numpy.ndarrayClass to handle power spectra.
- Parameters
input_array (
numpy.ndarray) – 1 dimensional array of shape (nsamples)header (
Header) – observational metadata
-
harmonicFold(nfolds=1)[source]¶ Perform Lyne-Ashworth harmonic folding of the power spectrum.
- Parameters
nfolds (int) – number of harmonic folds to perform (def=1)
- Returns
A list of folded spectra where the i th element is the spectrum folded i times.
- Return type
list()ofPowerSpectrum