Merging / gluing two LIDAR signals#

This page documents SignalCreation.Lidar.Lidar.glue(), which merges two LIDAR signals (channel 1 and channel 2) over a specified altitude window using a chosen method and optional vertical shift. It writes the merged signal, its uncertainty, and merged resolution arrays.

Overview#

  • Reads or accepts pairs of Signal_Type (two channels).

  • Locates input variables by prefix (set from name_param_tag, e.g. slope, ozone, pr2filt).

  • Merges within \([alt_{\min},\,alt_{\max}]\) using the requested method (e.g., linear).

  • Computes merged uncertainties by merging the uncertainty fields with the same method.

  • Produces a new output with a paired Signal_Type and merged resolution attributes.

Function signature#

def glue(
    self,
    list_signal_type_1: None | list = None,
    list_signal_type_2: None | list = None,
    name_param_tag: str = "MergingOzone",
    method: list | str | None = None,
    shift: list | int | None = None,
    alt_min: pint.Quantity | str | list | None = None,
    alt_max: pint.Quantity | str | list | None = None,
    error_suffix: None | str = None,
    input_prefix: str | None = None,
    prefix_output: str | None = None,
    math_operation: str = "addition",
) -> None:
    \"\"\"Merge two signals over an altitude interval, write value+uncertainty+resolution.\"\"\"

Parameters#

  • list_signal_type_1, list_signal_type_2 (list[str] | None) Signal_Type lists for the two channels. If None, read from XML under <name_param_tag>/channel_1 and channel_2.

  • name_param_tag (str, default: ``”MergingOzone”``) Selects input prefix and XML section (also supports "MergingSlope" and "MergingPr2").

  • method (str | list[str], default from XML or ``”linear”``) Merging/interpolation method per pair.

  • shift (int | list[int], default from XML or ``0``) Optional vertical shift.

  • alt_min, alt_max (pint.Quantity | str | list | None) Altitude limits for the merging window (default 23–24 km if not provided).

  • error_suffix (str | None, default: ``”_Unc”``) Uncertainty suffix (naming).

  • input_prefix (str | None) and prefix_output (str | None) Data prefixes; prefix_output defaults to input_prefix if not set.

  • math_operation (str, default: ``”addition”``) Operation passed to merge() for combining arrays.

Workflow#

  1. Read/validate configuration (lists length, non-empty entries).

  2. Resolve variable names for each channel by Signal_Type.

  3. Fetch values + uncertainties, and altitude + resolution arrays.

  4. Call merge() for both value and uncertainty in the chosen window/method/shift.

  5. Create output arrays with paired Signal_Type (via get_signal_type_paired()).

  6. Merge resolution arrays (value-wise merge on each resolution component).

  7. Save outputs and merged resolution names into attributes.

Outputs#

  • New merged variable under prefix_output (value + uncertainty).

  • Resolution arrays written and referenced in the Resolution attribute.

  • Returns None (modifies dataset in place).

See also#