WrightTools.data.Data.map_variable

Data.map_variable(variable, points, input_units='same', *, name=None, parent=None, verbose=True) Data[source]

Map points of an axis to new points using linear interpolation.

Out-of-bounds points are written nan.

Non-mapped variables are kept in the data object only if they are orthogonal to the mapped variable (see kit.orthogonal).

Parameters:
  • variable (string) – The variable to map onto.

  • points (array-like or int) – If array, the new points. If int, new points will have the same limits, with int defining the number of evenly spaced points between.

  • input_units (str (optional)) – The units of the new points. Default is same, which assumes the new points have the same units as the variable.

  • name (string (optional)) – The name of the new data object. If None, generated from natural_name. Default is None.

  • parent (WrightTools.Collection (optional)) – Parent of new data object. If None, data is made at root of a new temporary file.

  • verbose (bool (optional)) – Toggle talkback. Default is True.

Returns:

New data object.

Return type:

WrightTools.Data