extract_wavelengths#
- FieldResults.extract_wavelengths(wavelengths_in_monitor: ndarray, values_in_monitor: ndarray) ndarray#
Extract metric values at specific wavelengths.
Finds the closest available wavelength for each requested wavelength and returns the corresponding metric value if within tolerance.
- Parameters:
- wavelengths_in_monitor
anp.ndarray Array of wavelengths available in the monitor, in meters.
- values_in_monitor
anp.ndarray Array of metric values corresponding to wavelengths_in_monitor.
- wavelengths_in_monitor
- Returns:
anp.ndarrayMetric values at the specified wavelengths. If a single wavelength is provided, returns a 1-element array.
- Raises:
ValueErrorIf values or wavelengths are None (results not yet computed).
ValueErrorIf requested wavelength is not within tolerance of any available wavelength.