-
Notifications
You must be signed in to change notification settings - Fork 12
Add Mbs driver and region classes #2056
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
oliwenmandiamond
wants to merge
27
commits into
main
Choose a base branch
from
add_mbs_analyser
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 23 commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
0c29c8f
Add Mbs driver and region
oliwenmandiamond 4a6ac47
Fix Mbs AcquisitionMode enums
oliwenmandiamond c35e8dd
Make PSU mode read only by default, writable only for specs
oliwenmandiamond 2784921
Remove psu from driver, make it optionally a str type, add static cla…
oliwenmandiamond 2c4a538
Update doc string for abstract driver
oliwenmandiamond b89996d
Remove Mbs PSU enum
oliwenmandiamond 6cb19d8
Rename mbs_driver to mbs_driver_io and add __init__.py imports.
oliwenmandiamond ee98ea1
Add Mbs to i05-1
oliwenmandiamond 6a29c43
Fix tests
oliwenmandiamond 0403a03
Add load from xml for mbs
oliwenmandiamond 79280eb
Add test for mbs region from_xml
oliwenmandiamond fd10816
Update data_util to be more generic to allow use with xml
oliwenmandiamond 60651d1
Convert mbs energy to eV
oliwenmandiamond 13a5c82
Add dynamic region testing
oliwenmandiamond 761f5cb
Update tests to use regions from sequence directly
oliwenmandiamond 78e01ab
Merge branch 'main' into add_mbs_analyser
oliwenmandiamond 48e7345
Convert remaining tests to use new pair method
oliwenmandiamond e403e09
Add additional test for mbs sequence
oliwenmandiamond 1fd6f51
Add tests for mbs driver
oliwenmandiamond 7270eda
Merge branch 'main' into add_mbs_analyser
oliwenmandiamond 199d5d9
Added remaining mbs pvs
oliwenmandiamond 80e89a3
Remove spectrum and image pvs until we figure out how to use with sta…
oliwenmandiamond c616463
Update data util to use callable rather than protocol
oliwenmandiamond a869e94
Add frozen to dataclass
oliwenmandiamond 620e378
Merge branch 'main' into add_mbs_analyser
oliwenmandiamond 4c76c23
Move slices from BaseRegion to classes that use as Mbs doesn't use it.
oliwenmandiamond b434f3c
Merge branch 'add_mbs_analyser' of ssh://github.com/DiamondLightSourc…
oliwenmandiamond File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,3 @@ | ||
| from .i05_motors import I05Goniometer | ||
|
|
||
| __all__ = [ | ||
| "I05Goniometer", | ||
| ] | ||
| __all__ = ["I05Goniometer"] |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,23 +1,20 @@ | ||
| from dodal.devices.beamlines.i05_shared.apple_knot_constants import ( | ||
| from .apple_knot_constants import ( | ||
| APPLE_KNOT_EXCLUSION_ZONES, | ||
| energy_to_gap_converter, | ||
| energy_to_phase_converter, | ||
| ) | ||
| from dodal.devices.beamlines.i05_shared.compound_motors import PolynomCompoundMotors | ||
| from dodal.devices.beamlines.i05_shared.enums import ( | ||
| Grating, | ||
| M3MJ6Mirror, | ||
| M4M5Mirror, | ||
| Mj7j8Mirror, | ||
| ) | ||
| from .compound_motors import PolynomCompoundMotors | ||
| from .enums import Grating, LensMode, M3MJ6Mirror, M4M5Mirror, Mj7j8Mirror, PassEnergy | ||
|
|
||
| __all__ = [ | ||
| "Grating", | ||
| "LensMode", | ||
| "Mj7j8Mirror", | ||
| "M3MJ6Mirror", | ||
| "M4M5Mirror", | ||
| "PolynomCompoundMotors", | ||
| "energy_to_gap_converter", | ||
| "energy_to_phase_converter", | ||
| "APPLE_KNOT_EXCLUSION_ZONES", | ||
| "PassEnergy", | ||
| ] |
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| from .mbs_driver_io import MbsAnalyserDriverIO | ||
| from .mbs_enums import AcquisitionMode | ||
| from .mbs_region import MbsRegion, MbsSequence | ||
|
|
||
| __all__ = ["MbsAnalyserDriverIO", "AcquisitionMode", "MbsRegion", "MbsSequence"] |
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since it's going to be a "true" class variable with potentially no overwriting in each child class - although it's unlikely that we will have both, e.g. specs_driver and mbs_driver in one python environment - but for the sake of clarity this is still a mutable object. That means once changed on specs_driver will also change on mbs_driver. I think you can mark this class as
that will prevent any mutations on it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes good idea! I've add this. I'm hoping to remove it in future, it's just a temporarily measure so we can still have working devices without needing to adjust the
__init__method