Readout Electronics models#

Readout electronic models are used to add to and manipulate data in Image array inside the Detector object. The data represents the image data in ADUs. A readout electronic model, e.g. Simple ADC, is necessary to first convert from signal data stored in Signal class to image data stored in Image. Multiple models are available to add detector effects after.

Create and Store a detector#

The models Save detector and Load detector can be used respectively to create and to store a Detector to/from a file.

These models can be used when you want to store or to inject a Detector into the current Pipeline.

Save detector#

This model saves the current Detector into a file. Accepted file formats are .h5, .hdf5, .hdf and .asdf.

- name: save_detector
  func: pyxel.models.save_detector
  enabled: true
  arguments:
    filename: my_detector.h5
pyxel.models.save_detector(detector, filename)[source]

Save the current detector into a file.

Load detector#

This model loads a Detector from a file and injects it in the current pipeline. Accepted file formats are .h5, .hdf5, .hdf and .asdf.

- name: load_detector
  func: pyxel.models.load_detector
  enabled: true
  arguments:
    filename: my_detector.h5
pyxel.models.load_detector(detector, filename)[source]

Load a new detector from a file.

Raises:

TypeError – If the loaded detector has not the same type of the current detector.

Simple ADC#

SignalImage

With this model you can convert Signal array into Image mimicking an ideal Analog to Digital Converter (ADC). The parameters adc_bit_resolution and adc_voltage_range from detector Characteristics are used. Output data_type can also be specified with the parameter data_type. If not provided, data_type is determined based on detector.characteristics.adc_bit_resolution.

Example of the configuration file:

- name: simple_adc
  func: pyxel.models.readout_electronics.simple_adc
  enabled: true
  arguments:
    data_type: uint32   # optional
pyxel.models.readout_electronics.simple_adc(detector, data_type=None)[source]#

Apply simple Analog-to-Digital Converter (ADC) to the signal bucket from Detector.

This model simulates the behaviour of an ADC based on detector.characteristics.adc_bit_resolution.

Parameters:
  • detector (Detector) – Pyxel Detector object.

  • data_type (str) – The desired data-type for the Image array. The data-type must be an unsigned integer. If not provided, the data type is determined based on detector.characteristics.adc_bit_resolution. Valid values: ‘uint8’, ‘uint16’, ‘uint32’, ‘uint64’ Invalid values: ‘int16’, ‘int32’, ‘int64’, ‘int’, ‘float’…

Simple amplification#

SignalSignal

Amplify signal using gain from the output amplifier (in V/V) and the signal processor (in V/V).

Example of the configuration file:

- name: simple_amplifier
  func: pyxel.models.readout_electronics.simple_amplifier
  enabled: true
pyxel.models.readout_electronics.simple_amplifier(detector)[source]#

Amplify signal using gain from the output amplifier and the signal processor.

Parameters:

detector (Detector) – Pyxel Detector object.

Dead time filter#

Note

This model is specific to the MKID detector.

PhasePhase

This model only applies to the MKID detector.

There is a maximum limit to the achievable count rate, which is inversely proportional to the minimum distance in time between distinguishable pulse profiles: the so-called “dead time”, which is fundamentally determined by the recombination time of quasi-particles re-forming Cooper pairs. The following is a mosaic of simulations—from [1]—showing the effect of temporal saturation for an MKID-array, which leads to an intensity saturation; by incrementally increasing the brightness level in the field of view, from (a) to (f). The effect appears when the interval between the arrival time of two photons is smaller than the dead time of the affected MKIDs in the array, assuming an ideal read-out bandwidth. The sequence of associated histograms shows how the counts ($#$) move towards higher intensities, until the wall of \(10^5\) (in arbitrary units) is reached.

Mosaic of simulations showing the effect of temporal saturation for an MKID-array, which leads to an intensity saturation.

Example of the configuration file:

- name: dead_time_filter
  func: pyxel.models.readout_electronics.dead_time_filter
  enabled: true
  arguments:
    tau_0: 4.4e-7
    n_0: 1.72e10
    t_c: 1.26
    v: 30.0
    t_op: 0.3
    tau_pb: 2.8e-10
    tau_esc: 1.4e-10
    tau_sat: 1.0e-3
pyxel.models.readout_electronics.dead_time_filter(detector, tau_0=4.4e-07, n_0=17200000000.0, t_c=1.26, v=30.0, t_op=0.3, tau_pb=2.8e-10, tau_esc=1.4e-10, tau_sat=0.001)[source]#

Dead time filter.

The underlying physics of this model is described in [27]; more information can be found on the website [5].

Parameters:
  • detector (MKID) – Pyxel Detector MKID object.

  • tau_0 (float) – Material dependent characteristic time for the electron-phonon coupling. Unit: s

  • n_0 (float) – Material dependent single spin density of states at the Fermi-level. Unit: um^-3 eV^-1

  • t_c (float) – Material dependent critical temperature. Unit: K

  • v (float) – Superconducting volume. Unit: um^3

  • t_op (float) – Temperature. Unit: K

  • tau_pb (float) – Phonon pair-breaking time. Unit: s

  • tau_esc (float) – Phonon escape time. Unit: s

  • tau_sat (float) – Saturation time. Unit: s

SAR ADC#

SignalImage

Digitize signal array using SAR (Successive Approximation Register) ADC logic. The parameters adc_bit_resolution and adc_voltage_range from detector Characteristics are used.

Example of the configuration file:

- name: sar_adc
  func: pyxel.models.readout_electronics.sar_adc
  enabled: true
pyxel.models.readout_electronics.sar_adc(detector)[source]#

Digitize signal array using SAR (Successive Approximation Register) ADC logic.

Parameters:

detector (Detector) – Pyxel Detector object.

SAR ADC with noise#

SignalImage

Digitize signal array using SAR (Successive Approximation Register) ADC logic with noise. The parameters adc_bit_resolution and adc_voltage_range from detector Characteristics are used.

Example of the configuration file for adc_bit_resolution equals to 8 bits:

- name: sar_adc_with_noise
  func: pyxel.models.readout_electronics.sar_adc_with_noise
  strengths: [0., 0., 0., 0., 0.1, 0.2, 0.3, 0.1]
  noises: [0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1]
  enabled: true
pyxel.models.readout_electronics.sar_adc_with_noise(detector, strengths, noises)[source]#

Digitize signal array using SAR (Successive Approximation Register) ADC logic with noise.

Successive-approximation-register (SAR) analog-to-digital converters (ADC) for each bit, will compare the randomly perturbated reference voltage to the voltage of the pixel, adding the corresponding digital value if it is superior. The perturbations are generated randomly for each pixel.

The reference voltage fluctuations are regulated by two parameters, strength and noise, that are set independently for each bit.

This model and the notes are based on the work of Emma Esparza Borges from ESO.

Parameters:
  • detector (Detector) – Pyxel Detector object.

  • strengths (tuple of float) – Sequence of detector.characteristics.adc_bit_resolution number(s). Unit: V

  • noises (tuple of float) – Sequence of detector.characteristics.adc_bit_resolution number(s). Unit: V

Raises:

ValueError – Raised if parameters strengths and/or noises does not have exactly the correct numbers of parameters. It is expected to have detector.characteristics.adc_bit_resolution elements.

Notes

The SAR ADC architecture is based on a binary search algorithm. Essentially, it works comparing the analog input to the output of a Digital-to-Analog Converter (DAC), which is initialized with the MSB high and all other bits low. If the analog sample is higher than the DAC output the MSB keeps high, while if the DAC output is higher the MSB is set low. This comparison is performed for each bit from the MSB to the LSB following the same procedure.

Simplified N-bit SAR ADC architecture.

Simplified N-bit SAR ADC architecture (see https://www.maximintegrated.com/en/app-notes/index.mvp/id/1080).#

Considering a 8-bits SAR ADC, for the first comparison the 8-bit register is set to midscale (10000000) forcing the DAC output (\(V_{DAC}\)) to be half of the reference voltage: \(V_{DAC}=\frac{V_{REF}}{2}\). For the second comparison, if \(V_{DAC} < V_{IN}\) then the 8-bit register is set to 11000000, if \(V_{DAC} > V_{IN}\) then the 8-bit register is set to 01000000. In both cases \(V_{DAC} = \frac{V_{REF}}{4}\).

It is essential that \(V_{REF}\) remains stable through all comparisons to be able to perform an accurate conversion from the analog inputs of the instrument.

A potential sources of digitization issues can be modeled by adding voltage fluctuations to \(V_{REF}\) at each stage of the process.

These fluctuations can be represented by the vectors \(\mathit{strength}\) and \(\mathit{noise}\). For a 8-bits SAR ADC, we have \(\mathit{strength} = \begin{pmatrix}\mathit{strength}_\mathit{bit7}\\ \vdots\\ \mathit{strength}_\mathit{bit0}\end{pmatrix}\) and \(noise = \begin{pmatrix}\mathit{noise}_\mathit{bit7}\\ \vdots\\ \mathit{noise}_\mathit{bit0}\end{pmatrix}\).

The fluctuations at each stage of the process (in this case 8 stages) are represented by the vector \(V^\mathit{perturbated}_\mathit{REF}\) with

\[\begin{split}\begin{matrix} V^\mathit{perturbated}_{\mathit{REF}_\mathit{bit7}} = V_\mathit{REF} \left(1 + \mathit{np.random.normal}(\mathit{strength}_\mathit{bit7}, \mathit{noise}_\mathit{bit7})\right)\\ \cdots\\ V^\mathit{perturbated}_{\mathit{REF}_\mathit{bit0}} = V_\mathit{REF} \left(1 + \mathit{np.random.normal}(\mathit{strength}_\mathit{bit0}, \mathit{noise}_\mathit{bit0})\right) \end{matrix}\end{split}\]

Simple phase conversion#

Note

This model is specific to the MKID detector.

PhaseImage

With this model you can convert Phase array into Image, given a hard-coded multiplicative conversion factor.

Example of the configuration file:

- name: simple_phase_conversion
  func: pyxel.models.readout_electronics.simple_phase_conversion
  enabled: true
pyxel.models.readout_electronics.simple_phase_conversion(detector, phase_conversion=1.0)[source]#

Create an image array from phase array.

Parameters:
  • detector (MKID) – Pyxel MKID detector object.

  • phase_conversion (float) – Phase conversion factor