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 

scripts detecting MEF files?

 
Post new topic   Reply to topic    iraf.net Forum Index -> Sitemail Archives
View previous topic :: View next topic  
Author Message
Guest
Guest





PostPosted: Fri Sep 30, 2005 6:43 pm    Post subject: scripts detecting MEF files? Reply with quote

Hi, I was wondering what "the best" way to detect multi-extention fits
(MEF) files is in an IRAF script? Until recently I've used the EXTEND
keyword: if it was set to "T" then I treated the image as a MEF. This
fails for some HST data. I looked into some FITS format documents and
discovered that the EXTEND keyword set to "T" only means that the image
*may* contain multiple images. (It's also worth pointing out that EXTEND=F
is not defined to mean anything, only T.)

The crux of the problem is this.... if I copy a MEF file frame
to a new fits file via

imcopy meffile[0] output

or

fxsplit meffile

this often preserves the EXTEND=T keyword although "output" is no longer
a MEF file (or, more weakly, IRAF no longer requires me to specify a FITS
extension on the image). How how IRAF "knows" not to ask for a frame
extension, for example with the display task, may help answer my question.

Any insight would be much appreciated,
Jason




Post generated using Mail2Forum (http://www.mail2forum.com)
Back to top
Guest
Guest





PostPosted: Mon Oct 03, 2005 9:45 pm    Post subject: scripts detecting MEF files? Reply with quote

Hi Jason,
Our FITS kernel guru is travelling at the moment but may offer
another suggestion when he returns. The fits kernel knows to prompt for
an extension because it actually tries to read one to test for the MEF.
In a script the best I could come up with was to do something like

fxhead (<image>, long-) | count | fields ("STDIN", 1) | scan (next)

If the value of 'next' is 2 then there are no extensions, anything greater
than 2 implies extensions. Finding out whether the Primary header has
any data is a little trickier but could be similarly done. Other keywords
such as NEXTEND aren't guaranteed to be correct and the above actually
reads the data so should be reliable. I'll pass along any other
suggestions people might have, hope this helps.

Cheers,
Mike Fitzpatrick




Post generated using Mail2Forum (http://www.mail2forum.com)
Back to top
Display posts from previous:   
Post new topic   Reply to topic    iraf.net Forum Index -> Sitemail Archives 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.08 seconds