Open
Conversation
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 14 out of 16 changed files in this pull request and generated 3 comments.
Comments suppressed due to low confidence (2)
gui/control_main.py:3126
- The logic for determining raster cell direction is broken after removing NYX-specific code. The condition
if i % 2 == 0on line 3116 is followed by an else block that still checks for NYX beamline (line 3119), but NYX support has been removed. This will always setis_raster_inverted = 0since the NYX branch is unreachable. The subsequent nested if-else (lines 3123-3126) becomes redundant becausei % 2 == is_raster_invertedis equivalent toi % 2 == 0, making the else branch unreachable. This should be simplified to remove the NYX check and the redundant nested conditions.
if i % 2 == 0: # this is trying to figure out row direction
cellIndex = spotLineCounter
else:
if daq_utils.beamline == "nyx":
is_raster_inverted = 1
else:
is_raster_inverted = 0
if i % 2 == is_raster_inverted: # this is trying to figure out row direction
cellIndex = spotLineCounter
else:
cellIndex = rowStartIndex + ((numsteps - 1) - j)
gon_lib.py:18
- Undefined variable references. The functions
backlightBrighter()andbacklightDimmer()referenceback_lightandback_light_rangevariables (lines 11-13, 16-18), but these were removed from the imports at the top of the file. These variables were previously imported fromstart_bswhen beamline was 'nyx', but that import has been removed. These variables need to be imported or defined for AMX and FMX beamlines.
def backlightBrighter():
intensity = back_light.get()
intensity += BACK_LIGHT_STEP * (back_light_range[1]-back_light_range[0])
back_light.put(intensity)
def backlightDimmer():
intensity = back_light.get()
intensity -= BACK_LIGHT_STEP * (back_light_range[1]-back_light_range[0])
back_light.put(intensity)
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
101c2de to
13030ce
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request removes support for the "nyx" beamline throughout the codebase. All configuration, logic, and conditional code paths specific to "nyx" have been removed, leading to a significant simplification and streamlining of the code. The changes affect configuration files, device initialization, data collection logic, GUI components, and utility functions.
The most important changes are:
Configuration and Constants Cleanup:
DETECTOR_SAFE_DISTANCE,DEWAR_SECTORS,cryostreamTempPV,VALID_EXP_TIMES,VALID_DET_DIST,VALID_TOTAL_EXP_TIMES,VALID_TRANSMISSION,MINIMUM_RASTER_SIZE, andLSDC_SERVICE_USERSinconfig_params.py.OPHYD_COLLECTIONSdictionary and related logic for "nyx". [1] [2]Device and Motor Initialization:
beamline_support.pyandgon_lib.py. Now, all motors use the genericEpicsMotoror generic device classes. [1] [2]Data Collection and Protocol Logic:
GUI Simplification:
Utility and Miscellaneous Code:
These changes collectively remove all support and code paths for the "nyx" beamline, resulting in a more maintainable and focused codebase.