spectrochempy.CoordSet.set_units

CoordSet.set_units(*args, **kwargs)[source]

Set one or more coord units at once.

Parameters
  • *args (str(s)) – The list of units to apply to the set of coordinates (they must be given according to the coordinate’s name alphabetical order.

  • **kwargs – Keyword attribution of the units. The keys must be valid names among the coordinate’s name list. This is the recommended way to set units as this will be less prone to errors.

  • force (bool, optional, default=False) – Whether or not the new units must be compatible with the current units. See the Coord.`to` method.

Notes

If the args are not named, then the attributions are made in coordinate’s name alphabetical order : e.g, the first units will be for the x coordinates, the second for the y, etc.