sigpyproc.TimeSeries¶
-
class
sigpyproc.TimeSeries.TimeSeries(input_array, header)[source]¶ Bases:
numpy.ndarrayClass for handling pulsar data in time series.
- Parameters
input_array (
numpy.ndarray) – 1 dimensional array of shape (nsamples)header (
Header) – observational metadata
-
applyBoxcar(width)[source]¶ Apply a boxcar filter to the time series.
- Parameters
width (int) – width in bins of filter
- Returns
filtered time series
- Return type
Note
Time series returned is of size nsamples-width with width/2 removed removed from either end.
-
correlate(other)[source]¶ Cross correlate with another time series of the same length.
- Parameters
other (
numpy.ndarray) – array to correlate with- Returns
time series containing the correlation
- Return type
-
downsample(factor)[source]¶ Downsample the time series.
- Parameters
factor (int) – factor by which time series will be downsampled
- Returns
downsampled time series
- Return type
Note
Returned time series is of size nsamples//factor
-
fold(period, accel=0, nbins=50, nints=32)[source]¶ Fold time series into discrete phase and subintegration bins.
- Parameters
- Returns
data cube containing the folded data
- Return type
-
pad(npad)[source]¶ Pad a time series with mean valued data.
- Parameters
npad – number of padding points
- Returns
padded time series
- Return type
-
resample(accel, jerk=0)[source]¶ Perform time domain resampling to remove acceleration and jerk.
- Parameters
- Returns
resampled time series
- Return type
-
runningMean(window=10001)[source]¶ Filter time series with a running mean.
- Parameters
window (int) – width in bins of running mean filter
- Returns
filtered time series
- Return type
Note
Window edges will be dealt with only at the start of the time series.
-
runningMedian(window=10001)[source]¶ Filter time series with a running median.
- Parameters
window (int) – width in bins of running median filter
- Returns
filtered time series
- Return type
Note
Window edges will be dealt with only at the start of the time series.