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 #67213 is a reply to message #67211] Wed, 08 July 2009 06:40 Go to previous messageGo to previous message
R.Bauer is currently offline  R.Bauer
Messages: 1424
Registered: November 1998
Senior Member
David Fanning schrieb:
> Anthony writes:
>
>> I have an array of structures, with many tags, including "table.ra"
>> and "table.dec", which are floats
>>
>> I want to change "table.ra" and "table.dec" to double precision.
>>
>> Is there an easy way of doing this? (Optimistic question, I know...)

it is

>
> You mean NOW!? No, it's *way* too late for that.
> You should have thought of that when you were defining
> the structure. :-)
>
> Cheers,
>
> David
>
>
>

it isn't you just need a program for that as usual.

http://www.fz-juelich.de/icg/icg-1/idl_icglib/idl_source/idl _html/dbase/replace_tagvalue_dbase.pro.html

e.g. wget
http://www.fz-juelich.de/icg/icg-1/idl_icglib/idl_source/idl _html/dbase/download/replace_tagvalue.sav

e.g.

d = {A: 1, B: {B1: 0, B2: 1}, C: {B1: 0, B2: 1}}

help, replace_tagvalue(d, 'A', 2, NEW_TAGNAME = 'CC'),/str
** Structure <1056ea8>, 3 tags, length=10, refs=1:
CC INT 2
B STRUCT -> Array[1]
C STRUCT -> Array[1]
result = replace_tagvalue(d, 'A', {A:2})
HELP, result.a, /STR
** Structure <133aa58>, 1 tags, length=2, refs=2:
A INT 2
result = replace_tagvalue(d, 'B1', {A:2}, NEW_TAGNAME = 'I', /ALL)
HELP,result.b,/str
** Structure <1055248>, 2 tags, length=4, refs=2:
I STRUCT -> Array[1]
B2 INT 1
result = replace_tagvalue(d, 'B1', {A:2}, sub='B')
HELP, result.b, /STR
** Structure <13243f8>, 2 tags, length=4, refs=2:
B1 STRUCT -> Array[1]
B2 INT 1
HELP, result.b.b1, /STR
** Structure <1369998>, 1 tags, length=2, refs=2:
A INT 2

further tools could be found at
http://www.fz-juelich.de/icg/icg-1/idl_icglib/idl_lib_intro. html

cheers
Reimar
[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 22:03:46 PDT 2025

Total time taken to generate the page: 0.56340 seconds