get_trace Module
This module contains the definition of a trace (signal) from the GET DAQ, as well as the signal analysis routine.
GetTrace
A single trace from the GET DAQ data
Represents a raw signal from the AT-TPC pad plane through the GET data acquisition.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data |
ndarray
|
The trace data |
required |
id |
HardwareID
|
The HardwareID for the pad this trace came from |
required |
params |
GetParameters
|
Configuration parameters controlling the GET signal analysis |
required |
rng |
Generator
|
A random number generator for use in the signal analysis |
required |
Attributes:
Name | Type | Description |
---|---|---|
trace |
ndarray
|
The trace data |
peaks |
list[Peak]
|
The peaks found in the trace |
hw_id |
HardwareID
|
The hardware ID for the pad this trace came from |
Methods:
Name | Description |
---|---|
GetTrace |
Construct the GetTrace and find peaks |
set_trace_data |
Set the trace data and find peaks |
is_valid |
Check if the trace is valid |
get_pad_id |
Get the pad id for this trace |
find_peaks |
Find the peaks in the trace |
get_number_of_peaks |
Get the number of peaks found in the trace |
get_peaks |
Get the peaks found in the trace |
Source code in src/spyral/trace/get_trace.py
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
|
find_peaks(params, rng, rel_height=0.95)
Find the peaks in the trace data
The goal is to determine the centroid location of a signal peak within a given pad trace. Use the find_peaks function of scipy.signal to determine peaks. We then use this info to extract peak amplitudes, and integrated charge.
Note: A random number generator is used to smear the centroids by within their identified time bucket. A time bucket is essentially a bin in time over which the signal is sampled. As such, the peak is identified to be on the interval [centroid, centroid+1). We sample over this interval to make the data represent this uncertainty.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
params |
GetParameters
|
Configuration paramters controlling the GET signal analysis |
required |
rng |
Generator
|
A random number generator for use in the signal analysis |
required |
rel_height |
float
|
The relative height at which the left and right ips points are evaluated. Typically this is not needed to be modified, but for some legacy data is necessary |
0.95
|
Source code in src/spyral/trace/get_trace.py
get_number_of_peaks()
Get the number of peaks found in the trace
Returns:
Type | Description |
---|---|
int
|
Number of found peaks |
get_pad_id()
Get the pad id for this trace
Returns:
Type | Description |
---|---|
int
|
The ID number for the pad this trace came from |
get_peaks()
is_valid()
Check if the trace is valid
Returns:
Type | Description |
---|---|
bool
|
If True the trace is valid |
set_trace_data(data, id, params, rng)
Set trace data and find peaks
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data |
ndarray
|
The trace data |
required |
id |
HardwareID
|
The HardwareID for the pad this trace came from |
required |
params |
GetParameters
|
Configuration parameters controlling the GET signal analysis |
required |
rng |
Generator
|
A random number generator for use in the signal analysis |
required |