Posted: Wed Jun 15, 2011 9:09 pm Post subject: after imarith command IRAF saving the sub images as .fits
I use IRAF to process onedspec from the IRTF. The images are in pairs and are subtracted to remove bias etc...
After I subtract the spectral image pairs the new file is sub***.imh, but IRAF is saving it as a fits file and I am not able to extract the spectra.
What could be the cause of this error?
The 'imtype' environment variable is set to 'fits' bu default and controls the format when you don't specify an explicit extension. You can edit and uncomment the value in your login.cl file to be 'imh'. If you're using a script to do the processing the extension might not be explicit in the commands, if you're doing this manually from the CL prompt then be sure to put a ".imh" on the output file name.
I have manually added the .imh from the cl prompt and it still does not allow me to extract the spectra. Here is the list of my commands:
imarith specxxxx.fits - speczzzz.fits subyyy
:c 520 940
:l 475 485
blah blah blah...the rest is pop up?s
the final result is not an extracted spectrum and there is no peak that the aperture can define...looks like noise.
Whether APALL can extract a spectrum is a different problem from whether an image has a .fits extension. Unless something you're doing explicitly expects a "imh" file any valid format should do.
Are you saying that in IMPLOT the image looks fine but in APALL it looks like something different? What IRAF version and platform are you on? Did you set the 'dispaxis' package parameter correctly for the dispersion axis of the data?
Ok. I already had the patch, howewer i reinstalled it. i tried to extract the spectra and cannot. I noticed when I try to navigate to the apall folder the prompt strill says apextract>, and not ap>. So, anywhoo i still proceeded with the extraction to see if the patch was the source of error and it is not. I am still not being able to extract the spectra or accurately get the peak. Also, if I explicitly try to implot a .imh file it says segmentation error. (i did this with previously data I reduced on a much older version of IRAF.)
I had to edit the login.cl file to get the images saved to .imh
I had initially installed the patch into the wrong package folder, so that was moved to the correct directory. And yes, the dispersion axis was not set correctly. I had thought my dispersion was edited in epar apall as the dispersion lines, however I realiozed that was not correct and did epar apextract and reset the dispersion. Now, the spectra are extracted and the peak is identified correctly. Thanks for your help.
One more issue...when I try to plot images c reated in an older version of IRAF I am receiving a segmentation error. I am attempting to view previously subtracted spectral images.
me) implot sub266a
IRAF) segmentation error
It depends on how old a version of IRAF and what the original machine was. The .imh fiel is just the header, there is also a ".pix" file containing the pixels, the path to this file is stored in the .imh header file. Typically if the .pix file is "lost" or the path in the header is wrong you'll get a 'cannot open image' message but I can't remember if this was tested on a 64-bit system so might explain the segfault.
If the data come from before IRAF v2.11 there might also be the issue of whether the data are in the proper byte order for your current machine. If you could upload the .imh and .pix file to the anonftp at ftp://iraf.noao.edu/pub I can have a look.
ok...not having the pix file was the problem. When I transferred the data I did not copy the imdir that had the pix files. I have now since done so and the older data is plotting as it should. Thank you.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum