code: def print_omega_channel(channel, file=sys.stdout):
      
      print('{', file=file)
      try:
          params = channel.params.copy()
      except AttributeError:
          params = OrderedDict()
      params.setdefault('channelName', str(channel))
      params.setdefault('alwaysPlotFlag', int(params.pop('important', False)))
      if channel.frametype:
          params.setdefault('frameType', channel.frametype)
      if channel.sample_rate is not None:
          params.setdefault('sampleFrequency',
                            channel.sample_rate.to('Hz').value)
      if channel.frequency_range is not None:
          low, high = channel.frequency_range.to('Hz').value
          params.setdefault('searchFrequencyRange', (low, high))
      if 'qlow' in params or 'qhigh' in params:
          qlow = params.pop('qlow', 'sqrt(11)')
          qhigh = params.pop('qhigh', 64)
          params.setdefault('searchQRange', (qlow, qhigh))
      # write params
      for key in ['channelName', 'frameType']:
          if key not in params:
              raise KeyError("No %r defined for %s" % (key, str(channel)))
      for key, value in params.items():
          key = '%s:' % str(key)
          if isinstance(value, tuple):
              value = '[%s]' % ' '.join(map(str, value))
          elif isinstance(value, float) and value.is_integer():
              value = int(value)
          elif isinstance(value, str):
              value = repr(value)
          print('  {0: <30}  {1}'.format(key, value), file=file)
      print('}', file=file)
docs: Print a `Channel` in Omega-pipeline scan format