vallenae.io.TraRecord

class vallenae.io.TraRecord(time: float, channel: int, param_id: int, pretrigger: int, threshold: float, samplerate: int, samples: int, data_format: int, data: numpy.ndarray, trai: Optional[int] = None, rms: Optional[float] = None)[source]

Transient data record in tradb.

Todo

Remove RMS

Attributes

channel

Channel number

data

Transient signal in volts

data_format

Data format (0 = uncompressed, 2 = FLAC compression)

param_id

Parameter ID of table tr_params for ADC value conversion

pretrigger

Pretrigger samples

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__()

Initialize self.

count(value, /)

Return number of occurrences of value.

from_sql(row)

rtype

TraRecord

index(value[, start, stop])

Return first index of value.