Configuring alibava

There are a number of ways in which you can configure alibava-gui. Once this is done, one can always save that configuration. To save the current configuration click on the Save or Save As items on the File menu of the main window. Saved configurations can be loaded afterwards either by given the configuration file path when starting alibava-gui or by choosing a configuration file through the Open item in the File menu. Most of the configuration parameters can be accessed through the Settings menu as shown in Figure 4. Each of the menu items will allow to configure different aspects of the alibava-gui behavior.

Figure 4Settings accessible through the Settings item in the main window menu bar

4.1. DAQ configuration

The DAQ has a number of parameters:

  • sample size: this is the number of events stored in the mother board memory before sending them to the PC. This is only used in Pedestal, Laser and Source modes
  • number of events: maximum number of events. When then number of events acquired equals this value the run stops
  • Delay: if no data arrives after this delay, alibava-gui will believe there is a communication problem
  • Monitor channel: This is the channel whose characteristics curve will be shown in the monitor window

All those parameters can be set by clicking on the DAQ item of the Settings menu as show in Figure 5

Figure 5DAQ configuration window

There are two more options that control the behavior of the system.

Enable Busy

Checking this box will make the alibava motherboard send a busy signal through the LEMO connector used for the laser pulse. This will only happen during the Radioactive Source run mode. Remember that the signal output is an LVCMOS 3.3V signal that needs to be terminated to 50Ω. When the signa lis "on" it meands that alibava is BUSY, ie, it is not sensitive to new triggers.

Be careful with this option since you may send the strobe pulse to a laser system that may be in danger when receiving the strobe while switched off.

Pulse Shape Reconstruction

When running in RS mode, Alibava measures the time of the incoming trigger with an internal TDC. The way it works is that the trigger starts the TDC and a system clock raising edge stops it. Since the system clock has a period of 25ns, this will be the maximum value measured by the TDC.checks this box, the system will use a 100ns clock derived from the system clock. This allows to measure longer times and, therefore, to have a measurement of the full pulse shape by plotting the average of the signal as a function of the TDC measured. This is scketched in Figure 6.

Figure 6Time scheme of the TDC time

4.2. Beetle configuration

The Beetle parameters are set by clicking on the Beetle item of the Settings menu as show in Figure 7. At the top of the dialog you can select which chips will be active during the acquisition.

Figure 7Beetle configuration

The BEETLE chip configuration parameters are described in Table A-1

4.3. Beetle Comparator configuration

One can also configure the behaviour of the Beetle comparator. This is only usefull for those daughter boards that process the output of the comparator to produce an autotrigger.

Figure 8Beetle comparator configuration

The upper button is used to enable and disable this feature. Then one selects the chip and sets the appropriate parameters like the polarity, trigger mode, threshold, some advance parameters and, also, the channel mask and threshold corrections of the individual channels. The beetle chip documentation provides more information about all these parameters.

4.4. External Trigger configuration

The trigger for the Source run can be configured by clicking the Trigger item in the Settings menu or the Trigger button by the RS run radio button. The dialog is show in Figure 9. Units are in mV.

Figure 9Trigger configuration

There are two types of trigger. One is the Trigger in, which uses two signals to produce the trigger. The input signals are supposed to be negative, as well as the corresponding thresholds. The trigger will be fired it either both (AND) or any of the two (OR) are below the threshold programmed.

The other trigger type is the Pulse in trigger. For this one there are two thresholds, one positive and one negative. The board will produce a trigger for any signal which is either above both values (a positive signal) or below both thresholds (negative). If the input pulse falls between the two values it will not produce a trigger.

4.5. Analysis configuration

The data is monitored while acquiring data and this is displayed in a number of histograms. The parameters defining how to find clusters, etc. are displayed in the analysis configuration window shown in Figure 10

Figure 10Analysis configuration

4.6. Laser config

The only parameter of the Laser run is the delay (in ns) that can be wet in the Laser item of the Settings menu or in the text entry by the Laser radio button.

Figure 11Laser config

Units are in nano seconds

4.7. Plugin configuration

The plugin configuration dialog box appears in Figure 12.

Figure 12Plugin configuration dialog

There you can specify the plugin language, which can be either C++ or Python, a folder to add to the search path, the name of the library or Python module to load and the function to call. The Find Symbols button will open another window with a list of all the callable functions in the plugin. Select one and click OK. Otherwise you will have to type the function (or hook) name. Also note that when clicking on Browse for the Library, both the path and the library file name will be filled. alibava-gui will also select the language based on very simple assumptions.

4.8. Pedestals

alibava-gui can compute pedestals on-line either by making a pedestal run at the very beginning or estimating the pedestal and noise while taking data. However, for some run types pedestal calculation makes not sense. This is the case of the calibration, laser synchronization and laser since, a priori, some channels will always have the same amplitude. Nevertheless, we would like to see the real pedestals subtracted on th emonitoring histograms. To solve this we can either make a pedestal run or load a pedestal file via the Load Pedestals item in the Settings menu. Likewise, we can always save on a separate file a set of pedestals we are proud of via the Save Pedestals item in the Settings menu.

The format of that pedestal file is:

  • each line corresponds to one channel with line zero for channel 0
  • each line contains the pedestal value, followed by a white space-like character (space or tab) and then the noise value

4.9. Calibration of the individual channel corrections to the comparator threshold

The comparators on the Beetle chip have a non negligible spread and therefore the chip provides mechanisms to aling the thresholds of all the channels for a given working global threshold. This is a quite involved procedure but alibava-gui provides an authomatic, yet slightly slow, procedure to do it.

It is worth noting that this will only work for on the alibava daughter boards where the Beetle chip autotrigger is enabled.

The procedure is based on counting the number of triggers for a given configuration of the threshold and the channel corrections. This usually produces the socalled s-curves which, when properly normalized, yield a 1 when all the events produce a trigger, 0.5 when the threshold is equivalent to the mean of the input charge distributioin and 0 when no event produces a trigger. This is done with the Beetle calibration circuit. This system procudes alternate polarities for each channel, always with he same absolute value of the input charge. So when one programs a given number of events, only have of them will have the proper polarity. This is taken into account when normalizing so that when the threshold is so low that we trigger on the noise the value of the s-curve is 2, instead of 1, since we also trigger in the events with the oposite polarity. This defines a characteristic red band in the histograms produced. There is another "effect" that has to do with the case in which we trigger also on the undershoot of the pulse in the events with the oposite polarity. This explains why the s-curves have like to ending points.

The procedure is as follows:

  1. Connect the output of the autotrigger in the DB to the TriggerPulse input in the MB.
  2. Configure the trigger (see Section 4.4 ― External Trigger configuration ) to trigger on TriggerPulse and set the negative and positive values of the threshold to -500 and 50 respectively. Other values may work as well: check with your osciloscope.
  3. Click on the Calibration settings button or item in the menu and there click on the button with label Calib. Beetle Comparator (see Section 3.1 ― Calibration run). A dialog window lile the one shown in Figure 13 will pop up.
  4. Choose the analysis you want to do and click on the Start button.
  5. When the analysis are over, click OK if you want to save the settings, or Cancel otherwise.
  6. Save the settings in a configuration file by clicking on the Save As.. item in the File menu.

Figure 13Calibration of the Threshold corrections for the channels
Once the window is there one chooses the target threshold (in units of electron charge: 1 fC or 6250 e- are approx. 22.5 keV. Then we decide if we need inversion at the input of the Beetle comparator or if we use pulse or track mode (see the Beetle documentaion to understand these parameters).

There is, on the left, a series of check buttons that will perform a specific task.

  1. Show spread: This will make a scan of the threshold DAC values for an input calibration charge equivalent to the desired thresholds. The plot shows if the thresholds are aligned or not as shown in Figure 14. There one can clearly see the all the channels will have the thresholds alinged that that particular target.
  2. Scan Trim DACs: This will make a scan of the threshold correction DAC for each channel and make a linear fit of the main DAC resulting as a function of the correction. This will be used to find the final threshold DAC with the smallest spread among the channels.
  3. Find Threshold DACs: THis has to be done together with the previous. It will find the optimad threshold DAC that minimizes the threshold spread.
  4. Comparator Gain: This will scan the threshold DAC for different input pulses so that one can see the characteristics curve of each channel's comparator.
  5. Current threshold: This can be used to check what is the level of alignment for the current settings. The plot produced is as shown in Figure 15. It makes a charge scan for each channel so that we can see where the threshold is set for each of them. In the figure it is about 6000 e-.

Select the desired analysis and click the start button. You can click again the button to stop at any time. Then click cancel if you do not want to keep the settings or OK if you want to keep them.

Figure 14Channel comparator spread before and after alignment
Figure 15Current settings plot