Re: difficulty using "linterp" command - need help making loop to exclude a value yet average others [message #77303 is a reply to message #77160] |
Wed, 17 August 2011 09:17   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
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
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|