astrodatagui: show additional star data
This commit is contained in:
@@ -90,7 +90,7 @@ class AstrodataGUI(QtWidgets.QMainWindow):
|
||||
print("No spectral type found")
|
||||
specType = "-"
|
||||
|
||||
rotVel = "-"
|
||||
rotVel = -1
|
||||
rotVelUnit = ""
|
||||
try:
|
||||
if(result["RVZ_TYPE"][0] == "v"):
|
||||
@@ -103,10 +103,11 @@ class AstrodataGUI(QtWidgets.QMainWindow):
|
||||
dist = result["Distance_distance"][0]
|
||||
distUnit = result["Distance_unit"][0]
|
||||
except:
|
||||
dist = "-"
|
||||
dist = -1
|
||||
distUnit = ""
|
||||
|
||||
self.starDB.insertStar(mainName, altNames, diag.productManifest)
|
||||
self.starDB.insertStar(mainName, altNames, diag.productManifest,
|
||||
specType, rotVel, rotVelUnit, dist, distUnit)
|
||||
|
||||
self.updateStarList()
|
||||
|
||||
@@ -121,9 +122,17 @@ class AstrodataGUI(QtWidgets.QMainWindow):
|
||||
for sT in sourceSeqTouple:
|
||||
self.listSequences.addItem(f"{sT[0]} - {sT[1]}")
|
||||
|
||||
def updateStarInfo(self, starInfo):
|
||||
self.lbSpType.setText(starInfo[0])
|
||||
self.lbRotVel.setText(f"{starInfo[1]} {starInfo[2]}")
|
||||
self.lbDistance.setText(f"{starInfo[3]} {starInfo[4]}")
|
||||
|
||||
def starSelected(self, item):
|
||||
seqs = self.starDB.getStarData(item.text())
|
||||
seqs = self.starDB.getStarSequences(item.text())
|
||||
infos = self.starDB.getStarInfos(item.text())
|
||||
self.lbMainID.setText(item.text())
|
||||
self.updateSequenceList(seqs)
|
||||
self.updateStarInfo(infos)
|
||||
|
||||
def sequenceSelected(self, item):
|
||||
seqText = item.text().split(" - ")
|
||||
|
||||
Reference in New Issue
Block a user