Welcome to iraf.net Friday, April 26 2024 @ 07:53 PM GMT


 Forum Index > Help Desk > General IRAF New Topic Post Reply
 after imarith command IRAF saving the sub images as .fits
   
Sherry
 06/15/2011 09:09PM (Read 5545 times)  
+----
Newbie

Status: offline


Registered: 06/15/2011
Posts: 10
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?

 
Profile Email
 Quote
fitz
 06/15/2011 09:09PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
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.

 
Profile Email
 Quote
Sherry
 06/15/2011 09:09PM  
+----
Newbie

Status: offline


Registered: 06/15/2011
Posts: 10
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
implot subyyy
:c 520 940
:l 475 485
epar apall
apall subyyy
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.

 
Profile Email
 Quote
fitz
 06/15/2011 09:09PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
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?

 
Profile Email
 Quote
Sherry
 06/15/2011 09:09PM  
+----
Newbie

Status: offline


Registered: 06/15/2011
Posts: 10
Yes, the spectrum looks fine when using implot. However, using apall it no longer looks like it should nor does it accurately find the peak. i am using Linnux 64 bit OS version 2.15

 
Profile Email
 Quote
fitz
 06/15/2011 09:09PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
Try getting the binaryftp://iraf.noao.edu/iraf/v215/support/linux64/x_apextract.eand install in $iraf/noao/bin.linux64 directory. This is a know issue with the scisoft distribution that also affects linux systems.

 
Profile Email
 Quote
Sherry
 06/15/2011 09:09PM  
+----
Newbie

Status: offline


Registered: 06/15/2011
Posts: 10
thank you...I'lll give it a shot in the am.

 
Profile Email
 Quote
Sherry
 06/15/2011 09:09PM  
+----
Newbie

Status: offline


Registered: 06/15/2011
Posts: 10
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.)

 
Profile Email
 Quote
Sherry
 06/15/2011 09:09PM  
+----
Newbie

Status: offline


Registered: 06/15/2011
Posts: 10
I got it figured out Smile

 
Profile Email
 Quote
fitz
 06/15/2011 09:09PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
Mind if I ask what the resolution was??

 
Profile Email
 Quote
Sherry
 06/15/2011 09:09PM  
+----
Newbie

Status: offline


Registered: 06/15/2011
Posts: 10
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

 
Profile Email
 Quote
Sherry
 06/15/2011 09:09PM  
+----
Newbie

Status: offline


Registered: 06/15/2011
Posts: 10
oops I meant to write segmentation violation

 
Profile Email
 Quote
fitz
 06/15/2011 09:09PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
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.

 
Profile Email
 Quote
Sherry
 06/15/2011 09:09PM  
+----
Newbie

Status: offline


Registered: 06/15/2011
Posts: 10
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.

 
Profile Email
 Quote
   
Content generated in: 0.56 seconds
New Topic Post Reply

Normal Topic Normal Topic
Sticky Topic Sticky Topic
Locked Topic Locked Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Anonymous users can post 
Filtered HTML Allowed 
Censored Content 
dog allergies remedies cialis 20 mg chilblain remedies


Privacy Policy
Terms of Use

User Functions

Login