class_docstr: QSpectrumAnalyzer main window
class_docstr_tok: ["QSpectrumAnalyzer","main","window"]
docstr: Start power thread
docstr_tok: ["Start","power","thread"]
code: def start(self, single_shot=False):
      """Start power thread"""
      settings = QtCore.QSettings()
  
      self.prev_sweep_time = 0
      self.prev_data_timestamp = time.time()
      self.start_timestamp = self.prev_data_timestamp
  
      if self.intervalSpinBox.value() >= 1:
          self.progressbar.setRange(
              0, self.intervalSpinBox.value() * 1000
          )
      else:
          self.progressbar.setRange(0, 0)
      self.update_progress(0)
      self.update_status_timer.start(100)
  
      self.waterfallPlotWidget.history_size = settings.value(
          "waterfall_history_size", 100, int
      )
      self.waterfallPlotWidget.clear_plot()
  
      self.spectrumPlotWidget.main_curve = bool(
          self.mainCurveCheckBox.isChecked()
      )
      self.spectrumPlotWidget.main_color = str_to_color(
          settings.value("main_color", "255, 255, 0, 255")
      )
      self.spectrumPlotWidget.peak_hold_max = bool(
          self.peakHoldMaxCheckBox.isChecked()
      )
      self.spectrumPlotWidget.peak_hold_max_color = str_to_color(
          settings.value("peak_hold_max_color", "255, 0, 0, 255")
      )
      self.spectrumPlotWidget.peak_hold_min = bool(
          self.peakHoldMinCheckBox.isChecked()
      )
      self.spectrumPlotWidget.peak_hold_min_color = str_to_color(
          settings.value("peak_hold_min_color", "0, 0, 255, 255")
      )
      self.spectrumPlotWidget.average = bool(
          self.averageCheckBox.isChecked()
      )
      self.spectrumPlotWidget.average_color = str_to_color(
          settings.value("average_color", "0, 255, 255, 255")
      )
      self.spectrumPlotWidget.baseline = bool(
          self.baselineCheckBox.isChecked()
      )
      self.spectrumPlotWidget.baseline_color = str_to_color(
          settings.value("baseline_color", "255, 0, 255, 255")
      )
      self.spectrumPlotWidget.persistence = bool(
          self.persistenceCheckBox.isChecked()
      )
      self.spectrumPlotWidget.persistence_length = settings.value(
          "persistence_length", 5, int
      )
      self.spectrumPlotWidget.persistence_decay = settings.value(
          "persistence_decay", "exponential"
      )
      self.spectrumPlotWidget.persistence_color = str_to_color(
          settings.value("persistence_color", "0, 255, 0, 255")
      )
      self.spectrumPlotWidget.clear_plot()
      self.spectrumPlotWidget.clear_peak_hold_max()
      self.spectrumPlotWidget.clear_peak_hold_min()
      self.spectrumPlotWidget.clear_average()
      self.spectrumPlotWidget.clear_baseline()
      self.spectrumPlotWidget.clear_persistence()
  
      self.data_storage.reset()
      self.data_storage.set_smooth(
          bool(self.smoothCheckBox.isChecked()),
          settings.value("smooth_length", 11, int),
          settings.value("smooth_window", "hanning"),
      )
      self.data_storage.set_subtract_baseline(
          bool(self.subtractBaselineCheckBox.isChecked()),
          settings.value("baseline_file", None),
      )
  
      if not self.power_thread.alive:
          self.power_thread.setup(
              float(self.startFreqSpinBox.value()),
              float(self.stopFreqSpinBox.value()),
              float(self.binSizeSpinBox.value()),
              interval=float(self.intervalSpinBox.value()),
              gain=float(self.gainSpinBox.value()),
              ppm=int(self.ppmSpinBox.value()),
              crop=int(self.cropSpinBox.value()) / 100.0,
              single_shot=single_shot,
              device=settings.value("device", ""),
              sample_rate=settings.value("sample_rate", 2560000, float),
              bandwidth=settings.value("bandwidth", 0, float),
              lnb_lo=settings.value("lnb_lo", 0, float),
          )
          self.power_thread.start()
  
imports: import sys, os, signal, time, argparse
  from Qt import QtCore, QtGui, QtWidgets
  from qspectrumanalyzer import backends
  from qspectrumanalyzer.version import __version__
  from qspectrumanalyzer.data import DataStorage
  from qspectrumanalyzer.plot import SpectrumPlotWidget, WaterfallPlotWidget
  from qspectrumanalyzer.utils import str_to_color, human_time
  from qspectrumanalyzer.settings import QSpectrumAnalyzerSettings
  from qspectrumanalyzer.smoothing import QSpectrumAnalyzerSmoothing
  from qspectrumanalyzer.persistence import QSpectrumAnalyzerPersistence
  from qspectrumanalyzer.colors import QSpectrumAnalyzerColors
  from qspectrumanalyzer.baseline import QSpectrumAnalyzerBaseline
  from qspectrumanalyzer.ui_qspectrumanalyzer import Ui_QSpectrumAnalyzerMainWindow
label_desc: Use image node_id 14 for calling the QSpectrumAnalyzerMainWindow obj's underlying member method code with example usage: obj.start(single_shot) without return types