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

Home » Public Forums » archive » Re: Change structure tags from float to double
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: Change structure tags from float to double [message #67211 is a reply to message #67208] Wed, 08 July 2009 07:23 Go to previous messageGo to previous message
Anthony[1] is currently offline  Anthony[1]
Messages: 20
Registered: December 2006
Junior Member
Hi again,

David - I'm reading data using MRDFITS - not sure I can convert the
data when reading it in??

Reimar - does it work on arrays of structures? I tried this:

IDL> x = replicate({a:0., b:0}, 5)
IDL> help, x
X STRUCT = -> <Anonymous> Array[5]
IDL> help, x, /struct
** Structure <15ee908>, 2 tags, length=8, data length=8, refs=1:
A FLOAT 0.00000
B LONG 0
IDL> y = replace_tagvalue(x, 'A', double(x.a))
IDL> help, y
Y STRUCT = -> <Anonymous> Array[1]
IDL> help, y, /struct
** Structure <15f5518>, 2 tags, length=64, data length=60, refs=1:
A DOUBLE Array[5]
B LONG Array[5]

... but it completely changed the structure.

Maybe I'll just edit the FITS file manually...

Anthony
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Change structure tags from float to double
Next Topic: Re: "idl___ is not available for this system (solaris2.x86_64)

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

Current Time: Fri Oct 10 00:08:13 PDT 2025

Total time taken to generate the page: 0.79838 seconds