Submit a Story  :  IRAF Links  :  Past Polls  :  Calendar  :  Advanced Search  
     iraf.net
FAQ
 Forum FAQForum FAQ   Forum SearchForum Search   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

after imarith command IRAF saving the sub images as .fits

 
Post new topic   Reply to topic    iraf.net Forum Index -> General IRAF
View previous topic :: View next topic  
Author Message
Sherry



Joined: 15 Jun 2011
Posts: 10

PostPosted: Wed Jun 15, 2011 9:09 pm    Post subject: after imarith command IRAF saving the sub images as .fits Reply with quote

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?
Back to top
View user's profile Send private message
fitz
Site Admin


Joined: 30 Sep 2005
Posts: 3256
Location: Tucson

PostPosted: Wed Jun 15, 2011 9:13 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Sherry



Joined: 15 Jun 2011
Posts: 10

PostPosted: Wed Jun 15, 2011 9:22 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
fitz
Site Admin


Joined: 30 Sep 2005
Posts: 3256
Location: Tucson

PostPosted: Wed Jun 15, 2011 9:34 pm    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message
Sherry



Joined: 15 Jun 2011
Posts: 10

PostPosted: Wed Jun 15, 2011 9:45 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
fitz
Site Admin


Joined: 30 Sep 2005
Posts: 3256
Location: Tucson

PostPosted: Wed Jun 15, 2011 9:52 pm    Post subject: Reply with quote

Try getting the binary

ftp://iraf.noao.edu/iraf/v215/support/linux64/x_apextract.e

and install in $iraf/noao/bin.linux64 directory. This is a know issue with the scisoft distribution that also affects linux systems.
Back to top
View user's profile Send private message
Sherry



Joined: 15 Jun 2011
Posts: 10

PostPosted: Wed Jun 15, 2011 9:57 pm    Post subject: Reply with quote

thank you...I'lll give it a shot in the am.
Back to top
View user's profile Send private message
Sherry



Joined: 15 Jun 2011
Posts: 10

PostPosted: Thu Jun 16, 2011 2:16 pm    Post subject: Reply with quote

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.)
Back to top
View user's profile Send private message
Sherry



Joined: 15 Jun 2011
Posts: 10

PostPosted: Thu Jun 16, 2011 6:32 pm    Post subject: Reply with quote

I got it figured out Smile
Back to top
View user's profile Send private message
fitz
Site Admin


Joined: 30 Sep 2005
Posts: 3256
Location: Tucson

PostPosted: Thu Jun 16, 2011 6:45 pm    Post subject: Reply with quote

Mind if I ask what the resolution was??
Back to top
View user's profile Send private message
Sherry



Joined: 15 Jun 2011
Posts: 10

PostPosted: Thu Jun 16, 2011 6:56 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
Sherry



Joined: 15 Jun 2011
Posts: 10

PostPosted: Thu Jun 16, 2011 7:01 pm    Post subject: Reply with quote

oops I meant to write segmentation violation
Back to top
View user's profile Send private message
fitz
Site Admin


Joined: 30 Sep 2005
Posts: 3256
Location: Tucson

PostPosted: Thu Jun 16, 2011 7:14 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Sherry



Joined: 15 Jun 2011
Posts: 10

PostPosted: Thu Jun 16, 2011 8:13 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    iraf.net Forum Index -> General IRAF All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2009 phpBB Group
 Copyright © 2005-2011 iraf.net
 All trademarks and copyrights on this page are owned by their respective owners.
Powered By Geeklog 
Created this page in 0.10 seconds