code: def cross_correlate(self, templates, **kwargs):
          
  
          # templates can be:
          # - a single Spectrum1D object
          # - (template_dispersion, template_fluxes)
  
          # templates can be a single spectrum or a tuple of (dispersion, fluxes)
  
          if isinstance(templates, (Spectrum1D, )):
              template_dispersion = templates.disp
              template_fluxes = templates.flux
  
          else:
              template_dispersion = templates[0]
              template_fluxes = templates[1]
  
          return _cross_correlate(self, template_dispersion, template_fluxes,
              **kwargs)
docs: Cross correlate the spectrum against a set of templates.