sigpyproc.foldedcube#
Classes for handling folded data cubes.
This module contains the Profile and FoldedData classes for handling 1D and 3D data cubes, respectively.
Classes
An array class to handle a folded 2-D data slice. |
|
An array class to handle a folded 3-D data cube. |
|
An array class to handle a 1-D pulse profile. |
- class sigpyproc.foldedcube.FoldSlice(data, tsamp)[source]#
Bases:
objectAn array class to handle a folded 2-D data slice.
- Parameters:
- input_array
ArrayLike 2-D array with phase in x axis.
- input_array
- Attributes:
Methods
Return the pulse profile from the slice.
Normalise the slice by dividing each row by its mean.
- Returns:
ndarray2-D array array
- property data#
The data slice (
numpy.ndarray, read-only).
- class sigpyproc.foldedcube.FoldedData(data, hdr, period, dm, accel=0)[source]#
Bases:
objectAn array class to handle a folded 3-D data cube.
- Parameters:
- Attributes:
dataThe folded data cube (
numpy.ndarray, read-only).dmThe DM (
float, read-only).headerThe observational metadata (
sigpyproc.header.Header, read-only).nbinsNumber of bins in the data cube(
int, read-only).nsubbandsNumber of subbands in the data cube (
int, read-only).nsubintsNumber of subintegrations in the data cube(
int, read-only).periodThe folding period (
float, read-only).
Methods
centre()Roll the data cube to center the pulse.
Return the data cube collapsed in time.
Get the summed pulse profile from the data cube.
get_subband(nsubband)Get a single subband from the data cube.
get_subint(nsubint)Get a single subintegration from the data cube.
Return the data cube collapsed in frequency.
update_dm(dm)Install a new DM in the data cube.
update_period(period)Install a new folding period in the data cube.
replace_nan
- Returns:
ndarray3-D array of folded data with header metadata
Notes
Input array should have the shape: (number of subintegrations, number of subbands, number of profile bins)
- property data#
The folded data cube (
numpy.ndarray, read-only).
- property header#
The observational metadata (
sigpyproc.header.Header, read-only).
- get_profile()[source]#
Get the summed pulse profile from the data cube.
- Returns:
Profilea 1-D array containing the power as a function of phase
- get_time_phase()[source]#
Return the data cube collapsed in frequency.
- Returns:
FoldSlicea 2-D array containing the time vs. phase plane
- get_freq_phase()[source]#
Return the data cube collapsed in time.
- Returns:
FoldSlicea 2-D array containing the frequency vs. phase plane
- class sigpyproc.foldedcube.Profile(data, tsamp)[source]#
Bases:
objectAn array class to handle a 1-D pulse profile.
- Parameters:
- data
ArrayLike 1-D pulse profile
- data
- Attributes:
dataThe pulse profile data (
numpy.ndarray, read-only).tsampThe sampling time of the profile (
float, read-only).
Methods
compute_mf
- Returns:
ndarray1-D Pulse profile
- property data#
The pulse profile data (
numpy.ndarray, read-only).