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

Home » Public Forums » archive » Removing unwanted data from a structure
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: Removing unwanted data from a structure [message #84255 is a reply to message #84137] Fri, 10 May 2013 10:41 Go to previous messageGo to previous message
cab581 is currently offline  cab581
Messages: 7
Registered: April 2013
Junior Member
OK, I'll back track and try to explain more clearly.
I have a structure called STRUCT, it is made from thousands of files, each of these has a measurement at a particular location. The first six tags STRUCT.(0) to STRUCT.(5) are identifiers, STRUCT.(6) is the data. First, I put the data in to 18 latitudinal bins;

FOR I = 0,17 DO BEGIN
A = 0.0
A = WHERE(STRUCT.LAT GT LAT[I] AND STRUCT.LAT LE LAT[I]+10)

STRUCT[A].(6) is therefore the data that I want to analyze in each of the 18 bins.

I found the medians by using;

FOR J = 0,99 DO BEGIN

MEDIAN[I,J] = MEDIAN(STRUCT[A].(6)[J], /double, /even)

Where I is the latitude (0,17) and J is the altitude (0,99), so I get an array of the median measurement at each of my 18x100 points.

What I want to do is sift through the data from which I calculated the median and then compare those to the median to exclude erroneous values, so I thought that I could use the following;

ind = where(STRUCT[A].(6)[J] GT (MEDIAN+1000))
IF ind[0] GT 0 then STRUCT[A].(6)[ind] = !values.F_Nan

but it doesn't work, I end up with NaNs all over the place where they shouldn't be.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Q: project_vol
Next Topic: MPFIT and bestnorm

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

Current Time: Wed Oct 08 16:07:10 PDT 2025

Total time taken to generate the page: 0.00180 seconds