docs: def StdRenorm(spectrum, band, RNval, RNunitstring, force=False):
      """This is used by `~pysynphot.spectrum.SourceSpectrum` for
      renormalization.
  
      Parameters
      ----------
      spectrum : `~pysynphot.spectrum.SourceSpectrum`
          Spectrum to renormalize.
  
      band, RNval, RNunitstring, force
          See :meth:`~pysynphot.spectrum.SourceSpectrum.renorm`.
  
      Returns
      -------
      newsp : `~pysynphot.spectrum.CompositeSourceSpectrum`
          Renormalized spectrum.
  
      """
      # Validate the overlap
      if not force:
          stat = band.check_overlap(spectrum)
          if stat == 'full':
              pass
          elif stat == 'partial':
              if band.check_sig(spectrum):
                  spectrum.warnings['PartialRenorm'] = True
                  print ('Warning: Spectrum is not defined everywhere in '
                         'renormalization bandpass. At least 99% of the band '
                         'throughput has data, therefore proceeding anyway. '
                         'Spectrum will be extrapolated at constant value.')
              else:
                  raise OverlapError('Spectrum and renormalization band do not '
                                     'fully overlap. You may use force=True to '
                                     'force the renormalization to proceed.')
          elif stat == 'none':
              raise DisjointError('Spectrum and renormalization band are '
                                  'disjoint.')
  
      # Compute the flux of the spectrum through the bandpass and make sure
      # the result makes sense.
      sp = spectrum * band
  
      totalflux = sp.integrate()
      if totalflux <= 0.0:
          raise ValueError('Integrated flux is <= 0')
      if np.isnan(totalflux):
          raise ValueError('Integrated flux is NaN')
      if np.isinf(totalflux):
          raise ValueError('Integrated flux is infinite')
  
      # Get the standard unit spectrum in the renormalization units
      RNunits = units.Units(RNunitstring)
      if RNunits.isDensity:
          up = RNunits.StdSpectrum * band
      else:
          up = RNunits.StdSpectrum
  
      # Renormalize in magnitudes....
      if RNunits.isMag:
          ratio = totalflux / up.integrate()
          dmag = RNval + 2.5 * math.log10(ratio)
          newsp = spectrum.addmag(dmag)
  
      #...or in linear flux units.
      else:
          const = RNval * (up.integrate() / totalflux)
          newsp = spectrum * const
  
      # Return the new spectrum
      return newsp