"from pyraf.iraf import combine" fails? #331
-
Hello everyone! I am using jupyter notebook to write pyraf codes. Many tasks, like imslice, display and implot, could be soomthly invoked from the pyraf.iraf package just as illustrated in the tutorial. But this is not the case for the combine task and it returns an error indicating that this task is not included in pyraf.iraf package. Here, I know "help combine" could show the exact location of a given task in iraf syntax. But the fact is that lots of tasks have been reorganized and relocate in python syntax. So could anyone tell me how to use the combine task in python syntax? Thanks in advance! Danielle |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
What do you mean here? PyRAF is just another shell around IRAF (like cl/ecl) and so uses the task structure provided by IRAF. Therefore, the task is located at exactly the same place. "help combine" shows on top where the task is located:
So, the package is in noao.imred.ccdred. |
Beta Was this translation helpful? Give feedback.
The following works for me:
The point is than one can only do top-level imports in iraf, not in the imported packages. Reason is the old-fashioned "import" behavior in PyRAF that reflects the IRAF package loading.
The difference to the other tasks you mentioned is that they are pre-loaded in your
login.cl
and therefore directly available in IRAF (and PyRAF).One comment however: IRAF (and also PyRAF) is an old and outdated software. It is maintained for legacy and cultural reasons. Starting new projects with PyRAF or IRAF is not really a good idea; the time is usually bett…