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

Home » Public Forums » archive » Re: 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
Re: manipulating structures [message #53372 is a reply to message #53369] Fri, 06 April 2007 23:20 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
metachronist writes:

> 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?

Ken's explanation is absolutely correct, but if it is
really just the plotting of the data that is causing
you problems, I'd forget about NANs and just use the
MAX_VALUE keyword to set a value less than the "missing"
value.

PLOT, data, MAX_VALUE=999999.0 - 1

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: map_proj_init
Next Topic: Re: counting rows

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

Current Time: Thu Oct 09 21:39:30 PDT 2025

Total time taken to generate the page: 0.95907 seconds