soapy icon indicating copy to clipboard operation
soapy copied to clipboard

sh_8x8.py has a wrong function name

Open Teusia opened this issue 4 years ago • 3 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

Teusia avatar Mar 18 '21 17:03 Teusia

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.

matthewtownson avatar Mar 19 '21 10:03 matthewtownson

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

Teusia avatar Mar 19 '21 11:03 Teusia

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

matthewtownson avatar Mar 19 '21 11:03 matthewtownson