vallenae.io.TraRecord

class vallenae.io.TraRecord(time: float, channel: int, param_id: int, pretrigger: int, threshold: float, samplerate: int, samples: int, data: ndarray, trai: int | None = None, rms: float | None = None, raw: bool = False)[source]

Transient data record in tradb.

Attributes

channel

Channel number

data

Transient signal in volts or ADC values if raw = True

param_id

Parameter ID of table tr_params for ADC value conversion

pretrigger

Pretrigger samples

raw

data is stored as ADC values (int16)

rms

RMS of the noise before the hit

samplerate

Samplerate in Hz

samples

Number of samples

threshold

Threshold amplitude in volts

time

Time in seconds

trai

Transient recorder index (foreign key between pridb and tradb)

Methods

__init__()

count(value, /)

Return number of occurrences of value.

from_sql(row, *[, raw])

Create TraRecord from SQL row.

index(value[, start, stop])

Return first index of value.