NDCubeSequence¶
-
class
ndcube.
NDCubeSequence
(data_list, meta=None, common_axis=None, **kwargs)[source] [edit on github]¶ Bases:
object
Class representing list of cubes.
Parameters: - data_list (
list
) – List of cubes. - meta (
dict
or None) – The header of the NDCubeSequence. - common_axis (
int
or None) – The data axis which is common between the NDCubeSequence and the Cubes within. For example, if the Cubes are sequenced in chronological order and time is one of the zeroth axis of each Cube, then common_axis should be se to 0. This enables the option for the NDCubeSequence to be indexed as though it is one single Cube.
Attributes Summary
common_axis_extra_coords
cube_like_dimensions
cube_like_world_axis_physical_types
dimensions
index_as_cube
Method to slice the NDCubesequence instance as a single cube sequence_axis_extra_coords
world_axis_physical_types
Methods Summary
explode_along_axis
(axis)Separates slices of NDCubes in sequence along a given cube axis into (N-1)DCubes. plot
(*args, **kwargs)Attributes Documentation
-
common_axis_extra_coords
¶
-
cube_like_dimensions
¶
-
cube_like_world_axis_physical_types
¶
-
dimensions
¶
-
index_as_cube
¶ Method to slice the NDCubesequence instance as a single cube
Example
>>> # Say we have three Cubes each cube has common_axis=0 is time and shape=(3,3,3) >>> data_list = [cubeA, cubeB, cubeC] >>> cs = NDCubeSequence(data_list, meta=None, common_axis=0) >>> # return zeroth time slice of cubeB in via normal NDCubeSequence indexing. >>> cs[1,:,0,:] >>> # Return same slice using this function >>> cs.index_sequence_as_cube[3:6, 0, :]
-
sequence_axis_extra_coords
¶
-
world_axis_physical_types
¶
Methods Documentation
-
explode_along_axis
(axis)[source] [edit on github]¶ Separates slices of NDCubes in sequence along a given cube axis into (N-1)DCubes.
Parameters: axis ( int
) – The axis along which the data is to be changed.
-
plot
(*args, **kwargs)[source] [edit on github]¶
- data_list (