-
Notifications
You must be signed in to change notification settings - Fork 17
Description
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