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
  1. Array of softmax scores associated with secondary and primary

Type:

np.ndarray

start_dir
  1. 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_sum

Total deposition value for the entire object.

enum_attrs

Fetches HDF5-friendly enumerator descriptors for enum-backed fields.

enum_dicts

Fetches the dictionary of enumerated attributes and their enumerator descriptors.

enum_values

Fetches reverse enum lookups from stored values to symbolic names.

field_units

Fetches the documented units for each field.

index_attrs

Return the tuple of index-bearing attributes.

module_ids

List of modules that contribute to this object.

size

Total 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_offset

depositions_sum

Total deposition value for the entire object.

enum_attrs

Fetches HDF5-friendly enumerator descriptors for enum-backed fields.

enum_dicts

Fetches the dictionary of enumerated attributes and their enumerator descriptors.

enum_values

Fetches reverse enum lookups from stored values to symbolic names.

field_units

Fetches the documented units for each field.

id

index_attrs

Return the tuple of index-bearing attributes.

interaction_id

is_cathode_crosser

is_contained

is_matched

is_primary

is_time_contained

is_truth

length

module_ids

List of modules that contribute to this object.

particle_id

shape

size

Total number of voxels that make up the object.

units

start_dir

end_dir

primary_scores

start_point

end_point

index

orig_index

points

depositions

sources

match_ids

match_overlaps

start_dir: ndarray
end_dir: ndarray
primary_scores: ndarray