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

Home » Public Forums » archive » manipulating structures
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
manipulating structures [message #53376] Fri, 06 April 2007 19:03
rkombiyil is currently offline  rkombiyil
Messages: 59
Registered: March 2006
Member
To all ye who have attained idl nirvana and to the one who speaketh
the truth :p

Missing data points in my 'binary' data (coded as 32bit words) are
denoted by large #'s, like 999999. In order "not" to plot these
missing values, I am using !values.f_nan. But the array ought to be
float to set it to 'NaN' directly. Besides, the type of a variable
within a structure can't be modified.

What I did was:
--
a=fltarr(dim) ;dim is dimension, i.e., #days *
#data/day
a=float(data[*].mydat) ;data[dim].mydat is data variable
a[where(a[*] eq 999999.)]=!values.f_nan
--

It works, but I was wondering if there is a "better way" to do this?

Thanks for the enlightenment :D
/rk
[Message index]
 
Read Message
Previous Topic: "Cluster" please help
Next Topic: Basic IDL/ENVI Input file/Apply calc/Output to new file

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

Current Time: Wed Oct 08 15:53:02 PDT 2025

Total time taken to generate the page: 0.00389 seconds