AOtools / soapy

A Python Adaptive Optics Simulation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

sh_8x8.py has a wrong function name

Teusia opened this issue · comments

Hello,
I am just getting started with soapy and to verify my installation I tried to run the example you give here. For the configuration file I tried using the sh_8x8.py.

However there is at least one function name that changed: on running sim.aoinit() python produced the following error message:

  File "C:\Users\anne.cheffot\anaconda3\envs\poppydev\lib\site-packages\soapy-unknown-py3.8.egg\soapy\wfs\shackhartmann.py", line 429, in calculateSlopes
    slopes = getattr(centroiders, self.config.centMethod)(

AttributeError: module 'aotools.image_processing.centroiders' has no attribute 'brightestPxl'

In centroiders.py I found a brightest_pixel but not a brightestPxl. After changing line 63 of sh_8x8.py from

"centMethod"    :   ["brightestPxl"],

to

"centMethod"    :   ["brightest_pixel"],

aoinit went through.
Maybe you want to have a look at the soapy example files and make sure all function name have been updated to the latest version?
Cheers,
Anne-Laure Cheffot

Yes, this appears to have not been updated when the function was renamed in aotoools. Thanks for pointing it out, we will sort it for the next release.

:) thanks, Should I leave the issue open as a reminder?

Yes, we should leave it open until it is fixed. Otherwise I am likely to forget.