Welcome to iraf.net Thursday, May 02 2024 @ 11:56 AM GMT


 Forum Index > Archives > Sitemail Archives
 scripts detecting MEF files?
   
Anonymous: Guest
 09/30/2005 06:43PM (Read 7013 times)  



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 viaimcopy meffile[0] outputorfxsplit meffilethis 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

 
Anonymous: Guest
 09/30/2005 06:43PM  



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

 
   

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