Geometrical factor loading#
This page documents SignalCreation.Lidar.Lidar.geometrical_factor(), which loads and stores
the geometrical factor profile for each selected raw LIDAR channel. For every channel, it chooses
the appropriate file from XML config (conditioned on Signal_Type), reads the profile with
GeometricFactor, creates a unit uncertainty array, and writes both into self._lidar.
Overview#
Discovers raw channels from the dataset (prefix from naming rules), restricted to
Signal_Typein[100, 119]and excluding uncertainty variables.For each channel: 1. Selects the geometrical-factor file using the XML mapping conditioned on the channel’s
Signal_Type. 2. Builds the station altitude as a Pint quantity fromself._lidar['altitude']. 3. InstantiatesGeometricFactorand retrieves the factor profile aligned to the channel. 4. Creates a unit-uncertainty array (xr.ones_like). 5. Saves value + uncertainty intoself._lidarwith a configurable output prefix.
If no filenames are configured under GeometricFactor/filenames, the method exits without changes.
Function signature#
def geometrical_factor(
self,
list_data_name: None | list = None,
error_suffix: None | str = None,
prefix_output_name: str | None = None,
) -> None:
"""Load per-channel geometrical factor and store it into the LIDAR dataset."""
Parameters#
list_data_name(list | None) Optional explicit list of variable names to process. Note: in the current implementation, it is recomputed internally from the dataset by filtering on validSignal_Typevalues and excluding uncertainties.error_suffix(str | None, default: ``”_Unc”``) Suffix used to name the uncertainty variable. Currently validated but not used inside the function body (the uncertainty is set to ones).prefix_output_name(str | None, default from naming rules) Output variable prefix used when saving results. Defaults tonv.get_var_name("geometric_factor").
Inputs and assumptions#
self._lidarprovides:a coordinate/variable
"altitude"with unit metadata inattrs['units'];raw channel variables prefixed by
nv.get_var_name('raw_lidar_data')and each with an integer"Signal_Type"attribute.
unit_registry(global Pint registry) andself._ureg(instance registry) are available.XML configuration accessible via
self._param.
XML configuration#
The method reads the following keys:
Read/Lidar_files/Signal_typeGlobal list of channel signal types (used for alignment/validation).GeometricFactor/filenames(required to proceed) Per-channel file(s) defining the geometrical factor. The method selects the filename for a given channel usingself._param.get_param_xml_with_condition()with the condition key"Read/Lidar_files/Signal_type"and the channel’sSignal_Typevalue.GeometricFactor/formatFormat/hints used byGeometricFactorto read the profile.
Outputs (side effects)#
Initializes
self._geometrical_factoras a list (ifNone), then appends oneGeometricFactorinstance per processed channel.Adds two
xarray.DataArrayobjects toself._lidarvianv.add_lidar_da(): - the geometrical factor profile, - the associated unit-uncertainty array, both carrying{"Signal_Type": <channel value>}in their attributes.
Return value: None — everything is stored in-place.
Errors, validation, and logs#
Input parameters are validated with
tf.check_input_param()(type + allowNone).If
GeometricFactor/filenamesis missing orNone, the function returns early without raising an exception.Debug messages are issued via
logging.
Example#
Minimal usage (default discovery of channels and default output name):
lidar.geometrical_factor()
Custom output prefix:
lidar.geometrical_factor(prefix_output_name="GF")
Notes#
error_suffixis kept for forward compatibility and may be used in a future implementation that propagates real uncertainties.The station altitude is passed to
GeometricFactoras a Pint quantity built fromself._lidar['altitude']and its units.