-
Notifications
You must be signed in to change notification settings - Fork 0
Add Merlin simulator #108
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
Draft
jsouter
wants to merge
21
commits into
main
Choose a base branch
from
merlin
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.
Draft
Add Merlin simulator #108
Conversation
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
…ver data port when acquire command received
Fix units for time parameters for Merlin
I think this looks pretty good. My only comments are that it still references the ZMQ adapter / io and the all caps attributes on MerlinDetector are a bit odd. |
Good spot. The attributes could be reworked if needed. |
Remove references to ZmqPushIo in TcpPushAdapter Lint/remove unused imports
run black on merlin module
7c34ee0
to
7552032
Compare
…thing Fix default value of operating energy Move merlin parameters to parameters.py access merlin commands through dictionary
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.
WIP: absolutely no tests in this right now
May be a bit overkill but I've had some trouble when getting the Merlin in the lab to load its configuration files properly, so thought would be helpful to have a sim.
Some commands aren't implemented and there's definitely lots of weird quirks not replicated, some parameters will be automatically set when other parameters are set etc, that's not in here.
But it should accept and parse all the GET/SET/CMD commands supported in the manual/in the Odin driver, and spit out a correctly formatted image with headers, definitely for single threshold mode (have tested an acquisition through the Odin driver and been able to get images into an H5 file) and I believe it should work for the colour modes too.
I made a TCPPushIo class resembling the ZeroMqPushIo from tickit but using asyncio.start_server instead of creating a socket from a factory method. The Merlin only sends out image data on its TCP data port (6342) and doesn't accept any input on this port, so this seemed better than trying to use the existing TCP IO classes in tickit. Happy to keep namespaced under Merlin as some of this design may be Merlin specific but could see it being made more generic.