Skip to content

Commit

Permalink
Merge pull request #329 from vshekar/puck-visibility
Browse files Browse the repository at this point in the history
Puck visibility
  • Loading branch information
JunAishima authored Oct 2, 2023
2 parents 239fc4c + 0c06632 commit 7be5165
Show file tree
Hide file tree
Showing 4 changed files with 206 additions and 178 deletions.
6 changes: 6 additions & 0 deletions config_params.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from enum import Enum
import os, grp

# BlConfig parameter variable names

Expand Down Expand Up @@ -109,3 +110,8 @@ class RasterStatus(Enum):
}

LSDC_SERVICE_USERS = ("lsdc-amx", "lsdc-fmx", "lsdc-nyx")
IS_STAFF = (
True
if os.environ["STAFF_GROUP"] in [grp.getgrgid(g).gr_name for g in os.getgroups()]
else False
)
8 changes: 5 additions & 3 deletions gui/control_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ def __init__(self):
self.raddoseTimer.timeout.connect(self.spawnRaddoseThread)

self.createSampleTab()

self.userScreenDialog = UserScreenDialog(self)
self.initCallbacks()
if self.scannerType != "PI":
self.motPos = {
Expand All @@ -224,14 +224,13 @@ def __init__(self):
if daq_utils.beamline == "nyx": # requires staffScreenDialog to be present
self.staffScreenDialog.fastDPCheckBox.setDisabled(True)

self.dewarTree.refreshTreeDewarView()
if self.mountedPin_pv.get() == "":
mountedPin = db_lib.beamlineInfo(daq_utils.beamline, "mountedSample")[
"sampleID"
]
self.mountedPin_pv.put(mountedPin)
self.rasterExploreDialog = RasterExploreDialog()
self.userScreenDialog = UserScreenDialog(self)

self.detDistMotorEntry.getEntry().setText(
self.detDistRBVLabel.getEntry().text()
) # this is to fix the current val being overwritten by reso
Expand All @@ -241,6 +240,7 @@ def __init__(self):
self.changeControlMasterCB(1)
self.controlMasterCheckBox.setChecked(True)
self.XRFInfoDict = self.parseXRFTable() # I don't like this
#self.dewarTree.refreshTreeDewarView()

def setGuiValues(self, values):
for item, value in values.items():
Expand Down Expand Up @@ -4625,6 +4625,8 @@ def row_clicked(
self, index
): # I need "index" here? seems like I get it from selmod, but sometimes is passed
selmod = self.dewarTree.selectionModel()
if not selmod:
return
selection = selmod.selection()
indexes = selection.indexes()
if len(indexes) == 0:
Expand Down
Loading

0 comments on commit 7be5165

Please sign in to comment.