BNMR: Histograms and Scalers: Difference between revisions
en>Suz m (New page: {{Pagelinks}} == Links == <div style="column-count:3;-moz-column-count:3;-webkit-column-count:3"> * BNMR * BNMR: Getting Started </div> == Introduction == In the [[BNMR: fronte...) |
No edit summary |
||
(9 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{Pagelinks}} | {{Pagelinks}} | ||
== Introduction == | == Introduction == | ||
The data from the {{bnmqr|join=or}} experiments largely consists of histogrammed scaler data. The scaler data are read from the Multichannel Scaler(s) SIS3801 ({{bnmr}}) or SIS3820 ({{bnqr}}). The scaler data is histogrammed and saved differently depending on whether the run is Type 1 or Type 2. | |||
== | == Hardware == | ||
Currently, | |||
* experiment <span style="color:#7b68ee; font-style=italic">bnmr</span> has two SIS3801 scalers known as ''Scaler A'' and ''Scaler B'' | |||
* experiment <span style="color:#20b2aa; font-style=italic">bnqr</span> has one SIS3820 scaler, ''Scaler B'' | |||
=== | <div id="sis3820_note"></div> | ||
==== | ; NOTE | ||
: The sis3820 scaler is needed for <span style="color:#20b2aa; font-style=italic">bnqr</span> alpha mode as it has a larger buffer and greater resolution. | |||
=== BNMR === | |||
BNQR has two scalers (SIS3801E), Scaler A and Scaler B. | |||
==== Scaler A ==== | |||
{| style="text-align: left; width: 80%; background-color: #e6e6ff;" border="3" cellpadding="2" cellspacing="2" | {| style="text-align: left; width: 80%; background-color: #e6e6ff;" border="3" cellpadding="2" cellspacing="2" | ||
|+ Table 1 : BNMR Scaler A Channels | |+ Table 1 : BNMR Scaler A Channels | ||
! Scaler !! Module | ! Scaler !! Module !! Channel !! Contents | ||
|- | |- | ||
| colspan="1" rowspan="2" style="width:10%; text-align:center" | A | | colspan="1" rowspan="2" style="width:10%; text-align:center" | A | ||
| colspan="1" rowspan="2" style="width:20%; text-align:center" | SIS3801 | | colspan="1" rowspan="2" style="width:20%; text-align:center" | SIS3801 | ||
| 1 || Front scalers (16 segments summed in hardware) | | 1 || Front scalers (16 segments summed in hardware) | ||
|- | |- | ||
| 2 || Front scalers (16 segments summed in hardware) | | 2 || Front scalers (16 segments summed in hardware) | ||
|- | |- | ||
| colspan=" | | colspan="4" style="background-color:#ccccff; font-weight:bold; text-align:center;"| Total number of real scaler inputs : 2 | ||
|} | |} | ||
==== Scaler B ==== | |||
Input signals are not usually attached to the lowest two channels in Scaler B (Scaler Internal Clock and Fluorescence Monitor). | |||
The data from the first input (Scaler Internal Clock) is used for testing as it should have a constant value in all bins. An external signal (e.g. pulser) is sometimes input to the Fluorescence Monitor input for testing. The data from these inputs is read out and histogrammed. | |||
{| style="text-align: left; width: 80%; background-color: #e6e6ff" border="3" cellpadding="2" cellspacing="2" | {| style="text-align: left; width: 80%; background-color: #e6e6ff" border="3" cellpadding="2" cellspacing="2" | ||
|+ Table 2 : BNMR Scaler B Channels | |+ Table 2 : BNMR Scaler B Channels | ||
! Scaler !! Module | ! Scaler !! Module !! Channel !! Contents | ||
|- | |- | ||
| colspan="1" rowspan="5" style="width:10%; text-align:center" | B | | colspan="1" rowspan="5" style="width:10%; text-align:center" | B | ||
| colspan="1" rowspan="5" style="width:20%; text-align:center" | SIS3801 | | colspan="1" rowspan="5" style="width:20%; text-align:center" | SIS3801 | ||
| 1 || Scaler Internal Clock (not connected) | | 1 || Scaler Internal Clock (not connected) | ||
|- | |- | ||
Line 49: | Line 51: | ||
| 9,10,11,12 || Neutral Beam Backwards counters (4) | | 9,10,11,12 || Neutral Beam Backwards counters (4) | ||
|- | |- | ||
| colspan=" | | colspan="4" style="background-color:#ccccff; font-weight:bold; text-align:center;"| Total number of real scaler inputs : 12 | ||
|} | |} | ||
==== | === BNQR === | ||
==== Scaler B ==== | |||
BNQR has only one scaler (SIS3820), Scaler B. | |||
Input signals are not usually attached to the lowest two channels (Scaler Internal Clock and Flueorescence Monitor). | |||
The data from the first input (Scaler Internal Clock) is used for monitoring, as it should have a constant value in all bins. An external signal (e.g. pulser) is sometimes input to the Fluorescence Monitor input for testing. The data from these inputs is read out and histogrammed in all experimental modes '''except Mode 2h (Alpha mode)'''. | |||
{| style="text-align: left; width: 80%; background-color: #b3ffff;" border="3" cellpadding="2" cellspacing="2" | {| style="text-align: left; width: 80%; background-color: #b3ffff;" border="3" cellpadding="2" cellspacing="2" | ||
|+ Table 3 : BNQR Scaler B Channels | |+ Table 3 : BNQR Scaler B Channels | ||
! Scaler !! Module!! | !rowspan="2"| Scaler !! rowspan="2"| Module !! rowspan="2"| Channel !! rowspan="2"|Contents !! colspan="3"| Scaler Channel Active | ||
|- | |||
! Non-alpha Modes !! <span style=color:blue;font-weight:bold>*</span> 1h !! <span style=color:blue;font-weight:bold>**</span> 2h | |||
|- | |- | ||
| colspan="1" rowspan=" | | colspan="1" rowspan="10" style="width:10%; text-align:center" | B | ||
| colspan="1" rowspan=" | | colspan="1" rowspan="10" style="width:20%; text-align:center" | SIS3820 <span style=color:red>*</span> | ||
| 1 || Scaler Internal Clock (not connected) || Y || Y || '''N''' <span style=color:red;font-weight:bold>*</span> | |||
| 1 || Scaler Internal Clock (not connected) | |||
| | |||
| | |||
|- | |||
|- | |- | ||
| | | 17 || Fluorescence Monitor (not used)|| Y || Y || '''N''' <span style=color:red;font-weight:bold>*</span> | ||
|- | |- | ||
| | | 18,19 || Polarimeter counters (2)|| Y || Y || Y | ||
|- | |- | ||
| | | 20 || Neutral Beam Forwards counter (summed in hardware)|| Y || Y || Y | ||
|- | |- | ||
| colspan=" | | 21 || Neutral Beam Backwards counter (summed in hardware)|| Y || Y || Y | ||
|- style="background-color:#94b8b8" | |||
| 22 || Left.Alpha (ALPHA1) || N || Y || Y | |||
|- style="background-color:#94b8b8" | |||
| 23 || Right.Alpha (ALPHA2) || N || Y || Y | |||
|- style="background-color:#94b8b8" | |||
| 24 || Left.AlphaBar (ALPHA3) || N || Y || Y | |||
|- style="background-color:#94b8b8" | |||
| 25 || Right.AlphaBar (ALPHA4) || N || Y || Y | |||
|- style=" background-color: #e6ffff; font-weight:bold; text-align:center;" | |||
| colspan="2" style=" background-color: #e6ffff; font-weight:bold; text-align:center;"| Total number of real scaler inputs || 6 || 10 || 8 | |||
|} | |} | ||
; | ;NOTES | ||
: <span style=color:red>**</span> SIS3820 module has ECL inputs 1-16, NIM 17-32. Therefore BNQR's input channel start at 17 (NIM). | The highest four Scaler inputs are used for the '''Alpha Counters'''. | ||
These are ignored in all experimental modes except for | |||
* '''1h''' <span style=color:blue;font-weight:bold>*</span> (i.e. experimental mode "1f" where the Alpha counters have been selected) | |||
* '''2h''' <span style=color:blue;font-weight:bold>**</span> (Alpha mode) | |||
<span style=color:red;font-weight:bold>**</span> In Alpha mode the two lowest scaler channels (see above) are ignored in order to save memory. | |||
<span style=color:red;font-weight:bold>*</span> SIS3820 module has ECL inputs 1-16, NIM 17-32. Therefore BNQR's input channel start at 17 (NIM). | |||
== Software == | |||
=== Scaler readout === | |||
The Scaler Modules contain a buffer (FIFO) for the data. This FIFO is larger in the SIS3820 module than the SIS3801, so the SIS3820 can buffer more data. During the PPG cycle, the scaler time bins collect data in turn as the PPG steps through the time bins (via PPG MCS Next output signal connected to Scaler LNE input). | |||
This data is stored in the Scaler FIFO. During the PPG cycle, the scaler data is read out periodically, ensuring that the FIFO does not become full. | |||
The selected format of the scaler data is "24-bit", where the channel and user-bits are encoded in the top 8 bits of the 32-bit data word, and the data is in bits 0-23. See Manual for details. | |||
=== Histograms === | |||
Histograms are built by a combination of the [[BNMR:_frontend|frontend]] and the [[BNMR:_Data_Logging#Histograms|data logger]]. Various manipulations can be performed on the data read from the scalers, with different manipulations for Type 1 (TI/integral) and Type 2 (TD/time-differential) modes. | |||
==== Type 1 histograms ==== | |||
The final output of Type 1 (integral) runs are histograms with one bin per cycle/super-cycle. I.e. if the MCS has 100 bins per PPG cycle and we run for 20 cycles, the final histogram will be 20 bins long. In general all 100 time bins are summed together to create the final output bin. The final histogram is effectively an array of counts per cycle as the run progresses. | |||
The '''frontend''' does very little manipulation to the data, and just sends the full data for each cycle to the MUD logger. | |||
The '''logger''' can perform a few manipulations on the data: | |||
* Create separate histograms based on the helicity polarity, with <code>+</code> or <code>-</code> appended to the histogram title. If the helicity is <code>+</code> and the data for a cycle looks like <code>1,2,3,4</code>, <code>10</code> would be appended to <code>histo_name+</code> and 0 appended to <code>histo_name-</code>. | |||
* Create separate histograms based on the user bits. This is currently quite specific, with hard-coded suffixes like <code>_frq0</code> and <code>_ref0</code> appended to the histogram titles. If the data for a cycle looks like <code>1,2,3,4</code> with corresponding user bits <code>0,2,0,2</code>, <code>4</code> would be appended to <code>histo_name_frq0</code> and 6 appended to <code>histo_name_ref0</code> | |||
* Create separate histograms based on bin ranges. Some modes state that certain ranges of bins should be summed separately (e.g. a signal region and a background region). The configuration is generally set up by the RF calculator, which can set both the bin ranges and the suffixes to add to the histogram ranges. | |||
==== Type 2 histograms ==== | |||
The final output of Type 2 (differential) runs are histograms with one bin per time bin. I.e. if the MCS has 100 bins per PPG cycle and we run for 20 cycles, the final histogram will be 100 bins long. | |||
The '''frontend''' can perform a few manipulations on the data: | |||
* Create separate histograms based on the helicity polarity. | |||
* Create separate histograms based on the microwave sample/reference state (for some {{bnqr}} modes). | |||
The '''logger''' does very little manipulation to the data, and just writes the banks it receives from the frontend as MUD histograms. | |||
=== Software scalers === | |||
The frontend can compute various numerical values based on the data read from the MCS. The values can be: | |||
* Per-run or per-cycle | |||
* Sums of one or more channels | |||
* Ratios/asymmetries of two channels | |||
* Specific or agnostic to a helicity polarity, microwave sample/reference state, user bit value | |||
These values can be recorded in EPICS, in the ODB, and as a bank sent to the logger (called <code>HSCL</code>). Many of these values are shown on the status page of the experiment. The MUD logger only writes the values to file for type 2 runs (historical reasoning unknown). | |||
=== Configuration === | |||
The frontend configuration is rather complex, but doesn't change often, so is done in the frontend code itself. This includes defining the midas bank names that will be used to send data to the logger. | |||
The MUD logging configuration is done via the ODB at {{Odbpath|path=/MUD Logging/Histos/Settings}}. This includes specifying what to do with each midas bank that the logger receives from the frontend. It is most easily edited using the [[BNMR:_Custom_Logging_page|logging webpage]]. | |||
[[Category:BNMR]] |
Latest revision as of 15:54, 29 April 2022
Introduction
The data from the bnmr or bnqr experiments largely consists of histogrammed scaler data. The scaler data are read from the Multichannel Scaler(s) SIS3801 (bnmr) or SIS3820 (bnqr). The scaler data is histogrammed and saved differently depending on whether the run is Type 1 or Type 2.
Hardware
Currently,
- experiment bnmr has two SIS3801 scalers known as Scaler A and Scaler B
- experiment bnqr has one SIS3820 scaler, Scaler B
- NOTE
- The sis3820 scaler is needed for bnqr alpha mode as it has a larger buffer and greater resolution.
BNMR
BNQR has two scalers (SIS3801E), Scaler A and Scaler B.
Scaler A
Scaler | Module | Channel | Contents |
---|---|---|---|
A | SIS3801 | 1 | Front scalers (16 segments summed in hardware) |
2 | Front scalers (16 segments summed in hardware) | ||
Total number of real scaler inputs : 2 |
Scaler B
Input signals are not usually attached to the lowest two channels in Scaler B (Scaler Internal Clock and Fluorescence Monitor).
The data from the first input (Scaler Internal Clock) is used for testing as it should have a constant value in all bins. An external signal (e.g. pulser) is sometimes input to the Fluorescence Monitor input for testing. The data from these inputs is read out and histogrammed.
Scaler | Module | Channel | Contents |
---|---|---|---|
B | SIS3801 | 1 | Scaler Internal Clock (not connected) |
2 | Fluorescence Monitor (not used) | ||
3,4 | Polarimeter counters (2) | ||
5,6,7,8 | Neutral Beam Forwards counters (4) | ||
9,10,11,12 | Neutral Beam Backwards counters (4) | ||
Total number of real scaler inputs : 12 |
BNQR
Scaler B
BNQR has only one scaler (SIS3820), Scaler B.
Input signals are not usually attached to the lowest two channels (Scaler Internal Clock and Flueorescence Monitor). The data from the first input (Scaler Internal Clock) is used for monitoring, as it should have a constant value in all bins. An external signal (e.g. pulser) is sometimes input to the Fluorescence Monitor input for testing. The data from these inputs is read out and histogrammed in all experimental modes except Mode 2h (Alpha mode).
Scaler | Module | Channel | Contents | Scaler Channel Active | ||
---|---|---|---|---|---|---|
Non-alpha Modes | * 1h | ** 2h | ||||
B | SIS3820 * | 1 | Scaler Internal Clock (not connected) | Y | Y | N * |
17 | Fluorescence Monitor (not used) | Y | Y | N * | ||
18,19 | Polarimeter counters (2) | Y | Y | Y | ||
20 | Neutral Beam Forwards counter (summed in hardware) | Y | Y | Y | ||
21 | Neutral Beam Backwards counter (summed in hardware) | Y | Y | Y | ||
22 | Left.Alpha (ALPHA1) | N | Y | Y | ||
23 | Right.Alpha (ALPHA2) | N | Y | Y | ||
24 | Left.AlphaBar (ALPHA3) | N | Y | Y | ||
25 | Right.AlphaBar (ALPHA4) | N | Y | Y | ||
Total number of real scaler inputs | 6 | 10 | 8 |
- NOTES
The highest four Scaler inputs are used for the Alpha Counters. These are ignored in all experimental modes except for
- 1h * (i.e. experimental mode "1f" where the Alpha counters have been selected)
- 2h ** (Alpha mode)
** In Alpha mode the two lowest scaler channels (see above) are ignored in order to save memory.
* SIS3820 module has ECL inputs 1-16, NIM 17-32. Therefore BNQR's input channel start at 17 (NIM).
Software
Scaler readout
The Scaler Modules contain a buffer (FIFO) for the data. This FIFO is larger in the SIS3820 module than the SIS3801, so the SIS3820 can buffer more data. During the PPG cycle, the scaler time bins collect data in turn as the PPG steps through the time bins (via PPG MCS Next output signal connected to Scaler LNE input). This data is stored in the Scaler FIFO. During the PPG cycle, the scaler data is read out periodically, ensuring that the FIFO does not become full.
The selected format of the scaler data is "24-bit", where the channel and user-bits are encoded in the top 8 bits of the 32-bit data word, and the data is in bits 0-23. See Manual for details.
Histograms
Histograms are built by a combination of the frontend and the data logger. Various manipulations can be performed on the data read from the scalers, with different manipulations for Type 1 (TI/integral) and Type 2 (TD/time-differential) modes.
Type 1 histograms
The final output of Type 1 (integral) runs are histograms with one bin per cycle/super-cycle. I.e. if the MCS has 100 bins per PPG cycle and we run for 20 cycles, the final histogram will be 20 bins long. In general all 100 time bins are summed together to create the final output bin. The final histogram is effectively an array of counts per cycle as the run progresses.
The frontend does very little manipulation to the data, and just sends the full data for each cycle to the MUD logger.
The logger can perform a few manipulations on the data:
- Create separate histograms based on the helicity polarity, with
+
or-
appended to the histogram title. If the helicity is+
and the data for a cycle looks like1,2,3,4
,10
would be appended tohisto_name+
and 0 appended tohisto_name-
. - Create separate histograms based on the user bits. This is currently quite specific, with hard-coded suffixes like
_frq0
and_ref0
appended to the histogram titles. If the data for a cycle looks like1,2,3,4
with corresponding user bits0,2,0,2
,4
would be appended tohisto_name_frq0
and 6 appended tohisto_name_ref0
- Create separate histograms based on bin ranges. Some modes state that certain ranges of bins should be summed separately (e.g. a signal region and a background region). The configuration is generally set up by the RF calculator, which can set both the bin ranges and the suffixes to add to the histogram ranges.
Type 2 histograms
The final output of Type 2 (differential) runs are histograms with one bin per time bin. I.e. if the MCS has 100 bins per PPG cycle and we run for 20 cycles, the final histogram will be 100 bins long.
The frontend can perform a few manipulations on the data:
- Create separate histograms based on the helicity polarity.
- Create separate histograms based on the microwave sample/reference state (for some bnqr modes).
The logger does very little manipulation to the data, and just writes the banks it receives from the frontend as MUD histograms.
Software scalers
The frontend can compute various numerical values based on the data read from the MCS. The values can be:
- Per-run or per-cycle
- Sums of one or more channels
- Ratios/asymmetries of two channels
- Specific or agnostic to a helicity polarity, microwave sample/reference state, user bit value
These values can be recorded in EPICS, in the ODB, and as a bank sent to the logger (called HSCL
). Many of these values are shown on the status page of the experiment. The MUD logger only writes the values to file for type 2 runs (historical reasoning unknown).
Configuration
The frontend configuration is rather complex, but doesn't change often, so is done in the frontend code itself. This includes defining the midas bank names that will be used to send data to the logger.
The MUD logging configuration is done via the ODB at /MUD Logging/Histos/Settings. This includes specifying what to do with each midas bank that the logger receives from the frontend. It is most easily edited using the logging webpage.