Hi all. I am having problems for using IDL functions in spectral math in ENVI. there are many tutorials about the syntax of expressions, but I can't figure out how to call an IDL function such as TS_SMOOTH. I would like to smooth noisy spectra, and from what I could read the IDL syntax for it is
Result = TS_SMOOTH( X, Nvalues [, /BACKWARD] [, /DOUBLE] [, /FORWARD] [, ORDER=value] )
In the spectral math window, I tried a huge number of syntaxes, all of them being refused. For instance I tried:
TS_SMOOTH(s1) **assuming that Nvalues could be an option defined in the next window of variable selection
TS_SMOOTH(s1,15) ** if the ORDER parameter is to be defined at this stage
TS_SMOOTH ** in case ENVI just needs the name of the function, with the variables defined at the next step.
None of these options work. In the spectral math window I get the message: "You have entered an invalid expression.
Check for syntax errors or undefined procedures and functions and try again." In IDL I get: "TS_SMOOTH: Time-series input must be a vector of at least 11 elements.", which I do not understand since the input variable, s1, is defined in the next window from an open plot window or a file. Its length cannot be defined before that new window which I cannot access because of the error message. I have never used the spectral math capability of ENVI before, and I am sure the solution is not far! Thanks in anyone can help!
|