docs: def ThermalSpectrum(self):
          """Calculate thermal spectrum.
  
          Returns
          -------
          sp : `~pysynphot.spectrum.CompositeSourceSpectrum`
              Thermal spectrum in ``photlam``.
  
          Raises
          ------
          IndexError
              Calculation failed.
  
          """
          try:
              # delegate to subclass.
              thom = _ThermalObservationMode(self._obsmode)
              self.pixscale = thom.pixscale
              return thom._getSpectrum()
          except IndexError:   # graph table is broken.
              raise IndexError("Cannot calculate thermal spectrum; graphtable may be broken")