Imarirth outputting an MEF
jbs045 wrote on Jun 18, 2015
I'm a Pyraf user, and I think that it may have something to do with my problem, but I am using imarith to multiply a constant by a non MEF fits file, and for whatever reason, it is outputting a MEF when I don't want to it. Here is my surrounding code:
iraf.datapars.readnoise=pyfits.getval(filesfull[i]+'.fits','RONOISE')
iraf.imarith (operand1= filesfull[i], op='*', operand2= trval, result= files[i]+'z.fits')
iraf.photpars.zmag = -2.5*math.log10(1.213*3.384638*math.pow(10,-5)/(280.9*trval))
iraf.daofind (image = files[i] + 'z.fits', output = files[i]+'z.coo')
iraf.phot (image=files[i] + 'z.fits', coords=files[i]+'z.coo', output= files[i]+'z.mag')
iraf.txdump (textfile= files[i]+'z.mag', fields = 'xc,yc,mag,merr,xerr,yerr', expr= 'merr<0.1', Stdout= files[i]+'z.txt')
Where trval is just a constant, and the code breaks on daofind, with the following error:
ERROR (1113, "FXF: must specify which FITS extension (r47124224/ch1/bcd/SPITZER_I1_47124224_0001_0000_1_cbcdz.fits)")
If there's any advice you can give, that would be wonderful!
Mike Fitzpatrick wrote on Jun 30, 2015
I'm unable to reproduce this using the standard CL so it may be a pyraf issue. If you're still having problems then I'd suggest contacting the STScI help desk (help@stsci.edu) to see if it is a known problem. Does creating the filename strings outside of the task call change anything, e.g.
resname = files + 'z.fits'
iraf.imarith ( ......., result=resname)
Have you tried running the same imarith command under the CL with the same result?
Last post on Jun 30, 2015