Skip to main content
U.S. flag

An official website of the United States government

SPECtrum Processing Routines (SPECPR)

September 8, 1993

Specpr Features:

  • Extensive users manual.
  • Axes selectable (e.g., intensity versus wavelength, or temperature versus time, etc.).
  • Multiple "wavelength" sets accommodated simultaneously.
  • Millions of spectra online.
  • Variable length spectra (x,y paired data) up to 4852 channels per segment.
  • Header information: 512 bytes per segment to describe data plus unlimited additional text for documenting analyses.
  • Bit flags to define new data file formats.
  • Selectable file protection: read/write random access; write protected--read random; read random--write sequential at end of data.
  • Protective locks on specpr files in one directory.
  • History of all operations performed on each spectrum.
  • Selective data file list; data list and plotting.
  • Relational searches among different fields in data file.
  • Restart with same setup as when last exited program.
  • Selectable graphics options (X-windows, graphics terminal support).

User Interface

  • Menu driven; most commands are a single character.
  • Large help menus can be turned on or off.
  • Totally free format input, mixed characters and numbers.
  • Software intelligent checking of all user input.
  • Aliases: customize commands or command sequences with words up to 15 characters long.
  • Aliases can contain alias and variable translations.
  • History of all operations performed on each spectrum.
  • Command history and re-execution
  • Batch command file execution can begin and end at any point.
  • Nested command files can be used like subroutines.
  • Editing of command file.
  • Read or write commands from or to a text file and into specpr text record (commands can be kept with the data).
  • Variable substitution from command history to current command.
  • Current program status, files online, file protection.
  • Escape from specpr to run other system and user programs.
  • Designed so data cannot be inadvertently destroyed.

Analysis Routines

  • Propagation of errors (standard deviation analysis).
  • All routines: support of deleted point flags.
  • Sequential operation processor (saves user typing).
  • Multiplication, division, addition, subtraction.
  • Sines, cosines, tangents and inverses in degrees or radians.
  • Natural and common logarithms.
  • Powers: exp(x), 10x, xc and cx where c=constant, x=data.
  • Inverse (1/x), absolute value, integer and fractional part.
  • Hyperbolic sine, cosine, and tangent.
  • Shift data left or right a number of channels.
  • Continuum removal.
  • Compute Planck black body function.
  • Smooth data.
  • Data channel--data record transpose (2D matrix rotation).
  • Absorption band removal.
  • Sort data into increasing wavelength order.
  • Lunar thermal removal from reflectance spectra.
  • Cubic spline interpolation to new wavelength set.
  • Derivative of a spectrum.
  • Merge 2 data arrays.
  • Edit data and error bars.
  • User line segment data array generation.
  • High to low resolution spectral convolution (arbitrary bandpass function).
  • High to low resolution spectral convolution (Gaussian bandpass function).
  • Block averages and statistics.
  • Polynomial least squares fit routine.
  • Read/write data from/to a text file (a quick and easy interface to other programs).
  • Calculate N term polynomial (N<256).
  • Digitize spectra: tablet input routine.
  • Thermal removal from a star-moon flux ratio.
  • Extinction analysis, and correction.
  • Band normalization (scale array to unity over a given band).
  • FFT and inverse FFT (number of channels does not have to be a power of 2).
  • Interactive absorption band analysis: continuum removal, determine band position, width, depth and asymmetry; write results to a data file and use with a database for spectral feature analysis.
  • spectral feature analysis routines
  • spectral feature fit to library spectral features
  • segmented upper hull continuum
  • wavelength registration
  • extinction calculations for astronomical work
  • others
screenshot of software plot
Spectrometry data from several authors and at several different spectral resolutions is shown for the Galilean satellite Europa from Clark and McCord (1980). This plot was completely generated by the program SPECPR in about seven minutes. The user can choose the wavelength interval, scaling, data-point type and size, whether or not to connect points or include error bars. The user can also input text at anv angle of the plot. Figure 1 from Clark, 1980, https://doi.org/10.1086/130652.

Plotting

  • All plots: program automatic "nice" numbering of axes.
  • Publication quality plots: selectable lines, symbols, text, plot scale and size, overlay spectra on one plot, bad data deletion.
  • HP-pen plotter, HPGL printers (HP laserjets, designjets), postscript support
  • Graphics terminal plotting:
    • rescaling, windowing, glitch removal, bad data deletion, overlay different spectra, line printer plots and data list, selectable line type, autoscale, plotting data values versus channel, "wavelength", or "inverse wavelength".
    • Graphics cursor read routines to determine data point values.
    • HP2623A compatible and Tektronix Plot 10 compatible support.
    • Generic alphanumeric terminal support (gives crude graphs).
  • X-windows

Anonymous ftp directory for Specpr, Radtran source code

The specpr directory contains specpr and related source code: ftp://ftpext.cr.usgs.gov/pub/cr/co/denver/speclab/pub/specpr

The specpr.tar.Z file contains all the specpr, radtran, and related directories, with no modules compiled. To get specpr going on your machine, you need this tar file. Put it on your machine, uncompress it and untar it.

Then, to save you time in compiling specpr, you can get the specific machine compiled version, such as src.specpr.solaris.tar.Z for solaris. These files contain only the src.specpr files, already compiled with all the .o and .a files already made. Get the file appropriate for yopur machine, and tar it over the src.specpr directory located in the specpr.tar.

Once you get specpr going, get the DEMO.tar.Z and uncompress and untar the file and run the demos. It shows you a lot about how specpr works.

Radtran is radiative transfer mineral mixture reflectance computations.

References

Clark, R. N., 1980, A large scale interactive one dimensional array processing system: Publications of the Astronomical Society of the Pacific, 92, p. 221-224.

Clark, R.N., 1993, SPECtrum Processing Routines User's Manual Version 3 (program SPECPR): U.S. Geological Survey Open-File Report 93-595, 210 p., https://doi.org/10.3133/ofr93595.

 

Return to: Spectroscopy Lab | Geology, Geophysics, and Geochemistry Science Center

Publication Year 1993
Title SPECtrum Processing Routines (SPECPR)
Product Type Software Release
Record Source USGS Digital Object Identifier Catalog