TimePlaneTransformο
Stability: Stable
What it isο
Use TimePlaneTransform for transform outputs with a distinguished time axis and a physically meaningful 2D plane at each timestep.
Representative Signaturesο
TimePlaneTransform(data3d, kind="custom", meta=None)
TimePlaneTransform.plane(drop_axis, drop_index)
Minimal Exampleο
from gwexpy.types import TimePlaneTransform
import numpy as np
obj = TimePlaneTransform((np.zeros((4, 8, 8)), np.arange(4), np.arange(8), np.arange(8)))
plane = obj.at_time(0)
API Referenceο
The detailed generated API continues below on this page.
Inherits from: object
A container for 3D data with a preferred (time, axis1, axis2) structure, commonly produced by time-frequency or similar transforms.
This class wraps an Array3D to enforce semantic structure:
Axis 0 is βtimeβ
Axis 1 and 2 are symmetric spatial/frequency dimensions.
Methodsο
__init__ο
__init__(self, data3d, *, kind='custom', meta=None)
Initialize a TimePlaneTransform.
Parametersο
data3d : Array3D or tuple
The underlying 3D data.
Preferred: an Array3D instance.
Supported tuple format: (value, time_axis, axis1, axis2, unit/metadata).
kind : str, optional
A string describing the type of transform (e.g., βstltβ, βbispectrumβ). Default is βcustomβ.
meta : dict, optional
Additional metadata dictionary. Default is None (stored as empty dict).
at_sigmaο
at_sigma(self, sigma)
Extract a 2D plane (Spectrogram-like) at a specific sigma index (if axis1 is sigma) or value.
This assumes axis 1 is sigma.
at_timeο
at_time(self, t, *, method='nearest')
Extract a Plane2D at the specific time t.
Parametersο
t : Quantity or float Time value. If float, assumed to be in the unit of the time axis. method : str, optional βnearestβ (default). Future versions may support interpolation.
Returnsο
Plane2D
axesο
Return the 3 AxisDescriptors: (time, axis1, axis2).
axis1ο
AxisDescriptor for the first symmetric axis (axis 1).
axis2ο
AxisDescriptor for the second symmetric axis (axis 2).
kindο
String describing the type of transform (e.g., βstltβ, βbispectrumβ).
metaο
Additional metadata dictionary.
ndimο
Number of dimensions (always 3).
planeο
plane(self, drop_axis, drop_index, *, axis1=None, axis2=None)
Extract a 2D plane by slicing at a specific index along one axis.
Parametersο
drop_axis : int or str
The axis to slice along (remove).
drop_index : int
Integer index to select along drop_axis.
axis1 : str or int, optional
The generic axis 1 for the resulting Plane2D.
axis2 : str or int, optional
The generic axis 2 for the resulting Plane2D.
Returnsο
Plane2D
shapeο
Shape of the 3D data array (time, axis1, axis2).
timesο
Coordinate array of the time axis (axis 0).
to_array3dο
to_array3d(self)
Return the underlying Array3D object (advanced usage).
unitο
Physical unit of the data values.
valueο
The underlying data values as numpy array.