Re: difficulty using "linterp" command - need help making loop to exclude a value yet average others [message #77300 is a reply to message #77160] |
Wed, 17 August 2011 09:57   |
wlandsman
Messages: 743 Registered: June 2000
|
Senior Member |
|
|
I am just guessing what you mean by "leave the graph where it is" but note that you need to remove the zero values from both the wavelength and flux vectors. So, applying the idlastro procedure remove.pro to your wavelength, w, and flux, f, vectors:
g = where(f eq 0,Ng) ;Find locations of zero values in flux vector
if Ng gt 0 then remove,g,w,f ;Remove these locations from both wavelength & flux vectors
On Wednesday, August 17, 2011 12:10:39 PM UTC-4, Emily Anne Moravec wrote:
> 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?
|
|
|