SPECtrum Processing Routines User's Manual Version 3 (program SPECPR)
Introduction
The SPECtrum Processing Routines (SPECPR) is a large-scale interactive program for general one-dimensional array processing and optimized for reflectance spectroscopy data and analysis. The program processes one-dimensional arrays up to 4852 data points and the operations include addition, subtraction, multiplication, division, trigonometric functions, logarithmic and exponential functions, and many more specialized routines.
The Specpr user interface is a menu driven, character command system with all user input entered as ascii characters to the program. User commands are thoroughly checked for the context in which they will be used. This provides for essentially all user input mistakes to be caught and appropriate error messages to be issued. The user interface also allows for command aliasing, variable substitutions, command history and batch command processing to occur at any point in the program. The user can also control his or her own variables, increment and decrement them, and monitor certain internal variables. This flexibility allows for sophisticated programming, e.g. from specific computations, to management of a database.
All arrays are treated as one dimensional lists of numbers, each with an appropriate header for identification and history. Any array can be plotted versus another array, and each axis labeled appropriately. For example, you may plot a reflectance spectrum versus wavelength or wavelength versus reflectance. The array type is simply a label, so data like temperature versus time can be treated just as easily as a reflectance spectrum. Some routines are specific to certain purposes, however. For example, the Planck black body generator is specific to intensity versus wavelength, whereas a smoothing routine could operate equally on reflectance versus wavelength or temperature versus time.
Each array element can have an error bar associated with it and errors are propagated through all appropriate routines. Data points can be marked deleted and deleted points are tracked appropriately. These features allow the program to be effectively used on real world data.
This philosophy has resulted in a flexible system for which a user can manipulate data arrays efficiently. The program was designed for analysis of laboratory, field, telescopic, and spacecraft spectroscopic data, and although general in nature, there are biases built in. For example, horizontal axis labels default to wavelength in micrometers, but the defaults can be changed.
Because of the orientation in Specpr to process planetary and terrestrial data, and the need to access such data, Specpr has been extended to have access to non-Specpr default file types. In particular, Specpr can "skewer" an 3-dimensional (3D) data file along any of the three axes. Further, block skewers can be done with the standard deviation of the mean computed for each channel in the block. Currently, Specpr can access any of the standard file types common in the terrestrial and planetary remote sensing communities. Details on 3D file I/O are given in Chapter 6.
Specpr has multiple record types available within a single Specpr data file. Currently defined record types are data and text. In a data record, a standard one-dimensional array is held, along with its header information. The header information includes a title, history, dates and time of data acquisition and when the data were last processed, the user who processed the data, information typical of a spectrum like temperature and viewing geometry, as well as pointers to wavelengths, resolution, and text. If a spectrum is more than 256 channels in length, then the data gets put in succeeding records in the file, and the following records are continuation records.
The second record type is the text, where a title and a block of text (up to 19 kbytes) can be stored. This record type is typically used for a description of samples, experiments, instruments, or data processing for a particular data set. It could also store the actual commands used to create a spectrum. The commands for a complicated plot for a publication might be stored in a text record. That way, you can easily regenerate the plot, or even write the commands to a non-Specpr file, modify them with any editor and re-execute them.
The file types, text and command processing, combined with the math and special functions, provide for very powerful and general analysis tool. These facilities also provide the framework for database management.
Citation Information
Publication Year | 1993 |
---|---|
Title | SPECtrum Processing Routines User's Manual Version 3 (program SPECPR) |
DOI | 10.3133/ofr93595 |
Authors | Roger N. Clark |
Publication Type | Report |
Publication Subtype | USGS Numbered Series |
Series Title | Open-File Report |
Series Number | 93-595 |
Index ID | ofr93595 |
Record Source | USGS Publications Warehouse |
USGS Organization | Geology, Geophysics, and Geochemistry Science Center |