-
Notifications
You must be signed in to change notification settings - Fork 8
Macros
The Vespucci macro system allows for the automation and reproduction of common processing and analysis techniques. Analysis methods can only be applied to one dataset.
The history of operations performed on the active dataset is displayed in the History Viewer. This can be accessed from the Window menu in the menu bar.
The names of Vespucci macro commands mirror those of the VespucciDataset class in the C++ API. In the list of valid commands below, the parameters are preceeded by their types. UInt refers to an unsigned integer, Int refers to a signed integer, String refers to a string (an array of characters), Bool refers to a boolean value (either true or false), and Double refers to a double-precision floating point number (a real, rational number that may or may not be an integer). Presenting a function with an invalid type will prevent the entire macro from executing. If a macro function call is incorrect, a dialog box will explain which parameter of which line is incorrect.
Each line must consist of one function call. Lines are not ended in semicolons. Commas separate parameters. You should not use quotes around string literals.
MinMaxNormalize()
MeanCenter()
ZScoreNormalize()
AbsoluteValue()
VectorNormalize(UInt p)
PeakIntensityNormalize(Double lower, Double upper)
Scale(Double a)
MedianFilter(UInt window)
SavitzkyGolay(UInt derivOrder, UInt polyOrder, UInt windowSize)
LinearMovingAverage(UInt windowSize)
MFBaseline(UInt windowSize, UInt iterations)
IModPolyBaseline(UInt polyOrder, UInt maxIterations, Double threshold)
QUIC_SVD(Double alpha)
SingularValue(UInt new_rank)
ShedSpectrum(UInt ind)
ZeroSpectrum(UInt ind)
ShedZeroSpectra()
ShedZeroWavelengths()
Booleanize(Double min, Double max, Bool keepInside, Bool oneify)
Clamp(Double min, Double max)
ZeroFlatSpectra(Double threshold)
ZeroClippedSpectra(Double threshold)
RemoveClippedSpectra(Double threshold)
RemoveFlatSpectra(Double threshold)
Univariate(String name, Double min, Double max, UInt searchWindow)
BandRatio(String name, Double firstMin, Double firstMax, Double secondMin, Double secondMax, UInt searchWindow)
PartialLeastSquares(String name, UInt components)
VertexComponents(String name, UInt components)
PrincipalComponents(String name)
KMeans(String name, UInt components)
Macros can be run on the active dataset or on all datasets in the workspace. Macros are saved as raw .txt files. Vespucci will save macros with Unix line endings ("\n") on all platforms, which may make editing macros in the "text editor" that comes with Windows difficult. Check out Notepad++, Atom, Visual Studio Code or, if you're really serious, Vim. Vespucci can load files with the wrong line endings, so it isn't really a big deal.
© 2016 Vespucci Project @ Wright State University