pyraf icon indicating copy to clipboard operation
pyraf copied to clipboard

Using pyraf across environments: Unresponsive icfit window in identify

Open Vital-Fernandez opened this issue 3 years ago • 1 comments

I have installed iraf/pyraf with the astroconda python 2.7 conda environment.

Pyraf works well within this environment but I have been searching ways to run pyraf tasks with my own scripts in supported python versions.

I have been succesfull launching pyraf tasks in a python 3.7 using the subprocess library and activating the pyraf environement. I am using ubuntu 20.04 and the code looks something like:

bash_command = "bash -c 'source /home/user/anaconda3/bin/activate && conda activate iraf27 && python RunIraf_task.py task_conf_file.txt /home/user/data/folder/ && conda deactivate'"

p1 = subprocess.run(bash_command, shell=True, capture_output=True)

This works very well for most tasks and it makes possible to keep the pyraf installation isolated. However, I noticed an issue in the identify task: While trying to define a line (m key) the plot window becomes kind of frozen. This does not happen in the fit window (f key) which works as expected.

I guess this is because the task wants to display some information in the terminal or is waiting for some user input. I wonder if anyone has a workaround this issue or if they would suggest some strategy to run pyraf accross python environments.

Thank you for your work

Vital-Fernandez avatar Aug 19 '21 14:08 Vital-Fernandez

Did you try to use the Pyraf that comes with Ubuntu?

$ sudo apt install python3-pyraf

The problem you will have with your problem is that the development of the Astroconda IRAF/PyRAF packages is basically finished; there will almost probably no new releases or bugfixes.

olebole avatar Aug 19 '21 15:08 olebole