code: def _match_channels_to_data(self, data):
          
  
          data = self._format_data(data)
  
          matched_channels = []
          for spectrum in data:
              match = self._overlapping_channels(spectrum.disp)
              if not match:
                  # TODO: make this warning only appear once.
                  logger.warn("No model spectra found matching data channel from "
                      "{0:.0f}-{1:.0f} Angstroms. These data will be ignored."\
                      .format(spectrum.disp[0], spectrum.disp[-1]))
  
              if len(match) > 1:
                  raise ValueError("cannot match multiple channels for one spec")
  
              if len(match) == 0:
                  match = [None]
  
              matched_channels.append(match[0])
  
          missing_channels = set(self.channel_names).difference(matched_channels)
  
          # Now which parameters should be ignored?
          ignore_parameters = []
          if missing_channels:
              for channel in missing_channels:
                  ignore_parameters.extend(
                      set(self.parameters).intersection([_.format(channel) \
                          for _ in ("resolution_{}", "f_{}", "z_{}")]))
                  
                  ignore_parameters.extend(["continuum_{0}_{1}".format(channel, i)\
                      for i in range(self._configuration["model"].get("continuum",
                          {}).get(channel, -1) + 1)])
  
          if ignore_parameters:
              logger.warn("Ignoring the following model parameters because there "
                  "are no data for that channel: {}".format(", ".join(
                      ignore_parameters)))
  
          return (matched_channels, missing_channels, ignore_parameters)
docs: Match observed data to a channel, and return possibly superfluous model
          parameters.