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

Home » Public Forums » archive » mrd_struct failure for string values inside the VM
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: mrd_struct failure for string values inside the VM [message #90805 is a reply to message #90804] Fri, 17 April 2015 07:12 Go to previous messageGo to previous message
wlandsman is currently offline  wlandsman
Messages: 743
Registered: June 2000
Senior Member
If you only have access to the IDL VM, I don't believe that you are going to be able to modify FITS files. Or is it that you have a license and are trying to write a VM application?

Anyway, if you have a FITS header (e.g. read in with headfits() ) then the following little program will convert it to a structure (by using a hash as a intermediary). --Wayne

function fits2struct,hdr
; struct = fits2struct(hdr)

keywords = strmid(hdr,0,8)
hashfits = hash()
foreach key,keywords do hashfits[key] = sxpar(hdr,key,/silent)
return,hashfits.tostruct()
end


On Thursday, April 16, 2015 at 3:52:04 PM UTC-4, vino wrote:
> Hi Wlandsman,
>
> Thank you for reply. Can you please suggest any work around to this.. I just need to read in a fits header as a structure, so that I can access and modify them. I am taking some MEF files and making them single FITS files with appropriate headers added to them. Any help, will be much appreciated.
>
> Thanks and regards,
> Vino
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Help!!!!
Next Topic: Function graphics in a widget window

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

Current Time: Wed Oct 08 17:30:29 PDT 2025

Total time taken to generate the page: 0.00617 seconds