Update left half of space weather with colored labels. Also apply minor modifications
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
from PyQt5.QtCore import pyqtSlot, pyqtSignal, QObject
|
||||
|
||||
from threads import UpadteSpaceWeatherThread, ThreadStatus
|
||||
from utilities import double_split
|
||||
|
||||
class SpaceWeatherData(QObject):
|
||||
update_complete = pyqtSignal(bool)
|
||||
@@ -21,10 +20,11 @@ class SpaceWeatherData(QObject):
|
||||
self.__update_thread.start()
|
||||
|
||||
def __parse_data(self):
|
||||
self.xray = double_split(self.xray)
|
||||
self.prot_el = double_split(self.prot_el)
|
||||
self.ak_index = double_split(self.ak_index)
|
||||
self.sgas = double_split(self.sgas)
|
||||
double_split = lambda string : [i.split() for i in string.splitlines()]
|
||||
self.xray = double_split(self.xray)
|
||||
self.prot_el = double_split(self.prot_el)
|
||||
self.ak_index = double_split(self.ak_index)
|
||||
self.sgas = double_split(self.sgas)
|
||||
self.geo_storm = double_split(self.geo_storm)
|
||||
|
||||
def remove_data(self):
|
||||
@@ -36,7 +36,7 @@ class SpaceWeatherData(QObject):
|
||||
|
||||
@pyqtSlot()
|
||||
def __parse_and_emit_signal(self):
|
||||
if self.__update_thread.status != ThreadStatus.OK:
|
||||
if self.__update_thread.status is not ThreadStatus.OK:
|
||||
status_ok = False
|
||||
else:
|
||||
status_ok = True
|
||||
|
||||
Reference in New Issue
Block a user