spine.constants.columns
Canonical SPINE tensor column conventions.
This module defines the fixed column layouts used throughout SPINE for sparse input tensors, cluster labels, coordinate labels, and PPN targets/predictions. These are not physics categories; they are schema conventions for tensors.
Design notes
Single columns are represented as
enum.IntEnummembers for readable access such asSparseTensorCol.XorClusterLabelCol.PARTICLE.Multi-column selectors are represented as plain tuples so they can be used directly with NumPy and PyTorch indexing without introducing a numerical dependency in the constants package.
Backward-compatible aliases such as
BATCH_COLandCOORD_COLSare kept at module scope so existing code can migrate incrementally.
Classes
|
Columns of the canonical cluster label tensor layout. |
|
Columns of the canonical coordinate-label tensor layout. |
|
Columns of the canonical PPN label tensor layout. |
|
Columns of the canonical PPN prediction tensor layout. |
|
Columns of the canonical sparse tensor layout. |
- class spine.constants.columns.SparseTensorCol(value)[source]
Columns of the canonical sparse tensor layout.
- Attributes:
denominatorthe denominator of a rational number in lowest terms
imagthe imaginary part of a complex number
numeratorthe numerator of a rational number in lowest terms
realthe real part of a complex number
Methods
as_integer_ratio(/)Return integer ratio.
bit_count(/)Number of ones in the binary representation of the absolute value of self.
bit_length(/)Number of bits necessary to represent self in binary.
conjugateReturns self, the complex conjugate of any int.
from_bytes(/, bytes[, byteorder, signed])Return the integer represented by the given array of bytes.
to_bytes(/[, length, byteorder, signed])Return an array of bytes representing an integer.
- BATCH = 0
- X = 1
- Y = 2
- Z = 3
- VALUE = 4
- class spine.constants.columns.ClusterLabelCol(value)[source]
Columns of the canonical cluster label tensor layout.
- Attributes:
denominatorthe denominator of a rational number in lowest terms
imagthe imaginary part of a complex number
numeratorthe numerator of a rational number in lowest terms
realthe real part of a complex number
Methods
as_integer_ratio(/)Return integer ratio.
bit_count(/)Number of ones in the binary representation of the absolute value of self.
bit_length(/)Number of bits necessary to represent self in binary.
conjugateReturns self, the complex conjugate of any int.
from_bytes(/, bytes[, byteorder, signed])Return the integer represented by the given array of bytes.
to_bytes(/[, length, byteorder, signed])Return an array of bytes representing an integer.
- BATCH = 0
- X = 1
- Y = 2
- Z = 3
- VALUE = 4
- CLUSTER = 5
- PARTICLE = 6
- GROUP = 7
- ANCESTOR = 8
- INTERACTION = 9
- NU = 10
- PID = 11
- GROUP_PRIMARY = 12
- INTER_PRIMARY = 13
- VTX_X = 14
- VTX_Y = 15
- VTX_Z = 16
- MOMENTUM = 17
- SHAPE = 18
- class spine.constants.columns.CoordLabelCol(value)[source]
Columns of the canonical coordinate-label tensor layout.
- Attributes:
denominatorthe denominator of a rational number in lowest terms
imagthe imaginary part of a complex number
numeratorthe numerator of a rational number in lowest terms
realthe real part of a complex number
Methods
as_integer_ratio(/)Return integer ratio.
bit_count(/)Number of ones in the binary representation of the absolute value of self.
bit_length(/)Number of bits necessary to represent self in binary.
conjugateReturns self, the complex conjugate of any int.
from_bytes(/, bytes[, byteorder, signed])Return the integer represented by the given array of bytes.
to_bytes(/[, length, byteorder, signed])Return an array of bytes representing an integer.
- BATCH = 0
- START_X = 1
- START_Y = 2
- START_Z = 3
- END_X = 4
- END_Y = 5
- END_Z = 6
- TIME = 7
- SHAPE = 8
- class spine.constants.columns.PPNLabelCol(value)[source]
Columns of the canonical PPN label tensor layout.
- Attributes:
denominatorthe denominator of a rational number in lowest terms
imagthe imaginary part of a complex number
numeratorthe numerator of a rational number in lowest terms
realthe real part of a complex number
Methods
as_integer_ratio(/)Return integer ratio.
bit_count(/)Number of ones in the binary representation of the absolute value of self.
bit_length(/)Number of bits necessary to represent self in binary.
conjugateReturns self, the complex conjugate of any int.
from_bytes(/, bytes[, byteorder, signed])Return the integer represented by the given array of bytes.
to_bytes(/[, length, byteorder, signed])Return an array of bytes representing an integer.
- BATCH = 0
- X = 1
- Y = 2
- Z = 3
- TYPE = 4
- PARTICLE = 5
- ENDPOINT = 6
- class spine.constants.columns.PPNPredCol(value)[source]
Columns of the canonical PPN prediction tensor layout.
- Attributes:
denominatorthe denominator of a rational number in lowest terms
imagthe imaginary part of a complex number
numeratorthe numerator of a rational number in lowest terms
realthe real part of a complex number
Methods
as_integer_ratio(/)Return integer ratio.
bit_count(/)Number of ones in the binary representation of the absolute value of self.
bit_length(/)Number of bits necessary to represent self in binary.
conjugateReturns self, the complex conjugate of any int.
from_bytes(/, bytes[, byteorder, signed])Return the integer represented by the given array of bytes.
to_bytes(/[, length, byteorder, signed])Return an array of bytes representing an integer.
- RAW_DX = 0
- RAW_DY = 1
- RAW_DZ = 2
- RAW_TYPE_0 = 3
- RAW_TYPE_1 = 4
- RAW_TYPE_2 = 5
- RAW_TYPE_3 = 6
- RAW_TYPE_4 = 7
- RAW_POS_0 = 8
- RAW_POS_1 = 9
- SCORE_NEG = 4
- SCORE_POS = 5
- OCCUPANCY = 6
- CLASS_0 = 7
- CLASS_1 = 8
- CLASS_2 = 9
- CLASS_3 = 10
- CLASS_4 = 11
- SHAPE = 12
- END_NEG = 13
- END_POS = 14