map_ratio_to_quantity#

irispy.utils.density.map_ratio_to_quantity(
observed_ratio,
quantity,
theoretical_ratio,
*,
bounds_error=False,
fill_value=nan,
)[source]#

Map an observed line ratio to the associated physical quantity.

Parameters:
  • observed_ratio (array-like or Quantity) – Observed line ratio values. Must be dimensionless.

  • quantity (Quantity) – Quantity grid associated with theoretical_ratio, e.g. an electron density grid.

  • theoretical_ratio (array-like or Quantity) – Theoretical line ratio sampled on quantity. Must be dimensionless and monotonic.

  • bounds_error (bool, optional) – If True, raise an exception when observed_ratio falls outside the theoretical ratio range. By default, points outside the range are set by fill_value.

  • fill_value (scalar, tuple, or Quantity, optional) – Value used outside of the interpolation interval. If a quantity is given, it must be convertible to the units of quantity.