Пример #1
0
 def openFile(self, fileName=None):
     if fileName is None or fileName is False:
         fileName = QtGui.QFileDialog.getOpenFileName(
             self, 'Open file', './data',
             'Geomagnetic variations (*.gmv);;Solar wind Kp estimation (*.ske)'
         )
     if QtCore.QFile.exists(fileName):
         if self.actionClose.isEnabled():
             self.closeFile()
         self.progress = ProgressGroup('Loading data ...', self.statusbar)
         self.statusbar.insertWidget(0, self.progress)
         self.csv = CSVImpot(fileName)
         self.csv.notifyProgress.connect(self.progress.setValue)
         self.csv.loaded.connect(self.loadFile)
         self.progress.cancelled.connect(self.openFileTeminate)
         self.csv.start()
Пример #2
0
 def plotScalogram(self):
     self.progress = ProgressGroup('Plot scalogram ...', self.statusbar)
     self.statusbar.insertWidget(0, self.progress)
     self.wa.plotted.connect(self.scalogramPlotted)
     self.wa.notifyProgress.connect(self.progress.setValue)
     self.wa.cancelled.connect(self.scalogramPlotted)
     self.progress.cancelled.connect(self.wa.cancelScalogram)
     self.wa.plotScalogram(
         self.scalogramCanvas.axes,
         offset=self.offsetHorizontalScrollBar.value(),
         size=2**self.sizeVerticalScrollBar.value(),
         largestscale=self.scaleHorizontalScrollBar.value(),
         notes=self.notesVerticalScrollBar.value(),
         wavelet=self.waveletComboBox.itemData(
             self.waveletComboBox.currentIndex()),
         omega0=self.omega0SpinBox.value(),
         order=self.orderSpinBox.value(),
         min_h=self.minHspinBox.value(),
         max_h=self.maxHspinBox.value())