-
Notifications
You must be signed in to change notification settings - Fork 72
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
DeformableMirror performance issues #277
Comments
@sdwill can you comment on this one? I believe the issue here is specifically with the DM class option for evaluating the surface as a sum of many gaussians, not via convolution. And the convolution path is much faster. Can you provide any more specific instance of a case in which you were encountering performance issues? |
Just ran some tests of If no influence function is specified via the It seems to me that |
I was wondering if there are any updates on this enhancement? Currently experiencing a lot of this issue in trying to implement Electric Field Conjugation with POPPY. In order to build the complex response matrix for EFC, I have to poke each actuator in my 34x34 DM and record the final complex wavefront. The first time I do this calculation, when the rest of the DM is flat, this takes ~90 seconds (using a full 28 core node on our high performance computing cluster). When I later recalculate the matrix, after there is already a shape on the DM, it takes 40-50 minutes. @douglase and I profiled my response matrix builder function and the culprit is definitely Currently trying to work around this by assigning the final derived mirror shape to the OPD of an optic that is not a DM. |
Ah. The trick is not to use the Gaussian influence function at all. There is another path that uses a convolution kernel with a measured influence function and that is many orders of magnitude faster. Apologies, I don’t think I realized you were using the basic Gaussian version actively and it was slowing you down. I should provide you with example code for how we’re modeling the kiloDMs in HiCAT. I’ll try to email you code tomorrow, and please remind me if I don’t. |
It's no problem, I didn't even realize it was an issue until last week until I started trying to recalculate the response matrix with a shape on the mirror. Good to know there's an alternative...here's a reminder :P |
We should update the docs for ContinuousDeformableMirror to add some brief remarks on performance, and recommendation to use the convolution pathway rather than the Gaussian. |
Reported by @sdwill: The
get_opd
function can be very slow for the DeformableMirror class, in some circumstances with large numbers of actuators or high sampling.In particular, a low-hanging fruit for efficiency is that the evaluation of the OPD should be done for just inside the DM aperture, not including all the zero padding in the wavefront.
@sdwill has volunteered to work on this.
The text was updated successfully, but these errors were encountered: