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

Cannot generate DM shape image #123

Open
shiqi1994 opened this issue Dec 6, 2021 · 0 comments
Open

Cannot generate DM shape image #123

shiqi1994 opened this issue Dec 6, 2021 · 0 comments

Comments

@shiqi1994
Copy link

Firstly, I would like to thank you for your great work!!

I have some trouble in generating multiple frames of DM shape images, here is my code:

import soapy

sim = soapy.Sim("conf/vicky.yaml")
sim.aoinit()
sim.makeIMat()
sim.aoloop()

soapy_config = sim.config

circle_mask = soapy.simulation.make_mask(soapy_config)
dm_cmds = sim.allDmCommands 
dmClass = soapy.DM.DM(soapy_config, n_dm=0, mask=circle_mask)
dmFrame = dmClass.dmFrame(dm_cmds)

And the warning massage is:

Traceback (most recent call last):

  File "/home/vicky/soapy/untitled3.py", line 24, in <module>
    dmFrame = dmClass.dmFrame(dm_cmds)

  File "/home/vicky/soapy/soapy/DM.py", line 164, in dmFrame
    self.dm_shape = self.makeDMFrame(dmCommands)

  File "/home/vicky/soapy/soapy/DM.py", line 200, in makeDMFrame
    dm_shape = (self.iMatShapes.T*actCoeffs.T).T.sum(0)

ValueError: operands could not be broadcast together with shapes (9,) (81,6) 

And the configuration about DM is:

DM:
  0:
    type: FastPiezo
    closed: False
    nxActuators: 9
    iMatValue: 500

May I ask how can I generate DM shape images?

And what the exact meaning of the nxActuators ?

Look forward to your kind replay! Thank you very much!

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

No branches or pull requests

1 participant