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

Home » Public Forums » archive » Re: matching fields in ascii or text files.
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: matching fields in ascii or text files. [message #26083] Fri, 03 August 2001 17:36 Go to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
patrick@es.ucsc.edu (Patrick McEnaney) writes:
> I'm writing an idl gui script to cycle through fairly long files of
> data that are collected from a ctd and compare them with chlorophyll
> measurements from insitu sampling. I want to select the data from a
> specific depth for chlorophyll and and write all values for that
> depth in another file. Just putting the data into excel files would be
> very cumbersome because the data are collected over a month long
> cruise and there are alot of measurements. Ultimately I'll use the
> script whenever I need to compare fields from cruise data. Can you
> suggest a way to construct such a matching routine in idl?

The solution is even easier in that case.

wh = where(depth_list EQ depth)

Now WH are the indices of depths in DEPTH_LIST which have the same
depth as DEPTH. Wow, I hope that was intelligible.

The problem with this approach is that if you want to select out many
many DEPTHs in a loop, you will start to slow down because you are
essentially doing an N^2 operation (ie, searching the entire
DEPTH_LIST every time). In that case you may care to revert to
something else.

Craig

--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: polar contour plots
Next Topic: PV-WAVE 7.5 is now available

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

Current Time: Fri Oct 10 07:41:42 PDT 2025

Total time taken to generate the page: 1.44126 seconds