-
Notifications
You must be signed in to change notification settings - Fork 14
121 dodal integration #171
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
Merged
Merged
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
8d933a6
Add dodal git dependency
abbiemery a5c1f82
Add initial dodal device loading to context
abbiemery 1ab4c12
Allow only dodal style device modules
abbiemery d450234
Allow list of device and plan sources
abbiemery 2183e3c
Enable context to search multiple modules for devices and plans
abbiemery ffd3e3b
Update to use dodal function format
abbiemery 8b5e205
Add checking when adding devices to context
abbiemery 50d0c75
Update p45 config to use dodal
abbiemery 913990b
Update adsim.yaml to use multiple sources
abbiemery 49a0e55
Update worker config for multiple sources
abbiemery db00d28
Add module loading tests for context
abbiemery ae2d1db
Correct ignore pre-commit comment
abbiemery 1ada7d9
Make module name qualification explicit
abbiemery ea128e3
Swap typedict for basemodel in config
abbiemery 6371306
Test device functions with dependencies
abbiemery 034851d
Make source type an enum
abbiemery 8ea3759
Allocate device and plan adding based on source kind
abbiemery 8c984d4
Change source type to kind
abbiemery 9103513
Remove unused imports
abbiemery ad6aecd
Make test context use default environment config
abbiemery adac983
Update source format
abbiemery 5f069f8
Update enum case to abide by pep8
abbiemery 7b03b80
Update dodal dependency format
abbiemery c4ef315
Exclude dodal from lockfile
abbiemery 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,6 @@ | ||
| env: | ||
| startupScript: blueapi.startup.adsim | ||
| sources: | ||
| - kind: deviceFunctions | ||
| module: blueapi.startup.adsim | ||
| - kind: planFunctions | ||
| module: blueapi.startup.adsim |
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,2 +1,6 @@ | ||
| env: | ||
| startupScript: blueapi.startup.bl45p | ||
| sources: | ||
| - kind: dodal | ||
| module: dodal.p45 | ||
| - kind: planFunctions | ||
| module: blueapi.plans |
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
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 was deleted.
Oops, something went wrong.
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,38 +1,74 @@ | ||
| from ophyd.sim import Syn2DGauss, SynGauss, SynSignal | ||
|
|
||
| from blueapi.plans import * # noqa: F401, F403 | ||
|
|
||
| from .simmotor import BrokenSynAxis, SynAxisWithMotionEvents | ||
|
|
||
| x = SynAxisWithMotionEvents(name="x", delay=1.0, events_per_move=8) | ||
| y = SynAxisWithMotionEvents(name="y", delay=3.0, events_per_move=24) | ||
| z = SynAxisWithMotionEvents(name="z", delay=2.0, events_per_move=16) | ||
| theta = SynAxisWithMotionEvents( | ||
| name="theta", delay=0.2, events_per_move=12, egu="degrees" | ||
| ) | ||
| x_err = BrokenSynAxis(name="x_err", timeout=1.0) | ||
| sample_pressure = SynAxisWithMotionEvents( | ||
| name="sample_pressure", delay=30.0, events_per_move=128, egu="MPa", value=0.101 | ||
| ) | ||
| sample_temperature = SynSignal( | ||
| func=lambda: ((x.position + y.position + z.position) / 1000.0) + 20.0, | ||
|
|
||
| def x(name="x") -> SynAxisWithMotionEvents: | ||
|
abbiemery marked this conversation as resolved.
|
||
| return SynAxisWithMotionEvents(name=name, delay=1.0, events_per_move=8) | ||
|
|
||
|
|
||
| def y(name="y") -> SynAxisWithMotionEvents: | ||
| return SynAxisWithMotionEvents(name=name, delay=3.0, events_per_move=24) | ||
|
|
||
|
|
||
| def z(name="z") -> SynAxisWithMotionEvents: | ||
| return SynAxisWithMotionEvents(name=name, delay=2.0, events_per_move=16) | ||
|
|
||
|
|
||
| def theta(name="theta") -> SynAxisWithMotionEvents: | ||
| return SynAxisWithMotionEvents( | ||
| name=name, delay=0.2, events_per_move=12, egu="degrees" | ||
| ) | ||
|
|
||
|
|
||
| def x_err(name="x_err") -> BrokenSynAxis: | ||
| return BrokenSynAxis(name=name, timeout=1.0) | ||
|
|
||
|
|
||
| def sample_pressure(name="sample_pressure") -> SynAxisWithMotionEvents: | ||
| return SynAxisWithMotionEvents( | ||
| name=name, delay=30.0, events_per_move=128, egu="MPa", value=0.101 | ||
| ) | ||
|
|
||
|
|
||
| def sample_temperature( | ||
| x: SynAxisWithMotionEvents, | ||
| y: SynAxisWithMotionEvents, | ||
| z: SynAxisWithMotionEvents, | ||
| name="sample_temperature", | ||
| ) | ||
| image_det = Syn2DGauss( | ||
| ) -> SynSignal: | ||
| return SynSignal( | ||
| func=lambda: ((x.position + y.position + z.position) / 1000.0) + 20.0, | ||
| name=name, | ||
| ) | ||
|
|
||
|
|
||
| def image_det( | ||
| x: SynAxisWithMotionEvents, | ||
| y: SynAxisWithMotionEvents, | ||
| name="image_det", | ||
| motor0=x, | ||
| motor_field0="x", | ||
| motor1=y, | ||
| motor_field1="y", | ||
| center=(0, 0), | ||
| Imax=1, | ||
| labels={"detectors"}, | ||
| ) | ||
| current_det = SynGauss( | ||
| ) -> Syn2DGauss: | ||
| return Syn2DGauss( | ||
| name=name, | ||
| motor0=x, | ||
| motor_field0="x", | ||
| motor1=y, | ||
| motor_field1="y", | ||
| center=(0, 0), | ||
| Imax=1, | ||
| labels={"detectors"}, | ||
| ) | ||
|
|
||
|
|
||
| def current_det( | ||
| x: SynAxisWithMotionEvents, | ||
| name="current_det", | ||
| motor=x, | ||
| motor_field="x", | ||
| center=0.0, | ||
| Imax=1, | ||
| labels={"detectors"}, | ||
| ) | ||
| ) -> SynGauss: | ||
| return SynGauss( | ||
| name=name, | ||
| motor=x, | ||
| motor_field="x", | ||
| center=0.0, | ||
| Imax=1, | ||
| labels={"detectors"}, | ||
| ) | ||
Empty file.
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.
Uh oh!
There was an error while loading. Please reload this page.