Gated spectrometer plugin

The EDD.gated_spectrometer collection provides GPU-accelerated spectroscopy and spectropolarimetry. It separates integrations according to the noise-diode state embedded in the digitized stream, so science and calibration spectra are produced simultaneously.

This page was verified against collection version 1.0.1 in the supplied repository. The current collection uses one unified pipeline and selects coherence or Stokes output with configuration; older site repositories may refer to separate dual-polarization or full-Stokes roles.

Role and lifecycle

Role

EDD.gated_spectrometer.gated_spectrometer

Default product

gated_spectrometer

Pipeline server

edd.gated_spectrometer.pipeline.GatedSpectrometerPipeline

Flavour

Streaming. After capture-start it processes continuously across scan boundaries until deconfigure.

Implementation

Python controls SPEAD capture, DADA buffers, GPU processing, and optional output transmission. The spectrometer itself is implemented in C++/CUDA.

Inputs and outputs

The normal input is one or two MPIFR_EDD_Packetizer:2 streams. A descriptor must include correct sample rate, bit depth, polarization, samples per heap, sync time, address, and port. Two time-aligned polarizations are required for cross-polarization coherences or Stokes output.

Output streams use GatedSpectrometer:2. In coherence mode they represent polarization powers and complex cross terms for both diode gates. In Stokes mode they represent I, Q, U, and V for both gates. Output names in a provision description must agree with the selected mode and downstream writer.

The number of real-input spectral bins is fft_length / 2 + 1. The nominal integration time is:

\[t_{int} = \frac{{\rm fft\_length} \times {\rm naccumulate}}{\rm {sample\ rate}}\]

Configuration

Main configuration keys

Key

Values/default

Meaning

fft_length

1048576

FFT length. Determines channel count and GPU memory or compute cost.

naccumulate

512

Spectra accumulated per output integration.

output_mode

coherences

coherences or stokes.

output_type

network

network, disk, or null.

disable_gate

-1

-1 uses both gates; 0 or 1 disables that selected gate in the processing application.

samples_per_block

268435456

Processing-block size in input samples; an expert memory tuning value.

input_buffer_critical_level

0.85

Fill fraction above which the input buffer is critical.

input_buffer_critical_timeout

30 seconds

Duration of critical fill or missing input before entering error.

spead_io_backend

mk

High-rate stream I/O implementation.

computing_cores

auto per task

CPU assignments for receive, send, and processing tasks.

output_rate_factor

1.10

Headroom applied when configuring the network sender.

dummy_input

false

Test input; never enable unintentionally in an observation.

Worked product configuration

{
  "id": "gated_spectrometer",
  "fft_length": 262144,
  "naccumulate": 16384,
  "output_mode": "coherences",
  "input_data_streams": [
    {
      "source": "dig_pack_controller:polarization_0",
      "format": "MPIFR_EDD_Packetizer:2"
    },
    {
      "source": "dig_pack_controller:polarization_1",
      "format": "MPIFR_EDD_Packetizer:2"
    }
  ],
  "output_data_streams": {
    "P0_ND0": {"format": "GatedSpectrometer:2", "ip": "auto", "port": 7152},
    "P0_ND1": {"format": "GatedSpectrometer:2", "ip": "auto", "port": 7152},
    "P1_ND0": {"format": "GatedSpectrometer:2", "ip": "auto", "port": 7152},
    "P1_ND1": {"format": "GatedSpectrometer:2", "ip": "auto", "port": 7152}
  }
}

Monitoring and diagnosis

The role installs pipeline-status and receive-status panels. Important pipeline sensors include integration time, output rate, input-buffer fill, and input write progress. A rising fill level indicates processing cannot keep pace; flat write progress indicates missing input. Also inspect receiver packet-loss counters and confirm both polarization streams share sample rate and sync time.

Common configuration mistakes are an output list inconsistent with output_mode, insufficient GPU memory for the FFT and block sizes, a wrong packetizer format version, and a consumer expecting the older GatedSpectrometer:1 format.

Testing

The plugin contains Python unit tests, C++/CUDA tests, plotter and SPEAD-handler tests, and a lifecycle provision-test module named edd.gated_spectrometer.gated_spectrometer_tests.