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

Home » Public Forums » archive » IDL Way to Remove Rows of an Array
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: IDL Way to Remove Rows of an Array [message #76121 is a reply to message #75986] Tue, 17 May 2011 10:12 Go to previous message
Gray is currently offline  Gray
Messages: 253
Registered: February 2010
Senior Member
On May 17, 12:59 pm, JDS <jdtsmith.nos...@yahoo.com> wrote:
>> JD Smith would probably say that it's faster to construct your own
>> index arrays, right?  Maybe like this?
>
> Probably not in this case.  Typically it's faster to roll your own index lists when the list you are constructing is smaller than the list IDL has to construct, for example if you are further sub-indexing it. The rule of thumb is to try not to make IDL do lots of work you will then promptly throw away.
>
> In this case, your list over columns, and the list IDL would create using "*" are identical.  So I'd probably simply go with '*'.  If you have a 'reject' list instead of 'keep' (as in David's example) a closely related but somewhat simpler/faster method is:
>
>   d=size(array,/DIMENSIONS)
>   array=array[*,where(~histogram(reject,MIN=0,MAX=d[1]-1),/NUL L)]

Since David's example converts the reject list to a keep list, then he
could use your method and skip the steps of constructing the keep
list.
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: IDL Way to Remove Rows of an Array
Next Topic: IDL fitting of piecewise continuous function

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

Current Time: Fri Oct 10 10:30:42 PDT 2025

Total time taken to generate the page: 0.40338 seconds