This module provides MODTRAN tape7 file reading. Future development may include a class to write tape5 files, but that is a distant target at present.
See the __main__ function for examples of use.
This package was partly developed to provide additional material in support of students and readers of the book Electro-Optical System Analysis and Design: A Radiometry Perspective, Cornelius J. Willers, ISBN 9780819495693, SPIE Monograph Volume PM236, SPIE Press, 2013. http://spie.org/x648.html?product_id=2021423&origin_id=x646
Modifies the column header string to be compatible with numpy column lookup.
Read the Modtran tape7 file. This function was tested with Modtran5 files.
This function reads in the tape7 file from MODerate spectral resolution atmospheric TRANsmission (MODTRAN) code, that is used to model the propagation of the electromagnetic radiation through the atmosphere. tape7 is a primary file that contains all the spectral results of the MODTRAN run. The header information in the tape7 file contains portions of the tape5 information that will be deleted. The header section in tape7 is followed by a list of spectral points with corresponding transmissions. Each column has a different component of the transmission or radiance. For more detail, see the modtran documentation.
The user selects the appropriate columns by listing the column names, as listed below.
The format of the tape7 file changes for different IEMSCT values. For the most part the differences are hidden in the details. The various column headers used in the tape7 file are as follows:
IEMSCT = 0 has two column header lines. In order to select the column, you must concatenate the two column headers with an underscore in between. All columns are available with the following column names: [‘FREQ_CM-1’, ‘COMBIN_TRANS’, ‘H2O_TRANS’, ‘UMIX_TRANS’, ‘O3_TRANS’, ‘TRACE_TRANS’, ‘N2_CONT’, ‘H2O_CONT’, ‘MOLEC_SCAT’, ‘AER+CLD_TRANS’, ‘HNO3_TRANS’, ‘AER+CLD_abTRNS’, ‘-LOG_COMBIN’, ‘CO2_TRANS’, ‘CO_TRANS’, ‘CH4_TRANS’, ‘N2O_TRANS’, ‘O2_TRANS’, ‘NH3_TRANS’, ‘NO_TRANS’, ‘NO2_TRANS’, ‘SO2_TRANS’, ‘CLOUD_TRANS’, ‘CFC11_TRANS’, ‘CFC12_TRANS’, ‘CFC13_TRANS’, ‘CFC14_TRANS’, ‘CFC22_TRANS’, ‘CFC113_TRANS’, ‘CFC114_TRANS’, ‘CFC115_TRANS’, ‘CLONO2_TRANS’, ‘HNO4_TRANS’, ‘CHCL2F_TRANS’, ‘CCL4_TRANS’, ‘N2O5_TRANS’]
IEMSCT = 1 has single line column headers. A number of columns have headers, but with no column numeric data. In the following list the columns with header names ** are empty and hence not available: [‘FREQ’, ‘TOT_TRANS’, ‘PTH_THRML’, ‘THRML_SCT’, ‘SURF_EMIS’, SOL_SCAT, SING_SCAT, ‘GRND_RFLT’, DRCT_RFLT, ‘TOTAL_RAD’, REF_SOL, SOL@OBS, ‘DEPTH’, ‘DIR_EM’, TOA_SUN, ‘BBODY_T[K]’]. Hence, these columns do not have valid data: [‘SOL_SCAT’, ‘SING_SCAT’, ‘DRCT_RFLT’, ‘REF_SOL’, 'SOL@OBS‘, ‘TOA_SUN’]
IEMSCT = 2 has single line column headers. All the columns are available: [‘FREQ’, ‘TOT_TRANS’, ‘PTH_THRML’, ‘THRML_SCT’, ‘SURF_EMIS’, ‘SOL_SCAT’, ‘SING_SCAT’, ‘GRND_RFLT’, ‘DRCT_RFLT’, ‘TOTAL_RAD’, ‘REF_SOL’, 'SOL@OBS‘, ‘DEPTH’, ‘DIR_EM’, ‘TOA_SUN’, ‘BBODY_T[K]’]
IEMSCT = 3 has single line column headers. One of these seems to be two words, which, in this code must be concatenated with an underscore. There is also additional column (assumed to be depth in this code). The columns available are [‘FREQ’, ‘TRANS’, ‘SOL_TR’, ‘SOLAR’, ‘DEPTH’]
The tape7.scn file has missing columns, so this function does not work for tape7.scn files. If you need a tape7.scn file with all the columns populated you would have to use the regular tape7 file and convolve this to lower resolution.
Modifies the column headers to be compatible with numpy column lookup.