-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add DM base class. #156
Add DM base class. #156
Conversation
ehpor
commented
Feb 5, 2024
•
edited
Loading
edited
- Add ServiceProxy.
- Add logic for device actuator map.
- Worry about quantization. Where should that be handled?
- Add startup map logic (partially already there, but not in the service proxy code).
Hey @ehpor, I am picking this up as we're at a point on the THD2 implementation that we need the DMs next. I wanted to clarify a couple of points before I put my hand on this (planning a delta PR in case you want to touch this branch here). In particular, I wanted to ask about the controlled actuators mask. I remember us talking in person about: What did we settle on in terms of nomenclature? In #123 (comment), it seems like number (2) in that issue refers to (a) here, but in your PR you use the term "controlled actuators" for this it seems. I know that the concept for (b) is not implemented yet, and you have it on the todo list of this PR, I just wanted to find you in the same place about this before I move on, otherwise it will get very confusing ^^ When referring to (a), do we call those "active" or "controlled" actuators from now on? I like the "controlled" like in your code - if you confirm this, I will make sure to update that catkit2 issue to minimize confusion. Edit: @ehpor and I decided together that (a) will be called "device actuators" and (b) can be addressed synonymously as "active" or "controlled" actuators. |
I went ahead and updated the comment in #123 (comment) and the one that follows to use "controlled actuators" like in this PR. See prior comment. |
4d7d473
to
f86b864
Compare
@ehpor general question: is this supposed to be a base class for BMC DMs or for DMs in general? I was wondering how to implement the |
For DMs in general. It's the channels and controlled actuator map that it should abstract away. |
b1d61df
to
f86b864
Compare
@ehpor another question: do I interpret all your comments correctly, especially in #123, to say that the new service will be usable per each individual DM (e.g. for THD2) as well as per DM pair (like on HiCAT) since all properties are data-driven, but the new proxy will be per pair of DM, like it has been done so far as the proxy can be made data-driven as well? |
I don't actually think this would work. I tried to implement the conversion from the DM command to BMC (hardware) command (see #123 (comment)) in the last commit (5b5b83a - "Convert DM command to BMC command in send_surface()"), but this makes a hard assumption about all controlled actuators being in the beginning of the hardware command, without any gaps in the array entries. I currently have no idea how to make this work for a pair of DMs - if this was ever the intention. |
I made this work in my delta-PR in #182 for one of the DMs on THD2 (only in simulated mode). However, many questions remain.
|
ec25f5b
to
35c4b0d
Compare
@ehpor what I did in the meantime is:
The last point is hard because I have to make assumptions on the type and format of the controlled actuator mask. I remember you talking about stacking those masks into a 3D array, but that doesn't seem possible if the concerned DMs do not have the same shapes. Shall I just stack them into a list instead? This would mean some changes to the proxy, and associated parameters like for example num_actuators and dm_shape. |
@ehpor I just realized you said to concatenate the actuator masks - I suppose into a ravelled 1D array, like we already do with the flatmap and gain map. Is that what you meant? |
Notes from chat at SPIE with @ehpor:
|
b7b5ccc
to
8cbbf3c
Compare
39d1f02
to
503edda
Compare
I think I am slowly getting there. The main question I am trying to figure out right now is: What command/map format do we want the proxy method
The other thing I will have to check for is whether all of this is compatible with DMs without maps that contain the DM geometry, like a DAC or an IrisAO (see point 6 in this comment further above). And for now, some notes on the status quo:
Open Todos:
|
1cea757
to
2f5764d
Compare
@ehpor do you think you could do an initial review of this, to see whether I am on the right path? |
3a6f2e6
to
e971c46
Compare
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.
@ehpor tested this today in simulation and we tested it with @ehpor , @raphaelpclt and @RemiSoummer on HiCAT on hardware as well. Ready to go.