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

Home » Public Forums » archive » difficulty using "linterp" command - need help making loop to exclude a value yet average others
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: difficulty using "linterp" command - need help making loop to exclude a value yet average others [message #77301 is a reply to message #77160] Wed, 17 August 2011 09:35 Go to previous messageGo to previous message
Michael Galloy is currently offline  Michael Galloy
Messages: 1114
Registered: April 2006
Senior Member
On 8/17/11 10:17 AM, David Fanning wrote:
> Emily Anne Moravec writes:
>
>> We are trying to remove some values of our spectra that are equal to
>> 0, but by using the remove command it literally removes the values
>> where the flux is equal to 0 which is what it is supposed to do, but
>> the problem with that is that when those values are remove the whole
>> graph then moves which will mess up our final result. Is there a
>> command that will take out the values equal to zero, but leave the
>> graph where it is?
>
> Are you looking for something like this, where there
> are gaps in the plot where the data goes to zero:
>
> IDL> data = randomu(-3L, 100)*10
> IDL> zeros = Long(randomu(-2L, 5)*100)
> IDL> data[zeros] = 0
> IDL> plot, data, min_value=0.1

Setting invalid values to !values.f_nan also works nicely for regular
line plots (though it can make related computations a bit more
complicated, with extra NAN keywords and the FINITE routine coming in
handy).

Mike
--
Michael Galloy
www.michaelgalloy.com
Modern IDL, A Guide to Learning IDL: http://modernidl.idldev.com
Research Mathematician
Tech-X Corporation
[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
Read Message
Read Message
Previous Topic: Re: creating a 2D mask for image filtering
Next Topic: Book Business Realities

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

Current Time: Wed Oct 08 19:23:14 PDT 2025

Total time taken to generate the page: 0.00408 seconds