Removed unused functions from daq_macros#412
Open
vshekar wants to merge 1 commit intoNSLS2:masterfrom
Open
Conversation
Removed functions from daq_macros.py which are no longer used or can be rewritten
There was a problem hiding this comment.
Pull request overview
This PR aims to clean up the daq_macros.py file by removing unused or rewritable functions and eliminating an unused import of super_state_machine.
Changes:
- Removed import of
super_state_machinemodule - Removed 13 functions including test utilities, deprecated "Old" versions, and unused raster scanning variants
Comments suppressed due to low confidence (3)
daq_macros.py:1020
- The function
snakeRasterFineis called here but has been removed in this PR. This will cause aNameErrorat runtime when the scanner type is 'PI'. Either the function needs to be retained or this call needs to be removed/replaced with an alternative implementation.
snakeRasterFine(rasterReqID,grain)
daq_macros.py:73
- The global variables
autoVectorFlagandautoVectorCoarseCoordsare defined but theautoVectorfunction that was their primary consumer has been removed. These variables are still referenced ingenerateGridMap(lines 1585, 1699). Consider removing these variables if the autoVector functionality is truly deprecated, or keep the autoVector function if the functionality is still needed.
global autoVectorFlag, autoVectorCoarseCoords
autoVectorCoarseCoords = {}
autoVectorFlag=False
daq_macros.py:1475
- The 'autoVector' raster type is still handled in
runRasterScan, but theautoVectorfunction has been removed. This suggests incomplete cleanup - either the autoVector protocol handling should also be removed, or the function should be retained.
elif (rasterType=="autoVector"):
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Removed functions from daq_macros.py which are no longer used or can be rewritten