comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » read FITS header keyword using IDL Astronomy users's library
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: read FITS header keyword using IDL Astronomy users's library [message #73355 is a reply to message #73210] Mon, 01 November 2010 10:26 Go to previous messageGo to previous message
wlandsman is currently offline  wlandsman
Messages: 743
Registered: June 2000
Senior Member
On Nov 1, 1:08 pm, polystethylene <polystethyl...@hotmail.com> wrote:
> On Nov 1, 4:47 pm, Truong Le <truong...@gmail.com> wrote:
>
>> All,
>
>> Does anyone know if one can use the IDL astronomy users's library to
>> obtain just the header
>> keyword (in other word, I want to check if a header keyword exist in
>> the FITS file)?
>
>> I checked the library but could really see any procedure that actually
>> does what I really wanted.
>
>> Thanks
>
> SXPAR will do this for you...
>
>
Yes, and here's a little function if you want it..

function fits_keyword_exist,file,keyword,exten=exten
;return 1 if specified keyword exists in FITS file header. Primary
header
;is searched unless EXTEN keyword is set.

hdr = headfits(file,exten=exten)
dum = sxpar(hdr,keyword,count=count)
return,count<1
end

IDL> print,fits_keyword_exist('test.fits','bitpix')
1
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Doubt in polynomial fitting - emergency
Next Topic: doubt in chisq value

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Nov 28 20:26:18 PST 2025

Total time taken to generate the page: 0.88335 seconds