Hi Perry,
sorry, should have known that this was not a good idea... Really any combine call
with plfile= arguments shows the "problem", like this
import pyraf
import pyraf.iraf as iraf
iraf.combine("FOV1,FOV2,FOV3","FOV123",plfile="FOV123_bpm")
(you can try with the files from http://www.aip.de/People/PWeilbacher/FOV.tar.gz).
But I found out now that it is the mscred package that is interfering.
If I remove it from my login.cl but leave imred and ccdred in, the above
command works from Python.
The question that remains is: could I explicitely call the combine task
from noao.imred.ccdred from Python, even if mscred is loaded? All of
these commands
iraf.ccdred.combine("LowResCube1_FOV,LowResCube2_FOV.fits,LowResCube3_FOV","FOV123",plfile="FOV_bpm")
iraf.noao.imred.ccdred.combine("LowResCube1_FOV,LowResCube2_FOV.fits,LowResCube3_FOV","FOV123",plfile="FOV_bpm")
from pyraf.iraf import ccdred
ccdred.combine("LowResCube1_FOV,LowResCube2_FOV.fits,LowResCube3_FOV","FOV123",plfile="FOV_bpm")
just give
IrafError: Cannot find .par file for task combine
even though Python itself seems to recognize them as valid calls.
Cheers,
Peter.
3/9/2006 10:27:57 AM mcleskey
Reply from perry@stsci.edu
Subject: Re: Reply from pweilbacher for CNSHD557262 submitted by pweilbacher regarding IRAF combine task under Python (PyRAF)
To: "<support@stsci.edu>" <support@stsci.edu>, pweilbacher@aip.de
Cc:
>
> Hi Perry,
>
> sorry, should have known that this was not a good idea... Really
> any combine call
> with plfile= arguments shows the "problem", like this
> import pyraf
> import pyraf.iraf as iraf
> iraf.combine("FOV1,FOV2,FOV3","FOV123",plfile="FOV123_bpm")
> (you can try with the files from
> http://www.aip.de/People/PWeilbacher/FOV.tar.gz).
>
> But I found out now that it is the mscred package that is
> interfering.
> If I remove it from my login.cl but leave imred and ccdred in, the
> above
> command works from Python.
>
>
> The question that remains is: could I explicitely call the combine
> task
> from noao.imred.ccdred from Python, even if mscred is loaded? All of
> these commands
>
> iraf.ccdred.combine("LowResCube1_FOV,LowResCube2_FOV.fits,LowResCube3_F
> OV","FOV123",plfile="FOV_bpm")
>
> iraf.noao.imred.ccdred.combine("LowResCube1_FOV,LowResCube2_FOV.fits,Lo
> wResCube3_FOV","FOV123",plfile="FOV_bpm")
> from pyraf.iraf import ccdred
>
> ccdred.combine("LowResCube1_FOV,LowResCube2_FOV.fits,LowResCube3_FOV","
> FOV123",plfile="FOV_bpm")
>
> just give
> IrafError: Cannot find .par file for task combine
>
> even though Python itself seems to recognize them as valid calls.
>
>
> Cheers,
> Peter.
>
>
Thanks for providing the data and giving more specific information. I'm
not sure the problem is with the imports or something else. When I try
the following from ipython
import pyraf
from pyraf import iraf
from iraf import mscred
from iraf import imred
from iraf imoprt ccdred
iraf.noao.imred.ccdred.combine("FOV1, FOV2, FOV3", "FOV123",
plfile="FOV123_bpm")
works without any error messages as does:
iraf.combine("FOV1, FOV2, FOV3", "FOV123", plfile="FOV123_bpm")
though
iraf.mscred.combine("FOV1, FOV2, FOV3", "FOV123", plfile="FOV123_bpm")
fails as you describe.
If you do what I did, do you still have problems?
Thanks, Perry
3/9/2006 10:42:02 AM mcleskey
Reply from pweilbacher@aip.de
Subject: Re: Reply from pweilbacher for CNSHD557262 submitted by pweilbacher regarding IRAF combine task under Python (PyRAF)
To: Perry Greenfield <perry@stsci.edu>
Cc: "<support@stsci.edu>" <support@stsci.edu>
This message is in MIME format. The first part should be readable text,
while the remaining parts are likely unreadable without MIME-aware tools.
--562897975-1650477495-1141918862=:11086
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
Hi Perry,
below your commands I paste the output (in short) that I get.
> Thanks for providing the data and giving more specific information. I'm not
> sure the problem is with the imports or something else. When I try the
> following from ipython
>
> import pyraf
> from pyraf import iraf
> from iraf import mscred
> from iraf import imred
> from iraf imoprt ccdred
> iraf.noao.imred.ccdred.combine("FOV1, FOV2, FOV3", "FOV123", plfile="FOV123_bpm")
IrafError: Cannot find .par file for task combine
> works without any error messages as does:
> iraf.combine("FOV1, FOV2, FOV3", "FOV123", plfile="FOV123_bpm")
KeyError: "Error in parameter 'plfile' for task combine\n'Key plfile not found'"
> though
> iraf.mscred.combine("FOV1, FOV2, FOV3", "FOV123", plfile="FOV123_bpm")
KeyError: "Error in parameter 'plfile' for task combine\n'Key plfile not found'"
> fails as you describe.
>
> If you do what I did, do you still have problems?
Yes, see above. I also attach the full output in case you can tell any
more from that. Let me know if you have an idea, how to find the
difference between our setups.