LINTag Python Interface
The python submodule to remotely control LINTag Capture.
Usage
import photonscore as pe
LINTagDevice = pe.LINTag("localhost:5556")
Examples
see here
The Device Handle
LINTag
A class representing a LINTag TDC to remote control the LINTag Capture Application
Attributes:
Name | Type | Description |
---|---|---|
correlator |
CorrelatorClass
|
Subclass for controlling the Correlator of LINTag Capture. |
file_writer |
FileWriterClass
|
Subclass for representing the FileWriter module of LINTag Capture. |
status |
StatusClass
|
Subclass for representing the status of the LINTag. |
settings |
SettingsClass
|
Subclass for getting and setting the settings of the LINTag. |
Source code in LINTag/LINTag.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 |
|
__init__(address='localhost:5556', grpc_channel_options=None)
Initializes a LINTag object.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
address |
str
|
The address under which the gRPC server of LINTag capture is running |
'localhost:5556'
|
Source code in LINTag/LINTag.py
36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
|
Controlling the correlator
LINTag.LINTag.CorrelatorClass
A class that interfaces with the correlator of LINTag Capture to remotely control it
Source code in LINTag/LINTag.py
227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 |
|
clear_histogram()
Clears the histogram currently displayed in LINTag Capture. Returns: None
Source code in LINTag/LINTag.py
238 239 240 241 242 243 244 |
|
get_correlator_settings(integers_for_enums=False)
Retrieves the current state of the correlator module in LINTag capture
Returns: A Dictionary containing the current correlator settings
Source code in LINTag/LINTag.py
260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 |
|
get_histogram()
Gets the current histogram displayed in LINTag Capture. Returns: Bins: Numpy array of doubles describing the bins Values: Numpy array of uint32, describing the values of the histogram
Source code in LINTag/LINTag.py
246 247 248 249 250 251 252 253 254 255 256 257 258 |
|
set_correlator_settings(start_channel=None, start_slope=None, stop_channel=None, stop_slope=None, window_ps=None, correlator_type=None, bin_size=None, is_correlating=None)
This function is used to change the settings of the histogram in LINTag Capture.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
start_channel |
uint
|
Integer from 0 to 7, specifying the start channel |
None
|
start_slope |
str
|
can be |
None
|
stop_channel |
uint
|
Integer from 0 to 7 |
None
|
stop_slope |
str
|
can be |
None
|
window_ps |
uint
|
Integer from 3000 to 1000000 |
None
|
correlator_type |
str
|
Can be |
None
|
bin_size |
str
|
Can be |
None
|
is_correlating |
bool
|
Sets if the correlator is running online |
None
|
Source code in LINTag/LINTag.py
276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 |
|
Evaluating the Status
LINTag.LINTag.StatusClass
A class that interfaces with the current LINTag status
Source code in LINTag/LINTag.py
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 |
|
get_profile(integers_for_enums=False)
Retrieves the current profile sent by the LINTag
Returns: A Dictionary containing the current LINTag profile
Source code in LINTag/LINTag.py
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 |
|
get_telemetry(integers_for_enums=False)
Retrieves the current telemetry sent by the LINTag
Returns: A Dictionary containing the current LINTag telemetry
Source code in LINTag/LINTag.py
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
|
Changing Settings
LINTag.LINTag.SettingsClass
A class that interfaces with the current LINTag settings in order to control it
Source code in LINTag/LINTag.py
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 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 |
|
get_channel(channel, integers_for_enums=False)
Retrieves the current settings of the LINTag
Parameters:
Name | Type | Description | Default |
---|---|---|---|
channel |
int
|
Specifies the channel to fetch, between 0 and 7 |
required |
Returns: A Dictionary containing the current LINTag settings
Source code in LINTag/LINTag.py
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 |
|
set_channel(channel, threshold_v=None, nim_nttl=None, rising_edge=None, falling_edge=None, offset_ps=None, dead_time_ps=None, prolonged_dead_time=None, static_calibration=None)
Function to change the settings of the specified channel
Parameters:
Name | Type | Description | Default |
---|---|---|---|
channel |
int
|
Specifies the channel to fetch, between 0 and 7 |
required |
threshold_v |
double
|
Specifies the threshold of the channel, from -2.0 to 2.5 |
None
|
nim_nttl |
bool
|
Specify impedance of channel, |
None
|
rising_edge |
bool
|
The rising edge is tracked and sent to the network interface |
None
|
falling_edge |
bool
|
The falling edge is tracked and sent to the network interface |
None
|
offset_ps |
long
|
Specify offset of the channel in ps |
None
|
dead_time_ps |
int
|
Specifies the artifical dead time for the channel in ps |
None
|
prolonged_dead_time |
bool
|
If set to |
None
|
static_calibration |
bool
|
If set to |
None
|
Source code in LINTag/LINTag.py
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 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 |
|
set_lintag_ip_address(ip_address)
Sets the IP-Address of the LINTag to connect to in the used LINTag Capture
Parameters:
Name | Type | Description | Default |
---|---|---|---|
ip_address |
str
|
A valid LINTag IP-Address in the shape |
required |
Source code in LINTag/LINTag.py
109 110 111 112 113 114 115 116 117 118 119 |
|
Controlling the FileWriter
LINTag.LINTag.FileWriterClass
A class that interfaces with the LINTag Capture FileWriter module in order to control it from python
Source code in LINTag/LINTag.py
215 216 217 218 219 220 221 222 223 224 |
|