Difference between revisions of "Data mode"

From MCEWiki
(MCE Data Types)
Line 11: Line 11:
 
* '''num_flux_jumps''':  the value stored in the flux-jump counter.  See [[ Flux jumping ]].
 
* '''num_flux_jumps''':  the value stored in the flux-jump counter.  See [[ Flux jumping ]].
 
  <math>num\_flux\_jumps_{t} = \frac{1}{flux\_quanta} \left[(sq1\_fb_{t}) - (sq1\_fb\_applied\_to\_DAC_{t})\right]  </math>
 
  <math>num\_flux\_jumps_{t} = \frac{1}{flux\_quanta} \left[(sq1\_fb_{t}) - (sq1\_fb\_applied\_to\_DAC_{t})\right]  </math>
* '''raw_data''':  raw 50 MHz data.  See [[ Raw-mode readout ]].
+
* '''raw_data''':  raw data sampled @ 50 MHz.  See [[ Raw-mode readout ]].
 +
<math>raw\_data = \left[adc\_reading - adc\_offset\right]</math>
 +
 
 +
 
 +
= Data Modes and Windowing (current as of Readout Card firmware revision 4.0.c) =
 +
* The data modes below offer the types of data listed above in various combinations, and with different windowings.  Each data point in a data packet is 32 bits wide, and may have several types of data packed into it.  The table below specifies the different packings.
 +
* The table below makes liberal use of variables '''sq1_fb, error, sq1_fb_filtered, num_flux_jumps,''' and '''raw_data''', which are defined above. 
 +
* Generally, a data packet contains one data point per pixel, although there are exceptions to this:
 +
** Fast Data: packets contain data for a subset of pixels to allow readout at a faster rate:  [[ Fast Data Readout ]].
 +
** Raw Data: packets contain a 50MHz time stream of data starting from row zero.
  
= Data Modes (current as of Readout Card firmware revision 4.0.c) =
 
 
{| border="1"
 
{| border="1"
 
|-
 
|-
Line 46: Line 54:
 
|| Raw 50 MHz ADC samples raw[13:i].   
 
|| Raw 50 MHz ADC samples raw[13:i].   
  
'''raw_mode3''' = (adc_reading – adc_offset) / (2<sup>i</sup>),
+
'''raw_mode3''' = raw_data / (2<sup>i</sup>),
  
 
where i=0 in rev. 4.3.7 and i=6 in all previous firmware.
 
where i=0 in rev. 4.3.7 and i=6 in all previous firmware.
Line 114: Line 122:
 
|| 4.1.6, 4.0.b and later
 
|| 4.1.6, 4.0.b and later
 
|}
 
|}
 
 
 
= Data Mode Notes =
 
* Depending on the data mode, these values will be windowed in a different way.  The notes in the table below explain the windowing, in terms of how many bits are reported and the relative scaling of the windowed value relative to some reference data mode.
 
* The 'data_mode' parameter of each readout card determines which signals end up in the frame data, and in what arrangement.  In order to fit the desired data into 32 bits, a signal may be windowed (some upper and lower bits dropped) and put into some subset of the 32 bits.  The table below explains the windowing and packing of the signals for all data modes of the MCE.
 
* The type, gain, and windowing of the data returned depends on what data mode the MCE is in.  See the table at the bottom of this page for a complete listing of data modes. 
 
* Generally, a data packet contains one data point per pixel, although there are exceptions to this:
 
** Fast Data: packets contain data for a subset of pixels to allow readout at a faster rate:  [[ Fast Data Readout ]].
 
** Raw Data: packets contain a 50MHz time stream of data starting from row zero.
 
  
 
= Automatic loading of data with mas_data.pro =
 
= Automatic loading of data with mas_data.pro =

Revision as of 17:55, 1 October 2008

MCE Data Types

There are 5 types of data that the MCE can return in data packets:

  • sq1_fb: the feedback applied by the MCE to the 1st stage SQUIDs:
    • Where <math>\sum_{i=1}^n error_i</math> is the integral of the error from the moment the pixel was locked, and
    • Where <math>\left[error_{n} - error_{n-1} \right]</math> is the difference between the current error value and the previous one.
<math>sq1\_fb_{t} = \frac{1}{2^{12}} \left[(gainp \times error_{t}) + (gaini \times \sum_{i=1}^{t} error_i) + (gaind \times [error_{t} - error_{t-1}]) \right]</math>
  • error: the error calculated from the Series-Array signals sampled by the ADCs:
<math>error_{t+1} = \sum_{n=1}^{sample\_num} (adc\_reading_{n} - adc\_offset)</math>
<math>filter_{t+1} = 1218 \times low\_pass\_filter(sq1\_fb_{[t, t-1, t-2]})</math>
  • num_flux_jumps: the value stored in the flux-jump counter. See Flux jumping .
<math>num\_flux\_jumps_{t} = \frac{1}{flux\_quanta} \left[(sq1\_fb_{t}) - (sq1\_fb\_applied\_to\_DAC_{t})\right]   </math>
<math>raw\_data = \left[adc\_reading - adc\_offset\right]</math>


Data Modes and Windowing (current as of Readout Card firmware revision 4.0.c)

  • The data modes below offer the types of data listed above in various combinations, and with different windowings. Each data point in a data packet is 32 bits wide, and may have several types of data packed into it. The table below specifies the different packings.
  • The table below makes liberal use of variables sq1_fb, error, sq1_fb_filtered, num_flux_jumps, and raw_data, which are defined above.
  • Generally, a data packet contains one data point per pixel, although there are exceptions to this:
    • Fast Data: packets contain data for a subset of pixels to allow readout at a faster rate: Fast Data Readout .
    • Raw Data: packets contain a 50MHz time stream of data starting from row zero.
Data Mode Summary Pixel-Data Description RC Firmware Revision
0 Error 32b (signed) co-added Error signal err[31:0].

error_mode0 = error

all
1 Feedback 32b (signed) SQ1 Feedback data fb[31:0]. When servo_mode = 3:

feedback_mode1 = sq1_fb * 212

all
2 Filtered feedback 32b (signed) low-pass filtered SQ1 feedback data fb[31:0].

filtered_fb_mode2 = sq1_fb_filtered

2.0.5 and later
3 Raw 50 MHz Raw 50 MHz ADC samples raw[13:i].

raw_mode3 = raw_data / (2i),

where i=0 in rev. 4.3.7 and i=6 in all previous firmware.

Only 3.0.6, 3.0.16, 3.0.25, 4.1.7, 4.2.7, 4.3.7
4 18:14 Mixed Signed 18b SQ1 feedback fb[31] & fb[28:12] + signed 14b coadded error signal err[31] & err[12:0].

feedback_mode4 = sq1_fb

error_mode4 = error

2.0.9 and later
5 24:8 mixed Signed 24b SQ1 feedback fb[31:8] + signed 8b num_flux_jumps fj[7:0].

feedback_mode5 = sq1_fb * 24

all
6 obsolete 18:14 mixed Signed 18b filtered data filter[31] & filter[27:11] + signed 14b coadded error signal err[31] & err[12:0].

filtered_fb_mode6 = sq1_fb_filtered / (211)

error_mode6 = error

3.0.30 to 4.0.6 only
7 22:10 mixed Signed 22b filtered data filter[31] & filter[27:7] + signed 10b coadded error signal err[31] & err[12:4].

filtered_fb_mode7 = sq1_fb_filtered / (27)

error_mode7 = error / (24)

4.0.2 and later
8 obsolete 24:8 mixed Signed 24b filtered data filter[31:8] + signed 8b num_flux_jumps fj[7:0].

filtered_fb_mode8 = sq1_fb_filtered / (28)

4.0.4 only
9 24:8 mixed Signed 24b filtered data filter[31] & filter[23:1] + signed 8b num_flux_jumps fj[7:0].

filtered_fb_mode9 = sq1_fb_filtered/ (21)

4.0.5 and later
10 25:7 mixed Signed 25b filtered data filter[27:3] + signed 7b num_flux_jumps fj[6:0].

filtered_fb_mode10 = sq1_fb_filtered / (23)

4.1.6, 4.0.b and later

Automatic loading of data with mas_data.pro

Please note that, by default, mas_data.pro will rescale data in the following way:

  • error signals are rescaled to match the units of data mode 0.
  • sq1 feedback is rescaled to sq1_feedback (DAC) units (i.e. data mode 1 divided by 212)
  • filtered sq1 feedback is rescaled to the units of data mode 2.

This means the IDL user does not need to worry about the windowing of the different data modes for many applications.