svalenti / pessto

pessto pipeline
MIT License
9 stars 6 forks source link

Error running PESSTOEFOSC2dSPEC on Mac #56

Closed carys-evans closed 2 years ago

carys-evans commented 2 years ago

I experienced the following error while attempting to run PESSTOEFOSC2dSPEC on a Mac with an M1 chip and Monterey OS.

making the list with raw data in the current directory ...... please wait Could not import aqutil

Limited graphics available on OSX (aqutil not loaded)

EFOSC.2016-08-02T13:16:25.798.fits 18.65973 EFOSC.2016-08-02T13:11:47.403.fits 10.59005 EFOSC.2016-08-02T13:14:21.812.fits 10.42003 EFOSC.2016-08-02T13:12:18.825.fits 11.19422 EFOSC.2016-08-02T13:15:54.767.fits 11.03498 EFOSC.2016-08-02T13:15:23.815.fits 9.602079 EFOSC.2016-08-02T13:13:50.810.fits 9.70993 EFOSC.2016-08-02T13:14:52.764.fits 9.864037 EFOSC.2016-08-02T13:13:20.058.fits 9.87159 EFOSC.2016-08-02T13:12:49.777.fits 9.783531 application-specific initialization failed: no display name and no $DISPLAY environment variable Unable to initialize window system. Killing IRAF task `display'

ERROR: PROBLEM OPENING DS9

           IMAGE      NPIX      MEAN    STDDEV       MIN       MAX

EFOSC.2016-08-02T13:16:25.798.fits 1060900 194.5 18.66 0. 13927. Traceback (most recent call last): File "/Users/carysevans/opt/anaconda3/envs/pessto/bin/PESSTOEFOSC2dSPEC", line 4, in import('pkg_resources').run_script('ntt==3.0.0', 'PESSTOEFOSC2dSPEC') File "/Users/carysevans/opt/anaconda3/envs/pessto/lib/python3.7/site-packages/pkg_resources/init.py", line 651, in run_script self.require(requires)[0].run_script(script_name, ns) File "/Users/carysevans/opt/anaconda3/envs/pessto/lib/python3.7/site-packages/pkg_resources/init.py", line 1448, in run_script exec(code, namespace, namespace) File "/Users/carysevans/opt/anaconda3/envs/pessto/lib/python3.7/site-packages/ntt-3.0.0-py3.7.egg/EGG-INFO/scripts/PESSTOEFOSC2dSPEC", line 112, in listbias, listarc, _cosmic, _verbose) File "/Users/carysevans/opt/anaconda3/envs/pessto/lib/python3.7/site-packages/ntt-3.0.0-py3.7.egg/ntt/efoscspec2Ddef.py", line 374, in efoscspecreduction biaslist[_date], _interactive) File "/Users/carysevans/opt/anaconda3/envs/pessto/lib/python3.7/site-packages/ntt-3.0.0-py3.7.egg/ntt/efoscphotredudef.py", line 872, in rejectbias answ = raw_input('good/bad [[g]/b/G(all good)/s(stop) ] ? ') NameError: name 'raw_input' is not defined (pessto) carysevans@SRVs-MBP 2016elsdata % PESSTOEFOSC2dSPEC -i -C making the list with raw data in the current directory ...... please wait Could not import aqutil

Limited graphics available on OSX (aqutil not loaded)

EFOSC.2016-08-02T13:16:25.798.fits 18.65973 EFOSC.2016-08-02T13:11:47.403.fits 10.59005 EFOSC.2016-08-02T13:14:21.812.fits 10.42003 EFOSC.2016-08-02T13:12:18.825.fits 11.19422 EFOSC.2016-08-02T13:15:54.767.fits 11.03498 EFOSC.2016-08-02T13:15:23.815.fits 9.602079 EFOSC.2016-08-02T13:13:50.810.fits 9.70993 EFOSC.2016-08-02T13:14:52.764.fits 9.864037 EFOSC.2016-08-02T13:13:20.058.fits 9.87159 EFOSC.2016-08-02T13:12:49.777.fits 9.783531 application-specific initialization failed: no display name and no $DISPLAY environment variable Unable to initialize window system. Killing IRAF task `display'

ERROR: PROBLEM OPENING DS9

           IMAGE      NPIX      MEAN    STDDEV       MIN       MAX

EFOSC.2016-08-02T13:16:25.798.fits 1060900 194.5 18.66 0. 13927. Traceback (most recent call last): File "/Users/carysevans/opt/anaconda3/envs/pessto/bin/PESSTOEFOSC2dSPEC", line 4, in import('pkg_resources').run_script('ntt==3.0.0', 'PESSTOEFOSC2dSPEC') File "/Users/carysevans/opt/anaconda3/envs/pessto/lib/python3.7/site-packages/pkg_resources/init.py", line 651, in run_script self.require(requires)[0].run_script(script_name, ns) File "/Users/carysevans/opt/anaconda3/envs/pessto/lib/python3.7/site-packages/pkg_resources/init.py", line 1448, in run_script exec(code, namespace, namespace) File "/Users/carysevans/opt/anaconda3/envs/pessto/lib/python3.7/site-packages/ntt-3.0.0-py3.7.egg/EGG-INFO/scripts/PESSTOEFOSC2dSPEC", line 112, in listbias, listarc, _cosmic, _verbose) File "/Users/carysevans/opt/anaconda3/envs/pessto/lib/python3.7/site-packages/ntt-3.0.0-py3.7.egg/ntt/efoscspec2Ddef.py", line 374, in efoscspecreduction biaslist[_date], _interactive) File "/Users/carysevans/opt/anaconda3/envs/pessto/lib/python3.7/site-packages/ntt-3.0.0-py3.7.egg/ntt/efoscphotredudef.py", line 872, in rejectbias answ = raw_input('good/bad [[g]/b/G(all good)/s(stop) ] ? ') NameError: name 'raw_input' is not defined

temuller commented 2 years ago

Try running the following on a terminal before testing the pipeline: setenv DISPLAY :0.0 If that solve the issue, add that to your source file.

Otherwise, check the file attached: PyRAFFAQ.pdf There seems to be a lot of solutions to common problem.

Don't forget to post your solution if you find the answer.

temuller commented 2 years ago

@carys-evans, I forgot to mention that you should specifically check point 2.6 on PyRAFFAQ.pdf

smarttgit commented 2 years ago

@carys-evans and @temuller - so you have got IRAF and pyraf working on 64 bit chip M1 and Monterey ? We had thought this was lost cause, but maybe not ?!

temuller commented 2 years ago

@carys-evans and @temuller - so you have got IRAF and pyraf working on 64 bit chip M1 and Monterey ? We had thought this was lost cause, but maybe not ?!

This is under development. You can check the branch where I am developing the new version for all the details: https://github.com/svalenti/pessto/tree/python3. You are also welcome to test it.

carys-evans commented 2 years ago

@carys-evans, I forgot to mention that you should specifically check point 2.6 on PyRAFFAQ.pdf

@temuller We tried the DISPLAY solution but it didn't correct the error, the main issue looks like it is recognising the "raw_input" function in python. I think this is because it has been renamed in python 3 as "input". We also followed the 2.6 solution from PyRAFFAQ.pdf but this did not solve the issue either.

temuller commented 2 years ago

@carys-evans my bad! I thought I had made all those changes. I just changed all the "raw_input" to "input" to make it python3 compatible. Let me know if this solves the issue.

temuller commented 2 years ago

I think I might need to make some other changes as "input" in python3 is not exactly the same as "raw_input" in python2.

carys-evans commented 2 years ago

@temuller Okay thank you! Let me know when you've made the changes and I will try running it again and see if that fixes my issue

temuller commented 2 years ago

@carys-evans I am done with the changes. Go ahead and try the pipeline again. Remember to pull the latest changes.

carys-evans commented 2 years ago

@temuller I pulled the changes and I have now managed to get PESSTOEFOSC2dSPEC to run - thank you for your help!