Skip to content
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

Update adsim to ophyd_async #404

Open
DiamondJoseph opened this issue Mar 28, 2024 · 4 comments · May be fixed by #405
Open

Update adsim to ophyd_async #404

DiamondJoseph opened this issue Mar 28, 2024 · 4 comments · May be fixed by #405
Assignees

Comments

@DiamondJoseph
Copy link
Contributor

The AreaDetector simulator backed by the Epics AreaDetectorSimulator is split into three parts: dodal/src/dodal/devices/adsim.py contains a 5-axis MotorBundle; dodal/src/dodal/devices/areadetector/adsim.py contains a simulated detector; dodal/src/dodal/adsim.py is equivalent to a beamline. Having these maintained and using ophyd_async may enable fast testing of plan behaviour and would give an easily run up simulated beamline for local development.

Acceptance Criteria

  • Blueapi can be run up with the areadetector simulator devices exposed and connected with ophyd_async signals and an example grid_scan may be run with data being emitted
@DiamondJoseph DiamondJoseph self-assigned this Mar 28, 2024
@DiamondJoseph DiamondJoseph linked a pull request Apr 2, 2024 that will close this issue
2 tasks
@DominicOram
Copy link
Contributor

The simulator is a generic EPICS thing, right? Would this make more sense inside ophyd-async @coretl?

@DiamondJoseph
Copy link
Contributor Author

https://github.com/bluesky/ophyd-async/tree/main/src/ophyd_async/epics/adsimdetector

There is an adsimdetector in ophyd-async

@DiamondJoseph
Copy link
Contributor Author

I've asked Zoheb to move this over and upgrade the adsim.py file that was kinda abandoned into a more standard "beamline" file: I'm not certain if it should be a "beamline" but I want to treat it equivalently so blueapi can run up locally with the simulator easily.

  • switch AdSimDetector used in that file to the one in ophyd_async
  • use the standard device_instantiation function in the device factory functions
  • otherwise making the adsim "beamline" look like the others, re: logging etc.
  • adding a DirectoryProvider for local testing, e.g.
set_directory_provider(
    StaticVisitDirectoryProvider(
        BL,
        Path("/tmp/blueapi/"),
        client=LocalDirectoryServiceClient(),
    )
)
  • delete the adsim in dodal and other unused classes it referenced

@DominicOram
Copy link
Contributor

As part of this make sure #737 (comment) has coverage

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants