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 #74109] Wed, 22 December 2010 11:44 Go to previous message
penteado is currently offline  penteado
Messages: 866
Registered: February 2018
Senior Member
Administrator
On Dec 22, 2:50 am, Paulo Penteado <pp.pente...@gmail.com> wrote:
> 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

Now that I thought more about this, it seems it would be better to not
always return hashes from the brackets overload. If only one element
is found, returning directly the value seems more natural ans useful
than a 1-element hash. And if none is found, returning !null seems
better than an empty hash.
[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: Wed Oct 08 17:02:29 PDT 2025

Total time taken to generate the page: 0.00388 seconds