Isis 2 Documentation
specpr2isl - Convert a SPECPR library to ISL format "specpr2isl" creates an Instrument Spectral Library (ISL) file from a SPECPR format library. It is assumed that all the spectral entries in the input SPECPR file have the same set of wavelengths and that these wavelengths are contained in the first data entry in the file. However, there are no requirements on the order of the wavelengths. The WAVESRC parameter selects whether the wavelengths of the output file should be the same as the input SPECPR file (WAVESRC=SPECPR) or should be the wavelengths recorded in a table file (WAVESRC=TABLE). When WAVESRC=SPECPR is specified, the input spectral entries are simply transferred to the output ISL file without modification. In this case, any error bar data present in the SPECPR file are also written to the output ISL file. There are two ways that the presence of error bar data can be indicated in the SPECPR file. First, the error bar flag can be set in the SPECPR spectral header. Second, the "ititl" field of the following SPECPR data entry can be "errors to previous data ". When WAVESRC=TABLE is specified, "specpr2isl" produces an ISL file that contains the wavelengths specified by a TABLE file. The TABLE file (which is normally produced by the "bandtab" program) must contain the following columns: BAND (INTEGER*4) - Original band numbers - will be recorded in the BAND_BIN_ORIGINAL_BAND keyword in the ISL file WAVELN (REAL*4) - Wavelengths (in micrometers) FWHM (REAL*4) - Full width at half maximum - will be recorded in the BAND_BIN_WIDTH keyword in the ISL file There are two options for translating the SPECPR data to the output wavelengths. TRANSMOD=CONVOLUTION selects convolution using the full width at half maximum information. If an output wavelength is outside the range of input wavelengths, then the output spectral value is set to the NULL pixel value. TRANSMOD=INTERPOLATION selects linear interpolation. Each output spectral value is computed using the input spectral values at the two wavelengths that are closest to the output wavelength. If either one or both of these two closest input values is not a valid value, then the output value is set to the NULL pixel value. If an output wavelength is outside the range of input wavelengths, then the output spectral value is set to the NULL pixel value. The NAMESEL parameter allows selecting input SPECPR spectra based on the contents of the "ititl" field of the SPECPR spectral header. If a NAMESEL value is specified, then only input spectra that contain this string within the "ititl" field will be included in the output ISL file. This is useful for processing SPECPR files in which the spectral entires contain "ABS REF" in the "ititl" field to distinguish them from "feature analysis" data. If NAMESEL is specified as the Null TAE parameter value, then all data entries in the input file are translated to the output file. When a TABLE file is being used as the source of wavelengths for the output ISL file, the INSTRUMENT_ID and INSTRUMENT_MODE_ID keywords in the ISL file are normally set to the values of these keywords in the TABLE file. The INSTID and INSTMODE parameters allow the user to specify values for these keywords that override the TABLE file values. These also allow specifying values when the source of the output wavelengths is the input SPECPR file rather than a TABLE file. If a value is not specified by an input TABLE file or a TAE parameter, then the output keyword is set to UNKNOWN. Programmer: Jim Torson, U.S.G.S., Flagstaff, AZ
Parm | Description | Default |
---|---|---|
SPECFILE | SPECPR library file name (no default extension) | "NimsLib" |
WAVESRC | Source of output wavelengths (TABLE or SPECPR) | "TABLE" |
TBLFROM | Name of TABLE file containing the band information (default extension is .tbl) | NONE |
OBJNAM | Name of the TABLE file object that contains band information | "TABLE" |
TO | Output ISL file name (default extension is .isl) | NONE |
NAMESEL | Spectrum name selection string | -- |
TRANSMOD | Mode for translation to new set of wavelengths (CONVOLUTION or INTERPOLATION) | "CONVOLUTION" |
XSPECS | Number of extra entries to allocate in ISL | 0 |
INSTID | Instrument ID | -- |
INSTMODE | Instrument mode | -- |
USERNOTE | User comment |
ADDITIONAL NOTES:
Parm | Description |
---|---|
SPECFILE | Specifies the SPECPR format library to convert. There is no default file extension for this file. It is assumed that all the spectral entries in the SPECPR file have the same set of wavelengths and that these wavelengths are contained in the first data entry in the file. |
WAVESRC | Specifies where to obtain the list of wavelengths for the output ISL file. If WAVESRC=SPECPR, then the output file will have the same wavelengths as the input SPECPR file. If WAVESRC=TABLE, then the TABLE file specified by the TBLFROM parameter is used as the source of the wavelengths. |
TBLFROM | Name of TABLE file that contains the wavelengths, full widths at half maximum, and original band numbers to be used for the output file. This table file is normally produced by the "bandtab" program. This file is used only when WAVESRC=TABLE is specified. |
OBJNAM | Name of TABLE object in the TBLFROM file that contains the BAND information that will be used to create spectra in the output ISL file. This is used only when WAVESRC=TABLE is specified. |
TO | Output ISL file name. If the file extension is omitted, then ".isl" will be assumed. |
NAMESEL | Specifies a string value that allows selecting data entires from the input SPECPR file. If this is specified as the Null TAE parameter value, then all input data entries are translated to the output file. If a string is specified, then only input data entries that contain this string within their "ititl" spectral header field are translated to the output file. Note that for some SPECPR files the string "ABS REF" is contained within the "ititl" field to distinguish spectral entries from "feature analysis" entries. |
TRANSMOD | Specifies the mode for translating from the input SPECPR wavelengths to the output ISL wavelengths. This is used only when WAVESRC=TABLE is specified. If TRANSMOD=CONVOLUTION is specified, then convolution is used. For any output wavelengths that are outside the range of input wavelengths, the output spectral value is set to the NULL pixel value. If TRANSMOD=INTERPOLATION is specified, then output spectral values are computed by linear interpolation from the input values at the two closest wavelengths. If one or both of these input values is NULL, then the output value is set to the NULL pixel value. |
XSPECS | Number of extra entries to allocate in the output ISL file. The value specified here will be added to the number of entries needed to store the input SPECPR data. This will allow the later addition of other spectra to the ISL file without the need to expand the file. |
INSTID | Specifies the value of the INSTRUMENT_ID keyword in the output ISL file. If this is not specified, then the value of the INSTRUMENT_ID keyword in the input TABLE file is used (if WAVESRC=TABLE). If no value is available, then INTRUMENT_ID is set to UNKNOWN. |
INSTMODE | Specifies the value of the INSTRUMENT_MODE_ID keyword in the output ISL file. If this is not specified, then the value of the INSTRUMENT_MODE_ID keyword in the input TABLE file is used (if WAVESRC=TABLE). If no value is available, then INTRUMENT_MODE_ID is set to UNKNOWN. |
USERNOTE | Comment from the user. This will be recorded in the ISIS session log file and also in the History entry that is put into the History object of the output file. |
Contact us online at the Isis Support Center: http://isisdist.wr.usgs.gov