Skip to content

Commit

Permalink
Updated trunrawvoltage fields
Browse files Browse the repository at this point in the history
  • Loading branch information
lwpiotr committed Jan 30, 2025
1 parent 3233e59 commit 812a114
Showing 1 changed file with 50 additions and 39 deletions.
89 changes: 50 additions & 39 deletions grand/dataio/root_trees.py
Original file line number Diff line number Diff line change
Expand Up @@ -1656,54 +1656,65 @@ class TRunRawVoltage(MotherRunTree):

_tree_name: str = "trunrawvoltage"

## Control parameters - the list of general parameters that can set the mode of operation, select trigger sources and preset the common coincidence read out time window (Digitizer mode parameters in the manual).
digi_ctrl: StdVectorListDesc = field(default=StdVectorListDesc("vector<unsigned short>"))
"""Control parameters - the list of general parameters that can set the mode of operation, select trigger sources and preset the common coincidence read out time window (Digitizer mode parameters in the manual)."""
## Trigger position in the trace (trigger start = nanoseconds - 2*sample number)
trigger_position: StdVectorListDesc = field(default=StdVectorListDesc("unsigned short"))
"""Trigger position in the trace (trigger start = nanoseconds - 2*sample number)"""
## Firmware version
firmware_version: StdVectorListDesc = field(default=StdVectorListDesc("unsigned short"))
"""Firmware version"""
## Nominal trace length in units of samples
trace_length: StdVectorListDesc = field(default=StdVectorListDesc("vector<int>"))
"""Nominal trace length in units of samples"""
## ADC sampling frequency in MHz
adc_sampling_frequency: StdVectorListDesc = field(default=StdVectorListDesc("unsigned short"))
"""ADC sampling frequency in MHz"""
## ADC sampling resolution in bits
adc_sampling_resolution: StdVectorListDesc = field(default=StdVectorListDesc("unsigned short"))
"""ADC sampling resolution in bits"""
## ADC input channels - > 16 BIT WORD (4*4 BITS) LOWEST IS CHANNEL 1, HIGHEST CHANNEL 4. FOR EACH CHANNEL IN THE EVENT WE HAVE: 0: ADC1, 1: ADC2, 2:ADC3, 3:ADC4 4:FILTERED ADC1, 5:FILTERED ADC 2, 6:FILTERED ADC3, 7:FILTERED ADC4. ToDo: decode this?
adc_input_channels: StdVectorListDesc = field(default=StdVectorListDesc("unsigned short"))
"""ADC input channels - > 16 BIT WORD (4*4 BITS) LOWEST IS CHANNEL 1, HIGHEST CHANNEL 4. FOR EACH CHANNEL IN THE EVENT WE HAVE: 0: ADC1, 1: ADC2, 2:ADC3, 3:ADC4 4:FILTERED ADC1, 5:FILTERED ADC 2, 6:FILTERED ADC3, 7:FILTERED ADC4. ToDo: decode this?"""
## ADC enabled channels - LOWEST 4 BITS STATE WHICH CHANNEL IS READ OUT ToDo: Decode this?
adc_enabled_channels: StdVectorListDesc = field(default=StdVectorListDesc("unsigned short"))
"""ADC enabled channels - LOWEST 4 BITS STATE WHICH CHANNEL IS READ OUT ToDo: Decode this?"""
## Value of the Variable gain amplification on the board
gain: StdVectorListDesc = field(default=StdVectorListDesc("vector<int>"))
"""Value of the Variable gain amplification on the board"""
## Conversion factor from bits to V for ADC
adc_conversion: StdVectorListDesc = field(default=StdVectorListDesc("vector<float>"))
"""Conversion factor from bits to V for ADC"""
## Window parameters - describe Pre Coincidence, Coincidence and Post Coincidence readout windows (Digitizer window parameters in the manual). ToDo: Decode?
digi_prepost_trig_windows: StdVectorListDesc = field(default=StdVectorListDesc("vector<unsigned short>"))
"""Window parameters - describe Pre Coincidence, Coincidence and Post Coincidence readout windows (Digitizer window parameters in the manual). ToDo: Decode?"""
## Channel x properties - described in Channel property parameters in the manual. ToDo: Decode?
channel_properties_x: StdVectorListDesc = field(default=StdVectorListDesc("vector<unsigned short>"))
"""Channel x properties - described in Channel property parameters in the manual. ToDo: Decode?"""
## Channel y properties - described in Channel property parameters in the manual. ToDo: Decode?
channel_properties_y: StdVectorListDesc = field(default=StdVectorListDesc("vector<unsigned short>"))
"""Channel y properties - described in Channel property parameters in the manual. ToDo: Decode?"""
## Channel z properties - described in Channel property parameters in the manual. ToDo: Decode?
channel_properties_z: StdVectorListDesc = field(default=StdVectorListDesc("vector<unsigned short>"))
"""Channel z properties - described in Channel property parameters in the manual. ToDo: Decode?"""
## Channel x trigger settings - described in Channel trigger parameters in the manual. ToDo: Decode?
channel_trig_settings_x: StdVectorListDesc = field(default=StdVectorListDesc("vector<unsigned short>"))
"""Channel x trigger settings - described in Channel trigger parameters in the manual. ToDo: Decode?"""
## Channel y trigger settings - described in Channel trigger parameters in the manual. ToDo: Decode?
channel_trig_settings_y: StdVectorListDesc = field(default=StdVectorListDesc("vector<unsigned short>"))
"""Channel y trigger settings - described in Channel trigger parameters in the manual. ToDo: Decode?"""
## Channel z trigger settings - described in Channel trigger parameters in the manual. ToDo: Decode?
channel_trig_settings_z: StdVectorListDesc = field(default=StdVectorListDesc("vector<unsigned short>"))
"""Channel z trigger settings - described in Channel trigger parameters in the manual. ToDo: Decode?"""

## ADC input channels for fv2: 0: ADC1, 1: ADC2, 2:ADC3, 3:ADC4, 4:FILTERED ADC1, 5:FILTERED ADC2, 6:FILTERED ADC3, 7:FILTERED ADC4, 15: off
adc_input_channels_ch: StdVectorListDesc = field(default=StdVectorListDesc("vector<unsigned char>"))
"""ADC input channels for fv2: 0: ADC1, 1: ADC2, 2:ADC3, 3:ADC4, 4:FILTERED ADC1, 5:FILTERED ADC2, 6:FILTERED ADC3, 7:FILTERED ADC4, 15: off"""

## ADC enabled channels - LOWEST 4 BITS STATE WHICH CHANNEL IS READ OUT
adc_enabled_channels_ch: StdVectorListDesc = field(default=StdVectorListDesc("vector<bool>"))
"""ADC enabled channels - LOWEST 4 BITS STATE WHICH CHANNEL IS READ OUT"""

## Digitizer window parameters - describe Pre Coincidence, Coincidence and Post Coincidence readout windows (Digitizer window parameters in the manual). The unit is samples (to get time, multiply by 2).
pre_coincidence_window_ch: StdVectorListDesc = field(default=StdVectorListDesc("vector<unsigned short>"))
"""Digitizer window parameters - describe Pre Coincidence, Coincidence and Post Coincidence readout windows (Digitizer window parameters in the manual). The unit is samples (to get time, multiply by 2)."""
## Digitizer window parameters - describe Pre Coincidence, Coincidence and Post Coincidence readout windows (Digitizer window parameters in the manual). The unit is samples (to get time, multiply by 2).
post_coincidence_window_ch: StdVectorListDesc = field(default=StdVectorListDesc("vector<unsigned short>"))
"""Digitizer window parameters - describe Pre Coincidence, Coincidence and Post Coincidence readout windows (Digitizer window parameters in the manual). The unit is samples (to get time, multiply by 2)."""

## Channel property parameters
gain_correction_ch: StdVectorListDesc = field(default=StdVectorListDesc("vector<unsigned short>"))
"""Channel property parameters"""
integration_time_ch: StdVectorListDesc = field(default=StdVectorListDesc("vector<unsigned short>"))
offset_correction_ch: StdVectorListDesc = field(default=StdVectorListDesc("vector<unsigned char>"))
base_maximum_ch: StdVectorListDesc = field(default=StdVectorListDesc("vector<unsigned short>"))
base_minimum_ch: StdVectorListDesc = field(default=StdVectorListDesc("vector<unsigned short>"))

## Channel trigger parameters
signal_threshold_ch: StdVectorListDesc = field(default=StdVectorListDesc("vector<unsigned short>"))
"""Channel trigger parameters"""
noise_threshold_ch: StdVectorListDesc = field(default=StdVectorListDesc("vector<unsigned short>"))
## The unit is samples (to get time, multiply by 2)
tper_ch: StdVectorListDesc = field(default=StdVectorListDesc("vector<unsigned short>"))
"""The unit is samples (to get time, multiply by 2)"""
tprev_ch: StdVectorListDesc = field(default=StdVectorListDesc("vector<unsigned short>"))
ncmax_ch: StdVectorListDesc = field(default=StdVectorListDesc("vector<unsigned short>"))
tcmax_ch: StdVectorListDesc = field(default=StdVectorListDesc("vector<unsigned short>"))
qmax_ch: StdVectorListDesc = field(default=StdVectorListDesc("vector<unsigned short>"))
ncmin_ch: StdVectorListDesc = field(default=StdVectorListDesc("vector<unsigned short>"))
qmin_ch: StdVectorListDesc = field(default=StdVectorListDesc("vector<unsigned short>"))

notch_filters_no_ch: StdVectorListDesc = field(default=StdVectorListDesc("vector<unsigned char>"))

## Trace length
trace_length: StdVectorListDesc = field(default=StdVectorListDesc("unsigned int"))
"""Trace length"""

## ADC to voltage conversion factor
adc_conversion: StdVectorListDesc = field(default=StdVectorListDesc("float"))
"""ADC to voltage conversion factor"""

def __post_init__(self):
super().__post_init__()
Expand Down

0 comments on commit 812a114

Please # to comment.