AOtools / soapy

A Python Adaptive Optics Simulation
GNU General Public License v3.0
85 stars 32 forks source link

sh_8x8.py has a wrong function name #118

Open Teusia opened 3 years ago

Teusia commented 3 years ago

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

matthewtownson commented 3 years ago

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.

Teusia commented 3 years ago

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

matthewtownson commented 3 years ago

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