Data mode

From MCEWiki
Revision as of 16:28, 19 August 2008 by 142.103.235.227 (talk) (Table of data modes)

Table of data modes

Data Mode Summary Pixel-Data Description RC Firmware Revision
0 Error 32b (signed) co-added Error signal, sample_num*(adc_reading – adc_offset)

error(31:0)

all
1 Feedback 32b (signed) SQ1 Feedback data.

When servo_mode =3, this is the PID calculation result which has 12 more bits of accuracy than the actual 14b SQ1 feedback applied.

fb(31:0)

all
2 Filtered feedback 32b (signed) SQ1 filtered feedback data.

Low-pass-filtered SQ1 feedback data.

fltr(31:0)

2.0.5 and later
3 Raw 50 MHz Raw data, 50MHz ADC samples in signed 14b format in firmware revision 4.3.7 (and in 8b format divided by 26 in all other versions)

raw(13:0)

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 [bits 31:14] + signed 14b coadded error signal [bits 13:0]

The feedback reported in this mode is divided by 212 compared to data_mode=1.

fb(MSB) & fb(16:0) & coadd(13:0)

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

The feedback reported in this mode is divided by 28 compared to data_mode=1.

fb(31:8) & fj(7:0)

all
6 obsolete 18:14 mixed Signed 18b filtered data [31:14] + signed 14b coadded error signal [13:0]

The filtered data in this mode is divided by 211 compared to data_mode=2 (to partially eliminate the filter gain of ~1216).

fltr(MSB) & fltr(27:11) & error(MSB) & error(12:0)

3.0.30 to 4.0.6 only
7 22: 10 mixed Signed 22b filtered data [31:10] + signed 10b coadded error signal [9:0]

The filtered data in this mode is divided by 27 compared to data_mode=2 (to partially eliminate the filter gain of ~1216). The coadded error signal is divided by 24 compared to data_mode 0.

fltr(MSB) & fltr(27:7) & error(MSB) & error(12:4)

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

The filtered data in this mode is divided by 28 compared to data_mode=2.

fltr(31:8) & fj(7:0)

4.0.4 only
9 24:8 mixed Signed 24b filtered data [24:1] + signed 8b num_flux_jumps [7:0]

The filtered data in this mode is divided by 2 compared to data_mode=2.

fltr(MSB) & fltr(23:1) & fj(7:0)

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

The filtered data in this mode is divided by 8 compared to data_mode=2. (no sticky sign bit!)

fltr(27:3) & fj(6:0)

4.1.6, 4.0.b and later

Note regarding units

During normal readout (i.e. not raw mode), there are 4 data associated with each channel. These are:

  • co-added error ("error")
  • sq1 feedback ("sq1fb")
  • filtered sq1 feedback ("filtered sq1fb")
  • flux jump counter ("num_flux_jumps")

Depending on the data mode, these values will be windowed in a different way. The notes in the table above 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 scaling is quoted as being relative to some reference data mode. For example, in data mode 4 the text

"The feedback reported in this mode is divided by 212 compared to data_mode=1."

is meant to imply that if I were to observe the same system's feedback in data_mode 4 and data_mode 1, and call the two measurements fb_4 and fb_1, then I would expect

 fb_4 = fb_1 >> 12 = floor[ fb_1 / 2^12 ]

where >> denotes the right-bit-shift operator.

The reference data modes for error, sq1fb and filtered sq1fb are, respectively, 0, 1, and 2. In these modes, the meaning of the data are as follows:

Signal Reference data mode Description
co-added error 0 Co-added error for the current internal MCE frame. For ADC readings Y, adc_offset Yo and where n is the sample_num, the error e is <math>e = \sum_1^n (Y - Y_0)</math>, where n is sample_num.
SQ1 feedback 1 Calculated squid1 feedback. Note that this number should be distinguished from the sq1_DAC value, which is obtained from bits [25:12] of the SQ1 feedback. When flux-jumping is active, an integer multiple of the flux_quanta value will be subtracted from sq1_DAC prior to application to the DAC.
filtered SQ1 feedback 2 The output from the 4-pole Butterworth low-pass filter . The input to the filter is the SQ1 feedback signal. The effective DC gain, including quantization error, is approximately 1216.


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_DAC units (i.e. data mode 1 divided by 212)
  • filtered sq1 feedback is rescaled to the units of data mode 2.