Non-Storable Data Types¶
Listed here are datatypes that you may use in your python code, but aren’t directly “serializable” - that is, they aren’t the high level objects that can get stored.
- class larcv.EventID¶
An object to track run / subrun / event identification of a single event. Used for information / data management only; all events are stored with a unique index and do not need a unique EventID.
- clear(self: larcv.pylarcv.EventID) None ¶
- event(*args, **kwargs)¶
Overloaded function.
event(self: larcv.pylarcv.EventID) -> int
Get the
event
value.event(self: larcv.pylarcv.EventID, event: int) -> None
Set the
event
value.
- event_key(self: larcv.pylarcv.EventID) str ¶
- run(*args, **kwargs)¶
Overloaded function.
run(self: larcv.pylarcv.EventID) -> int
Get the
run
value.run(self: larcv.pylarcv.EventID, run: int) -> None
Set the
run
value.
- set_id(self: larcv.pylarcv.EventID, arg0: int, arg1: int, arg2: int) None ¶
- subrun(*args, **kwargs)¶
Overloaded function.
subrun(self: larcv.pylarcv.EventID) -> int
Get the
subrun
value.subrun(self: larcv.pylarcv.EventID, subrun: int) -> None
Set the
subrun
value.
- valid(self: larcv.pylarcv.EventID) bool ¶
Point2D is also available in 3D as Point3D
- class larcv.Point2D¶
A point is a not-very-novel implementation of a multi-value vector object, implemented again here to enable storage and ease-of-use in larcv specific classes.
- direction(self: larcv.pylarcv.Point2D, arg0: larcv.pylarcv.Point2D) larcv.pylarcv.Point2D ¶
- distance(self: larcv.pylarcv.Point2D, arg0: larcv.pylarcv.Point2D) float ¶
- squared_distance(self: larcv.pylarcv.Point2D, arg0: larcv.pylarcv.Point2D) float ¶
- property x¶
Read/write access to the underlying data
x
.
- class larcv.Vertex¶
A
vertex
is a 3+1 dimensional object representing a point in 3D space, at a particular time.- as_point2d(self: larcv.pylarcv.Vertex, PointType: larcv3::PointType_t) larcv.pylarcv.Point2D ¶
Convert 2 coordinates to a Point2D.
- as_point3d(self: larcv.pylarcv.Vertex) larcv.pylarcv.Point3D ¶
Convert x/y/z coordinates to a Point3D.
- dump(self: larcv.pylarcv.Vertex) str ¶
Return the string representation.
- reset(*args, **kwargs)¶
Overloaded function.
reset(self: larcv.pylarcv.Vertex) -> None
Reset
reset(self: larcv.pylarcv.Vertex, arg0: float, arg1: float, arg2: float, arg3: float) -> None
Reset
- t(self: larcv.pylarcv.Vertex) float ¶
- x(self: larcv.pylarcv.Vertex) float ¶
- y(self: larcv.pylarcv.Vertex) float ¶
- z(self: larcv.pylarcv.Vertex) float ¶
- class larcv.Voxel¶
A pair of (id, value) that represents a single point of sparse data. The ID is unraveled into spatial coordinates or positions via an ImageMeta object, and ImageMeta can be used to determine the correct ID for a specified position.
Value can be any floating point value; by default, IDs without voxels are interpreted as 0.0, but you may also store 0.0 directly if the empty voxels will have a different interpretation.
- id(self: larcv.pylarcv.Voxel) int ¶
Get the ID of this voxel.
- set(self: larcv.pylarcv.Voxel, id: int, value: float) None ¶
Set the
id
andvalue
of this voxel.
- value(self: larcv.pylarcv.Voxel) float ¶
Get the value of this voxel.
- class larcv.VoxelSet¶
A VoxelSet is a sorted collection of Voxels that belong together. There is no ImageMeta associated with a VoxelSet, but when combined with an ImageMeta it is a SparseTensor (with a dimension).
VoxelSet implements several convienence methods for manipulating all voxels in the collection at once, for thresholding, reductions (min/max/sum), and adding voxels.
- add(self: larcv.pylarcv.VoxelSet, arg0: larcv.pylarcv.Voxel) None ¶
Add a new voxel. If voxel already exists at that id, values are added
- as_vector(self: larcv.pylarcv.VoxelSet) List[larcv.pylarcv.Voxel] ¶
Return the vector of
voxels
held by this set.
- clear_data(self: larcv.pylarcv.VoxelSet) None ¶
Remove all voxels from this set.
- emplace(self: larcv.pylarcv.VoxelSet, id: int, value: float, add: bool) None ¶
Create and insert a new voxel.
- find(self: larcv.pylarcv.VoxelSet, id: int) larcv.pylarcv.Voxel ¶
Find the voxel in the set with specified
id
. If no matching voxel is found, the Invalid Voxel is returned.
- id(*args, **kwargs)¶
Overloaded function.
id(self: larcv.pylarcv.VoxelSet) -> int
Return the ID Of this VoxelSet
id(self: larcv.pylarcv.VoxelSet, arg0: int) -> None
Set the ID Of this VoxelSet
- indexes(self: larcv.pylarcv.VoxelSet) numpy.ndarray[numpy.uint64] ¶
Get the indexes of all voxels in this set.
- insert(self: larcv.pylarcv.VoxelSet, arg0: larcv.pylarcv.Voxel) None ¶
Insert a new voxel. If voxel already exists at that id, value updated with new value.
- max(self: larcv.pylarcv.VoxelSet) float ¶
Return the max of the voxel set.
- mean(self: larcv.pylarcv.VoxelSet) float ¶
Return the mean of the voxel set.
- min(self: larcv.pylarcv.VoxelSet) float ¶
Return the min of the voxel set.
- reserve(self: larcv.pylarcv.VoxelSet, num: int) None ¶
Reserve space for
num
voxels in this set.
- set(self: larcv.pylarcv.VoxelSet, indexes: numpy.ndarray[numpy.uint64], values: numpy.ndarray[numpy.float32]) None ¶
Set the indexes and values of this VoxelSet in one step.
indexes
andvalues
are expected to benumpy
arrays of the same length and suitable dtypes.
- size(self: larcv.pylarcv.VoxelSet) int ¶
Return the size of the voxel set.
- sum(self: larcv.pylarcv.VoxelSet) float ¶
Return the sum of the voxel set.
- threshold(self: larcv.pylarcv.VoxelSet, min: float, max: float) None ¶
Remove all voxels from this set where value <
min
orvalue
> max.
- threshold_max(self: larcv.pylarcv.VoxelSet, min: float) None ¶
Remove all voxels from this set where value >
max
- threshold_min(self: larcv.pylarcv.VoxelSet, min: float) None ¶
Remove all voxels from this set where value <
min
- values(self: larcv.pylarcv.VoxelSet) numpy.ndarray[numpy.float32] ¶
Get the values of all voxels in this set.
- class larcv.VoxelSetArray¶
A VoxelSetArray is a collection of VoxelSets that belong together. There is no ImageMeta associated with a VoxelSetArray, but when combined with an ImageMeta it is a SparseCluster (with a dimension).
VoxelSetArray implements several convienence methods for manipulating all voxels in the collection at once, for thresholding, reductions (min/max/sum), and adding voxels.
- as_vector(self: larcv.pylarcv.VoxelSetArray) List[larcv.pylarcv.VoxelSet] ¶
Return all the VoxelSets as a vector.
- clear_data(self: larcv.pylarcv.VoxelSetArray) None ¶
Clear all data.
- insert(self: larcv.pylarcv.VoxelSetArray, voxel_set: larcv.pylarcv.VoxelSet) None ¶
Insert a VoxelSet into the array.
- max(self: larcv.pylarcv.VoxelSetArray) float ¶
Return the max of all voxels in all voxel sets
- mean(self: larcv.pylarcv.VoxelSetArray) float ¶
Return the mean of all voxels in all voxel sets
- min(self: larcv.pylarcv.VoxelSetArray) float ¶
Return the min of all voxels in all voxel sets
- resize(self: larcv.pylarcv.VoxelSetArray, arg0: int) None ¶
Change the size of this VoxelSetArray.
- size(self: larcv.pylarcv.VoxelSetArray) int ¶
Return the total number of VoxelSets in this VoxelSetArray.
- sum(self: larcv.pylarcv.VoxelSetArray) float ¶
Return the sum of all voxels in all voxel sets
- threshold(self: larcv.pylarcv.VoxelSetArray, min: float, max: float) None ¶
Remove all voxels from this array where value <
min
orvalue
> max.
- threshold_max(self: larcv.pylarcv.VoxelSetArray, min: float) None ¶
Remove all voxels from this set where value >
max
- threshold_min(self: larcv.pylarcv.VoxelSetArray, min: float) None ¶
Remove all voxels from this set where value <
min
- voxel_set(self: larcv.pylarcv.VoxelSetArray, id: int) larcv.pylarcv.VoxelSet ¶
Return the VoxelSet at specified
id
.
- writeable_voxel_set(self: larcv.pylarcv.VoxelSetArray, id: int) larcv.pylarcv.VoxelSet ¶
Access a modifiable VoxelSet at
id