code: def get_spectrogram(self):
          
          args = self.args
  
          asd = self.timeseries[0].asd().value
          if (asd.min() == 0):
              self.log(0, 'Input data has a zero in ASD. '
                       'Q-transform not possible.')
              self.got_error = True
              qtrans = None
          else:
              gps = self.qxfrm_args['gps']
              outseg = Segment(gps, gps).protract(args.plot[self.plot_num])
  
              # This section tries to optimize the amount of data that is
              # processed and the time resolution needed to create a good
              # image. NB:For each time span specified
              # NB: the timeseries h enough data for the longest plot
              inseg = outseg.protract(4) & self.timeseries[0].span
              proc_ts = self.timeseries[0].crop(*inseg)
  
              #  time resolution is calculated to provide about 4 times
              # the number of output pixels for interpolation
              tres = float(outseg.end - outseg.start) / 4 / self.args.nx
              self.qxfrm_args['tres'] = tres
              self.qxfrm_args['search'] = int(len(proc_ts) * proc_ts.dt.value)
  
              self.log(3, 'Q-transform arguments:')
              self.log(3, '{0:>15s} = {1}'.format('outseg', outseg))
              for key in sorted(self.qxfrm_args):
                  self.log(3, '{0:>15s} = {1}'.format(key, self.qxfrm_args[key]))
  
              qtrans = proc_ts.q_transform(outseg=outseg, **self.qxfrm_args)
  
              if args.ymin is None:  # set before Spectrogram.make_plot
                  args.ymin = qtrans.yspan[0]
  
          return qtrans
docs: Worked on a single timesharing and generates a single Q-transform
          spectrogram