spine.data.out.RecoFragment
- class spine.data.out.RecoFragment(is_truth: bool = False, units: str = 'cm', id: int = -1, is_contained: bool = False, is_time_contained: bool = False, is_cathode_crosser: bool = False, is_matched: bool = False, cathode_offset: float = nan, index: ndarray = <factory>, orig_index: ndarray = <factory>, points: ndarray = <factory>, depositions: ndarray = <factory>, sources: ndarray = <factory>, match_ids: ndarray = <factory>, match_overlaps: ndarray = <factory>, particle_id: int = -1, interaction_id: int = -1, is_primary: bool = False, length: float = nan, shape: int = -1, start_point: ndarray = <factory>, end_point: ndarray = <factory>, start_dir: ndarray = <factory>, end_dir: ndarray = <factory>, primary_scores: ndarray = <factory>)[source]
Reconstructed fragment information.
- primary_scores
Array of softmax scores associated with secondary and primary
- Type:
np.ndarray
- start_dir
Fragment direction w.r.t. the start point
- Type:
np.ndarray
- end_dir
(3) Fragment direction w.r.t. the end point (only assigned to track objects)
- Type:
np.ndarray
- Attributes:
depositions_sumTotal deposition value for the entire object.
enum_attrsFetches HDF5-friendly enumerator descriptors for enum-backed fields.
enum_dictsFetches the dictionary of enumerated attributes and their enumerator descriptors.
enum_valuesFetches reverse enum lookups from stored values to symbolic names.
field_unitsFetches the documented units for each field.
index_attrsReturn the tuple of index-bearing attributes.
module_idsList of modules that contribute to this object.
sizeTotal number of voxels that make up the object.
Methods
as_dict([lite, include_derived])Returns the data class as dictionary of (key, value) pairs.
attr_names([include_derived, ...])Return the names of valid attributes on this data class.
from_dict(cls_dict)Builds and returns an object of the class from a dictionary of attributes.
reset_cathode_crosser()Resets the cathode crossing information for the object.
reset_match()Resets the reco/truth matching information for the object.
scalar_dict([attrs, lengths, lite])Returns the data class attributes as a dictionary of scalars.
set_precision([precision])Casts all the vector attributes to a different precision.
shift_indexes(shifts)Apply offsets to index attributes in place.
to_cm(meta)Converts the coordinates of the positional attributes to cm in place.
to_px(meta)Converts the coordinates of the positional attributes to pixel in place.
value_with_units(attr)Fetch an attribute value with its documented units.
- __init__(is_truth: bool = False, units: str = 'cm', id: int = -1, is_contained: bool = False, is_time_contained: bool = False, is_cathode_crosser: bool = False, is_matched: bool = False, cathode_offset: float = nan, index: ndarray = <factory>, orig_index: ndarray = <factory>, points: ndarray = <factory>, depositions: ndarray = <factory>, sources: ndarray = <factory>, match_ids: ndarray = <factory>, match_overlaps: ndarray = <factory>, particle_id: int = -1, interaction_id: int = -1, is_primary: bool = False, length: float = nan, shape: int = -1, start_point: ndarray = <factory>, end_point: ndarray = <factory>, start_dir: ndarray = <factory>, end_dir: ndarray = <factory>, primary_scores: ndarray = <factory>) None
Methods
__init__(is_truth, units, id, is_contained, ...)as_dict([lite, include_derived])Returns the data class as dictionary of (key, value) pairs.
attr_names([include_derived, ...])Return the names of valid attributes on this data class.
from_dict(cls_dict)Builds and returns an object of the class from a dictionary of attributes.
reset_cathode_crosser()Resets the cathode crossing information for the object.
reset_match()Resets the reco/truth matching information for the object.
scalar_dict([attrs, lengths, lite])Returns the data class attributes as a dictionary of scalars.
set_precision([precision])Casts all the vector attributes to a different precision.
shift_indexes(shifts)Apply offsets to index attributes in place.
to_cm(meta)Converts the coordinates of the positional attributes to cm in place.
to_px(meta)Converts the coordinates of the positional attributes to pixel in place.
value_with_units(attr)Fetch an attribute value with its documented units.
Attributes
cathode_offsetdepositions_sumTotal deposition value for the entire object.
enum_attrsFetches HDF5-friendly enumerator descriptors for enum-backed fields.
enum_dictsFetches the dictionary of enumerated attributes and their enumerator descriptors.
enum_valuesFetches reverse enum lookups from stored values to symbolic names.
field_unitsFetches the documented units for each field.
idindex_attrsReturn the tuple of index-bearing attributes.
interaction_idis_cathode_crosseris_containedis_matchedis_primaryis_time_containedis_truthlengthmodule_idsList of modules that contribute to this object.
particle_idshapesizeTotal number of voxels that make up the object.
unitsstart_pointend_pointindexorig_indexpointsdepositionssourcesmatch_idsmatch_overlaps- start_dir: ndarray
- end_dir: ndarray
- primary_scores: ndarray