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

Home » Public Forums » archive » Re: Variable assignment
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: Variable assignment [message #35913 is a reply to message #35906] Tue, 22 July 2003 08:41 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Haje Korth writes:

> I am trying to assign a variable with data=data(index), where index is an
> array with 300000 elements. IDL answers "Too many elements". Is there away
> around this? Basically, I need to kill some lines in data that contain dummy
> values. This the data files are HDF, I cannot eliminate these data when the
> file is read with hdf_read.

Uh, at the risk of sounding impertinent, why don't
you just take smaller bites? :-)

Something like this:

indices = Where( array EQ BAD, count)
IF count GT 250000L THEN BEGIN ; Or whatever the number is
half = count/2
array[indices[0:half]] = -999
array[indices[half+1:*]] = -999
ENDIF ELSE array[indices] = -999

Cheers,

David
--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: about replicate_inplace
Next Topic: Re: Dataminer and PostgreSQL

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

Current Time: Wed Oct 08 19:30:58 PDT 2025

Total time taken to generate the page: 0.00468 seconds