Skip to content

Commit

Permalink
Added configurable raster size and logging change
Browse files Browse the repository at this point in the history
  • Loading branch information
vshekar committed Apr 17, 2024
1 parent 7a9eff3 commit eaff8ad
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
5 changes: 4 additions & 1 deletion config_params.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import grp
import os
from enum import Enum
import os, grp

# BlConfig parameter variable names

Expand Down Expand Up @@ -108,6 +109,8 @@ class RasterStatus(Enum):
"nyx": {"min": 0.001, "max": 0.999, "digits": 3},
}

MINIMUM_RASTER_SIZE = {"amx": 6, "fmx": 6, "nyx": 2}

LSDC_SERVICE_USERS = ("lsdc-amx", "lsdc-fmx", "lsdc-nyx")
IS_STAFF = (
True
Expand Down
5 changes: 3 additions & 2 deletions gui/control_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
VALID_TRANSMISSION,
RasterStatus,
cryostreamTempPV,
MINIMUM_RASTER_SIZE
)
from daq_utils import getBlConfig, setBlConfig
from element_info import element_info
Expand Down Expand Up @@ -2884,8 +2885,8 @@ def drawInteractiveRasterCB(self): # any polygon for now, interactive or from x
numsteps_h = raster_h/stepsizeYPix
stepsize = float(self.rasterStepEdit.text())

while (numsteps_w < 6 and numsteps_h < 6):
print(numsteps_h, numsteps_w, stepsize, stepsizeXPix, stepsizeYPix)
while (numsteps_w < MINIMUM_RASTER_SIZE[daq_utils.beamline] and numsteps_h < MINIMUM_RASTER_SIZE[daq_utils.beamline]):
logger.info(f"{numsteps_h=}, {numsteps_w=}, {stepsize=}, {stepsizeXPix=}, {stepsizeYPix=}")
if stepsize == 1:
logger.error("Cannot add raster request, stepsize must be 1 micron with a minimum width or height of 5 cells")
return
Expand Down

0 comments on commit eaff8ad

Please sign in to comment.