pninexus.h5cpp.dataspace
¶
SelectionOperation
¶
-
class
pninexus.h5cpp.dataspace.
SelectionOperation
¶ Enumeration type determining how a particular selection is applied on a dataspace (and on possible previous selections).
-
SET
replace all previously applied with this selection¶
-
OR
use a logical or relation¶
-
AND
logical and relation¶
-
XOR
logical xor operation¶
-
NOTB
???¶
-
NOTA
???¶
-
APPEND
???¶
-
PREPEND
???¶
-
SelectionManager
¶
-
class
pninexus.h5cpp.dataspace.
SelectionManager
¶ SelectionManager
controls the application of selections on a particular dataspace.-
all
()¶ select all elements in the dataset
-
none
()¶ deselect all elements in the dataset
-
size
¶ Read-only property returning the number of elements currently selected in the dataspace.
- Returns
number of selected elements
- Return type
integer
-
type
¶ Read only property returning the particular type of selections applied.
- Returns
type of applied selections
- Return type
-
__call__
()¶ Call self as a function.
Apply a selection to a dataset.
hyperslab = Hyperslab() dataset.selection(SelectionOperation.SET,hyperslab)
- Parameters
operation (SelectionOperation) – how the selection should be applied
selection (Selection) – the selection to apply
- Raises
RuntimError – in case of a failure
-
Dataspace
¶
-
class
pninexus.h5cpp.dataspace.
Dataspace
¶ Base class of all dataspaces.
-
is_valid
¶ Returns
True
if the dataspace is a valid HDF5 object,False
otherwise.- Returns
True
if valid,False
otherwise- Return type
boolean
-
selection
¶ Read only property providing access to the
SelectionManager
instance of the dataspace.
-
size
¶ Read-only property returning the number of data elements in the current dataspace. This will always return the number of elements for the total dataspace independent of whether a selection has been applied to that dataspace or not.
- Returns
number of data elements
- Return type
integer
-
type
¶ Read only attribute returning the type of the dataspace.
- Returns
dataspace type
- Return type
-
Simple
¶
-
class
pninexus.h5cpp.dataspace.
Simple
¶ Simple dataspace describing a regular array of data elements. In order to construct an instance of
Simple
use eitherdataspace = Simple((10,20))
Which will produce a dataspace where the current and maximum dimensions are equal. Or, for extensible datasets one could use
space = Simple((0,1024),(pni.io.h5cpp.dataspace.UNLIMITED,1024))
where the second tuple provides the maximum dimensions for the dataspace.
-
current_dimensions
¶ read-only property returning the current dimensions of the simple dataspace
- Returns
tuple with dimensions
- Return type
tuple of integers
-
maximum_dimensions
¶ read-only attribute returning the current maximum dimensions of the simple dataspace
- Returns
tuple with dimensions
- Return type
tuple of integers
-
rank
¶ read-only property returning the number of dimensions of the dataspace
-
dimensions
()¶ Set the current and maximum dimensions of a dataspace
- Parameters
current (tuple/list) – tuple or list with the current dimensions
maximum (tuple/list) – tuple or list with the maximum dimensions
-