spomjaksilp/pywfs

Improper reference to `sdk` in `WfsCamera.acquire_wavefront`

julesfowler opened this issue · 0 comments

Hello!

We're wanting to use your python library to work with some ThorLabs Wavefront Sensors. I think I may have found a bug? (My sincerest apologies if I just misunderstood the bit of code.)

In trying to recreate the snippet in wfs.py where you spin up the libraries and connect, I believe by time you get to the acquire_wavefront function there's a bug. The last line of this function (line 91 of wfs.py) calls sdk.calc_wavefront. While that works in the if __name__ == "__main__" snippet, I believe that's a coincidence because sdk has just been defined in the snippet above. I think it should be calling self._sdk.calc_wavefront, as the other references to the sdk are within that function.

If I'm correct, I'd be happy to open a PR with this change.

Thanks for writing a super slick library -- this has made our lives a lot easier.