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

Home » Public Forums » archive » Re: Fuzzy searching of FITS header
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: Fuzzy searching of FITS header [message #74120 is a reply to message #74119] Tue, 21 December 2010 20:50 Go to previous messageGo to previous message
penteado is currently offline  penteado
Messages: 866
Registered: February 2018
Senior Member
Administrator
On Dec 21, 11:11 pm, Paulo Penteado <pp.pente...@gmail.com> wrote:
> On Dec 21, 9:00 pm, Gray <grayliketheco...@gmail.com> wrote:
>
>> I'm envisioning a routine that uses lists and hashes to return the
>> keyword and value for all keywords that match any number of search
>> strings... do I have the time/energy to write it?
>
> I was just writing something like that as an example for a class.
> Similar to what the new graphics do to find elements by search strings
> (like axes=plot['*axis*']). I will post it later.

It is not complete (not even documented), but it already does that:

http://www.ppenteado.net/idl/pp_lib/src/pp_readfits__define. pro

I started this as an example for a class, but due to some recent needs
I noticed when using fits files, I intend to give it a more complete
functionality, with things like processing coordinates through wcs,
calculating wavelengths, and allowing to edit and save files.

An example of how it works now:

IDL> fits=pp_readfits('test.fits')
% READFITS: Now reading 256 by 256 array
IDL> help,fits.data
<Expression> LONG = Array[256, 256]
IDL> help,fits.header
<Expression> STRING = Array[184]
IDL> help,fits.variables
<Expression> HASH <ID=746 NELEMENTS=181>
IDL> help,fits.descriptions
<Expression> HASH <ID=1117 NELEMENTS=181>
IDL> print,(fits.variables)['NAXIS']
2
IDL> print,(fits.descriptions)['NAXIS']
Number of axes
IDL> print,fits['NAXIS']
NAXIS: 2
IDL> print,fits['NAXIS*']
NAXIS2: 256
NAXIS: 2
NAXIS1: 256
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: idlgrtext fixed-width font
Next Topic: Re: idlgrtext fixed-width font

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

Current Time: Fri Oct 10 06:20:46 PDT 2025

Total time taken to generate the page: 1.27919 seconds