docs: def get_central_wave(wav, resp, weight=1.0):
      """Calculate the central wavelength or the central wavenumber, depending on
      which parameters is input.  On default the weighting funcion is
      f(lambda)=1.0, but it is possible to add a custom weight, e.g. f(lambda) =
      1./lambda**4 for Rayleigh scattering calculations
  
      """
  
      # info: {'unit': unit, 'si_scale': si_scale}
      # To get the wavelenght/wavenumber in SI units (m or m-1):
      # wav = wav * info['si_scale']
  
      # res = np.trapz(resp*wav, wav) / np.trapz(resp, wav)
      # Check if it is a wavelength or a wavenumber and convert to microns or cm-1:
      # This should perhaps be user defined!?
      # if info['unit'].find('-1') > 0:
      # Wavenumber:
      #     res *=
  
      return np.trapz(resp * wav * weight, wav) / np.trapz(resp * weight, wav)