docs: def map_variable(
          self, variable, points, input_units="same", *, name=None, parent=None, verbose=True
      ) -> "Data":
          """Map points of an axis to new points using linear interpolation.
  
          Out-of-bounds points are written nan.
  
          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 axis.
          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
          -------
          WrightTools.Data
              New data object.
          """
          # get variable index
          variable_index = wt_kit.get_index(self.variable_names, variable)
          variable = self.variables[variable_index]
          # get points
          if isinstance(points, int):
              points = np.linspace(variable.min(), variable.max(), points)
          points = np.array(points)
          # points dimensionality
          if points.ndim < variable.ndim:
              for i, d in enumerate(variable.shape):
                  if d == 1:
                      points = np.expand_dims(points, axis=i)
          # convert points
          if input_units == "same":
              pass
          else:
              points = wt_units.converter(points, input_units, variable.units)
          # construct new data object
          special = ["name", "axes", "constants", "channel_names", "variable_names"]
          kwargs = {k: v for k, v in self.attrs.items() if k not in special}
          if name is None:
              name = "{0}_{1}_mapped".format(self.natural_name, variable.natural_name)
          kwargs["name"] = name
          kwargs["parent"] = parent
          out = Data(**kwargs)
          # mapped variable
          values = points
          out.create_variable(values=values, **variable.attrs)
          # orthogonal variables
          for v in self.variables:
              if wt_kit.orthogonal(v.shape, variable.shape):
                  out.create_variable(values=v[:], **v.attrs)
          out.transform(*self.axis_expressions)
          # interpolate
          if self.ndim == 1:
  
              def interpolate(dataset, points):
                  function = scipy.interpolate.interp1d(variable[:], dataset[:], bounds_error=False)
                  return function(points)
  
          else:
              pts = np.array([a.full.flatten() for a in self.axes]).T
              out_pts = np.array([a.full.flatten() for a in out.axes]).T
  
              def interpolate(dataset, points):
                  values = dataset.full.flatten()
                  function = scipy.interpolate.LinearNDInterpolator(pts, values, rescale=True)
                  new = function(out_pts)
                  new.shape = out.shape
                  return new
  
          for v in self.variables:
              if v.natural_name not in out.variable_names:
                  out.create_variable(values=interpolate(v, points), **v.attrs)
          out.variable_names = self.variable_names  # enforce old order
          out._variables = None  # force regeneration of variables @property
          for channel in self.channels:
              out.create_channel(values=interpolate(channel, points), **channel.attrs)
          # finish
          if verbose:
              print("data mapped from {0} to {1}".format(self.shape, out.shape))
          return out