point_cloud Module
Contains the Spyral definition of a point cloud
PointCloud
dataclass
Geometric representation of an AT-TPC event
A PointCloud is a geometric representation of an event in the AT-TPC The GET traces are converted into points in space within the AT-TPC
Overloads the length (len()) operator with the number of points in the cloud (number of rows in the data matrix)
Attributes:
Name | Type | Description |
---|---|---|
event_number |
int
|
The event number |
cloud |
ndarray
|
The Nx8 array of points in AT-TPC space Each row is [x,y,z,amplitude,integral,pad id,time,scale] |
Source code in src/spyral/core/point_cloud.py
__len__()
Number of points in the cloud
AKA number of rows in the data matrix
Returns:
Type | Description |
---|---|
int
|
The number of points in the cloud |
calibrate_point_cloud_z(cloud, detector_params, efield_correction=None)
Calibrate the cloud z-position
Uses two time references, the micromegas and window. Also applies the electric field correction if given. Any points which were invalidated (NaN'ed) by this operation are removed.
WARNING: This modifies the point cloud data, including removing points from the point cloud which were invalidated (NaN'ed).
Parameters:
Name | Type | Description | Default |
---|---|---|---|
cloud |
PointCloud
|
The point cloud to calibrate |
required |
detector_params |
DetectorParameters
|
The detector parameters |
required |
efield_correction |
ElectronCorrector | None
|
The optional Garfield electric field correction to the electron drift |
None
|
Source code in src/spyral/core/point_cloud.py
point_cloud_from_get(event, pad_map)
Load a point cloud from a GetEvent
Loads the points from the signals in the traces and applies the pad relative gain correction and the pad time correction
Parameters:
Name | Type | Description | Default |
---|---|---|---|
event |
GetEvent
|
The GetEvent whose data should be loaded |
required |
pad_map |
PadMap
|
The PadMap used to get pad correction values |
required |
Source code in src/spyral/core/point_cloud.py
sort_point_cloud_in_z(cloud)
Sort the point cloud array by the z-coordinate
Note: This modifies the underlying data in the point cloud
Parameters:
Name | Type | Description | Default |
---|---|---|---|
cloud |
PointCloud
|
The point cloud to sort |
required |