Domain
- class stride.problem.domain.Space(shape=None, spacing=None, extra=None, absorbing=None)[source]
Bases:
object
This defines the spatial grid over which the problem is defined.
The spatial grid consists of an inner domain defined by
shape
and an external padding defined byextra
. Within this extra region, a further sub-region is defined as absorbing for boundary purposes as defined byabsorbing
.The
spacing
defines the axis-wise spacing of the grid.- Parameters:
shape (tuple) – Shape of the inner domain.
spacing (tuple or float) – Axis-wise spacing of the grid, in metres.
extra (tuple) – Amount of axis-wise extra space around the inner domain.
absorbing (tuple) – Portion of the extra space that corresponds to absorbing boundaries.
- extended_grid
Spatial points corresponding to the grid of the extended domain, as a tuple of 1d-arrays.
- extended_indices
Indices corresponding to the grid of the extended domain, as a tuple of 1d-arrays.
- extended_mesh
Create the mesh of spatial locations the full, extended domain, as a tuple of ndarray.
- extended_mesh_indices
Create the mesh of indices in the extended domain, as a tuple of ndarray.
- property extended_size
Alias for the extended domain limit.
- grid
Spatial points corresponding to the grid of the inner domain, as a tuple of 1d-arrays.
- indices
Indices corresponding to the grid of the inner domain, as a tuple of 1d-arrays.
- property inner
Slices defining the inner domain, as a tuple of slices.
- property inner_mask
Tensor of the shape of the space grid with gridpoints wihtin inner domain set to 1 and those outside set to 0, as an ndarray.
- mesh
Create the mesh of spatial locations in the inner domain, as a tuple of ndarray.
- mesh_indices
Create the mesh of indices in the inner domain, as a tuple of ndarray.
- property size
Alias for the domain limit.
- class stride.problem.domain.Time(start=None, step=None, num=None, stop=None)[source]
Bases:
object
This defines the temporal grid over which the problem is defined
A time grid is fully defined by three of its arguments: start, stop, step or num.
The time grid can be extended with a certain amount of padding, generating an inner domain and an extended domain, similar to that seen in the Space.
- Parameters:
start (float, optional) – Point at which time starts, in seconds.
step (float, optional) – Step between time points, in seconds.
num (int, optional) – Number of time points in the grid.
stop (float, optional) – Point at which time ends, in seconds.
- extended_grid
Time points corresponding to the grid of the extended domain, as a 1d-array.
- grid
Time points corresponding to the grid of the inner domain, as a 1d-array.
- property inner
Slice defining the inner domain.
- class stride.problem.domain.SlowTime(frame_rate=None, acq_rate=None, frame_step=None, acq_step=None, num_frame=None, num_acq=None)[source]
Bases:
object
This defines the slow temporal grid over which the problem is defined
- Parameters:
frame_rate (float, optional) – Sampling frequency between frames, in Hz.
acq_rate (float, optional) – Sampling frequency between acquisitions, in Hz.
frame_step (float, optional) – Time step between frames, in seconds.
acq_step (float, optional) – Time step between frames, in seconds.
num_frame (int, optional) – Number of frames in the grid.
num_acq (int, optional) – Number of acquisitions per frame.
- property extended_num
Total number of steps.
- grid
Time points corresponding to the grid, as a 1d-array.
- property inner
Slice defining the inner domain.
- property num
Total number of steps.