AOtools / soapy

A Python Adaptive Optics Simulation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cannot import name phasescreen

rio07749 opened this issue · comments

Dear Sir,

Why I got this error?
First I clone it then installed required package and finally python setup.py install.

I am in ubuntu 16.04 64-bit

python test/testSimulation.py
Traceback (most recent call last):
File "test/testSimulation.py", line 3, in
import soapy
File "/usr/local/lib/python2.7/dist-packages/soapy/init.py", line 22, in
from .simulation import Sim
File "/usr/local/lib/python2.7/dist-packages/soapy/simulation.py", line 63, in
from . import atmosphere, logger, wfs, DM, RECON, SCI, confParse, aotools
File "/usr/local/lib/python2.7/dist-packages/soapy/atmosphere.py", line 60, in
from .aotools import phasescreen
ImportError: cannot import name phasescreen

Hi @rio07749, sorry for taking a while to reply. We have looked at this and it seems to be a problem with our build scripts, which we have now fixed. The latest commit on master should now work for you, let us know if there are still any problems.

Thank you @matthewtownson :)
The installation now works fine for me.
Currently I got this error when running soapy in gui mode. (soapy -g /opt/soapy/conf/sh_8x8_corr.py)

IOError: [Errno 2] No such file or directory: 'correlationRef/refImNat.fits'

Another question. Should I edit the "AoGui.ui" for changing the gui content and then reinstall it? (like some menu or button)

Hi @rio07749. Sorry again for the late reply! I've been away from work for a couple of weeks, but am back now.

This error is just because the path to the correlation reference used by the WFS is incorrect. It should just be case of changing the referenceImage parameter in the WFS section of the config file, which should be the path to the example reference image in conf/correlationRef/refImNat.fits. I think the example assumes that Soapy is run from within the conf directory, so just adjust the path to account for where you are running it.

Hope that makes sense, if not just ask!