docs: def convert(self, targetunits):
          """Set new user unit, for either wavelength or flux.
  
          This effectively converts the spectrum wavelength or flux
          to given unit. Note that actual data are always kept in
          internal units (Angstrom and ``photlam``), and only converted
          to user units by :meth:`getArrays` during actual computation.
          User units are stored in ``self.waveunits`` and ``self.fluxunits``.
  
          Parameters
          ----------
          targetunits : str
              New unit name, as accepted by `~pysynphot.units.Units`.
  
          """
          nunits = units.Units(targetunits)
  
          if nunits.isFlux:
              self.fluxunits = nunits
          else:
              self.waveunits = nunits