# ******************************************************************************************
# params File generated by Python
# ******************************************************************************************
# ------------------------------------------------------------------------------------------
# Connect
# ------------------------------------------------------------------------------------------
Open[0] eth:192.168.50.125:tdl:0:0


# ******************************************************************************************
# Common and Default settings
# ******************************************************************************************

DebugLogMask		7F

# ------------------------------------------------------------------------------------------
# HV_bias
# ------------------------------------------------------------------------------------------
HV_Vbias                           55 V                # Bias voltage, Range=[20 V, 85 V] (common to all channels, fine adjustable channel by channel by "HV_IndivAdj")
HV_Imax                            1.0 mA              # Max current provided by the HV. The HV will be shut down if the current exceeds this limit.
HV_Adjust_Range                    4.5                 # DAC range for the individual HV adjust.. Options: 4.5, 2.5, DISABLED
HV_IndivAdj                        255                 # DAC setting for the Individual HV Adjust. Range from 0 to 255
TempSensType                       TMP37               # Temperature Sensor Type (or generic coefficients in the form "c0 c1 c2"). Options: TMP37, LM94021_G11, LM94021_G00
TempFeedbackCoeff                  35                  # Temperature Feedback Coeff (mV/degC): Vout = Vset + k * (T-25)
EnableTempFeedback                 0                   # Enable Vbias Temperature Feedback

# ------------------------------------------------------------------------------------------
# RunCtrl
# ------------------------------------------------------------------------------------------
StartRunMode                       ASYNC               # Start of Run mode. Options: ASYNC, CHAIN_T0, CHAIN_T1, TDL
StopRunMode                        MANUAL              # Run Stop Mode. Options: MANUAL, PRESET_TIME, PRESET_COUNTS
EventBuildingMode                  DISABLED            # DISABLED: no event building, TRGTIME_SORTING: event sorting by Trigger Time stamp, TRGID_SORTING: event sorting by Trigger ID. Options: DISABLED, TRGTIME_SORTING, TRGID_SORTING
TstampCoincWindow                  100 ns              # Coincidence Window for Event Building based on time stamp
OF_EnMaxSize                       0                   # Enable List file maximum size (Raw, binary, ASCII, CSV)
OF_MaxSize                         1 GB                # Max size of List files (in Bytes), minimum size allowed 1 kB
OF_ListLL                          DISABLED            # Event List file (Raw data). SAVE: enabling raw data files saving. LOAD: enabling raw data files reading and events processing. Options: DISABLED, SAVE, LOAD

# ------------------------------------------------------------------------------------------
# AcqMode
# ------------------------------------------------------------------------------------------
AcquisitionMode                    SPECTROSCOPY        # Acquisition mode. Options: SPECTROSCOPY, SPECT_TIMING, TIMING_CSTART, TIMING_CSTOP, COUNTING, WAVEFORM
EnableToT                          1                   # Enable ToT in timing mode (Enabled: ToA = 16 bits, ToT = 9 bits; Disabled: ToA = 25 bits)
BunchTrgSource                     PTRG                # Bunch Trigger source (for spectroscopy and counting modes). Options: T0-IN, T1-IN, Q-OR, T-OR, TLOGIC, PTRG
VetoSource                         DISABLED            # The veto signal inhibits the bunch trigger (active high). Options: DISABLED, SW_CMD, T0-IN, T1-IN
ValidationSource                   T0-IN               # Source of the trigger validation signal. It must arrive within the window is opened by the bunch trigger and closed after Tv ~= 120 ns + HoldDelay.. Options: SW_CMD, T0-IN, T1-IN
ValidationMode                     DISABLED            # ACCEPT: Trigger validated by the signal in the val. window. REJECT: trigger rejected if no signal arrives in the val. window. Options: DISABLED, ACCEPT, REJECT. Options: DISABLED, ACCEPT, REJECT
CountingMode                       SINGLES             # SINGLES: each channel counts its own self trigger. PAIRED_AND: couples of channels count in coincidence. Options: SINGLES, PAIRED_AND
ChTrg_Width                        0 ns                # Coincidence window for Paired_And counting mode. Min = 8 ns, Max = 2032 ns, Step = 8 ns
EnableCntZeroSuppr                 1                   # Enable the suppression of the channels with 0 counts in COUNTING mode.
TrgIdMode                          TRIGGER_CNT         # Trigger ID mode: TRIGGER_CNT counts all triggers arrived to the board (accepted or not); VALIDATION_CNT counts validation signals (with or without associated trigger). Options: TRIGGER_CNT, VALIDATION_CNT
TriggerLogic                       OR64                # Trigger Logic (Combinatorial network with 64 self trigger inputs). Options: OR64, AND2_OR32, OR32_AND2, MAJ64, MAJ32_AND2, OR_QUAD
Tlogic_Width                       0 ns                # TriggerLogic output width (0=linear)
MajorityLevel                      3                   # Majority Level (1 to 64)
PtrgPeriod                         1 ms                # Period of the internal periodic trigger
TrefSource                         T1-IN               # Tref source for timing mode (common start/stop). Options: T0-IN, T1-IN, Q-OR, T-OR, PTRG, TLOGIC
TrefWindow                         1.0 us              # Tref window (gate) in timing mode (common start/stop)
TrefDelay                          0 ns                # Tref delay in timing mode (can be negative)
T0_Out                             BUNCHTRG            # T0_Out assignment. Options: T0-IN, BUNCHTRG, T-OR, TLOGIC, RUN, PTRG, BUSY, DPROBE, SQ_WAVE, TDL_SYNC, RUN_SYNC, ZERO
T1_Out                             T1-IN               # T1_Out assignment. Options: T1-IN, BUNCHTRG, Q-OR, TLOGIC, RUN, PTRG, BUSY, DPROBE, SQ_WAVE, TDL_SYNC, RUN_SYNC, ZERO
ChEnableMask0                      0xFFFFFFFF          # Channel enable mask (ch 0..31)
ChEnableMask1                      0xFFFFFFFF          # Channel enable mask (ch 32..63)

# ------------------------------------------------------------------------------------------
# Discr
# ------------------------------------------------------------------------------------------
FastShaperInput                    HG-PA               # The fast shaper can be connected to High gain or Low gain preamp. Options: HG-PA, LG-PA
TD_CoarseThreshold                 220                 # Timing Discriminator coarse threshold (common to all channels)
TD_FineThreshold                   0                   # Timing Discriminator fine threshold (individual)
Hit_HoldOff                        0                   # Trigger hold-off time (imposed dead time)
Tlogic_Mask0                       0xFFFFFFFF          # Trigger Logic channel enable mask (ch 0..31)
Tlogic_Mask1                       0xFFFFFFFF          # Trigger Logic channel enable mask (ch 32..63)
QD_CoarseThreshold                 250                 # Charge Discriminator coarse threshold (common to all channels)
QD_FineThreshold                   0                   # Charge Discriminator fine threshold (individual)
Q_DiscrMask0                       0xFFFFFFFF          # Q-OR Channel enable mask (ch 0..31)
Q_DiscrMask1                       0xFFFFFFFF          # Q-OR Channel enable mask (ch 32..63)

# ------------------------------------------------------------------------------------------
# Spectroscopy
# ------------------------------------------------------------------------------------------
GainSelect                         BOTH                # Gain selection in output data format. It can be both HG and LG, HG or LG only or automatic (HG if not saturated, LG otherwise). Options: HIGH, LOW, AUTO, BOTH
HG_Gain                            50                  # High Gain Setting (1 to 63)
LG_Gain                            50                  # Low Gain Setting (1 to 63)
Pedestal                           50                  # Common Pedestal in channels (ADC reading with no input signal)
ZS_Threshold_LG                    0                   # Threshold for Zero Suppression (LG)
ZS_Threshold_HG                    0                   # Threshold for Zero Suppression (HG)
HG_ShapingTime                     25 ns               # Shaping Time of the slow shaper (High Gain). Options: 87.5 ns, 75 ns, 62.5 ns, 50 ns, 37.5 ns, 25 ns, 12.5 ns
LG_ShapingTime                     25 ns               # Shaping Time of the slow shaper (Low Gain). Options: 87.5 ns, 75 ns, 62.5 ns, 50 ns, 37.5 ns, 25 ns, 12.5 ns
HoldDelay                          100 ns              # Delay between bunch trigger (start of peak detection) and hold (stop of peak detection)
MuxClkPeriod                       300 ns              # Multiplexer readout speed. Best setting = 300 ns
EHistoNbin                         4K                  # Number of channels (bins) in the PHA histogram. Options: DISABLED, 256, 512, 1K, 2K, 4K, 8K
ToAHistoNbin                       4K                  # Number of channels (bins) in the ToA histogram. Options: DISABLED, 256, 512, 1K, 2K, 4K, 8K, 16K

# ------------------------------------------------------------------------------------------
# Test-Probe
# ------------------------------------------------------------------------------------------
AnalogProbe0                       OFF                 # Select the signal connected to the analog probe0. Options: OFF, FAST, SLOW_LG, SLOW_HG, PREAMP_LG, PREAMP_HG
DigitalProbe0                      OFF                 # Select the signal connected to the digital probe0. Options: OFF, PEAK_LG, PEAK_HG, HOLD, START_CONV, DATA_COMMIT, DATA_VALID, CLK_1024, VAL_WINDOW, T_OR, Q_OR
ProbeChannel0                      0                   # Select the channel connected to the analog and digital probes0
AnalogProbe1                       OFF                 # Select the signal connected to the analog probe1. Options: OFF, FAST, SLOW_LG, SLOW_HG, PREAMP_LG, PREAMP_HG
DigitalProbe1                      OFF                 # Select the signal connected to the digital probe1. Options: OFF, PEAK_LG, PEAK_HG, HOLD, START_CONV, DATA_COMMIT, DATA_VALID, CLK_1024, VAL_WINDOW, T_OR, Q_OR
ProbeChannel1                      0                   # Select the channel connected to the analog and digital probes1
TestPulseSource                    PTRG                 # Select the source for the test pulse signal. Options: OFF, EXT, T0-IN, T1-IN, PTRG, SW-CMD
TestPulseAmplitude                 200                 # DAC setting for the internal test pulser (12 bit)
TestPulseDestination               ALL                 # Select which channels are connected to the test pulse input. Options: NONE, ALL, EVEN, ODD, CH 0, CH 1, CH 2, CH 3, CH 4, CH 5, CH 6, CH 7, CH 8, CH 9, CH 10, CH 11, CH 12, CH 13, CH 14, CH 15, CH 16, CH 17, CH 18, CH 19, CH 20, CH 21, CH 22, CH 23, CH 24, CH 25, CH 26, CH 27, CH 28, CH 29, CH 30, CH 31, CH 32, CH 33, CH 34, CH 35, CH 36, CH 37, CH 38, CH 39, CH 40, CH 41, CH 42, CH 43, CH 44, CH 45, CH 46, CH 47, CH 48, CH 49, CH 50, CH 51, CH 52, CH 53, CH 54, CH 55, CH 56, CH 57, CH 58, CH 59, CH 60, CH 61, CH 62, CH 63
TestPulsePreamp                    BOTH                # Test pulse can feed both HG and LG preamps or only one of them. Options: LG, HG, BOTH



# ******************************************************************************************
# Board and Channel settings (overwrite default settings)
# ******************************************************************************************

