Verified Commit 8e3c8148 authored by Marco Kurzynski's avatar Marco Kurzynski
Browse files

moved WN back into __init__.py and fixed help menu formatting

parent 5397ca23
......@@ -12,4 +12,7 @@ def set_env():
os.environ.setdefault('TOSIB', '0.0 0.0 0.0')
os.environ.setdefault('NRNGS', '1')
os.environ.setdefault('C1_WN', '900 1100')
os.environ.setdefault('C2_WN', '2100 2200')
set_env()
......@@ -460,17 +460,9 @@ def process_helper(channel_number, channel_file, records, NBBtemp=None, IBBtemp
if NRNGS >= 2:
logger.error("Add more code :)")
try:
WN = str.strip(os.environ.get(f'C{channel_number}_WN'))
except TypeError:
if channel_number == 1:
WN = '900 1100'
else:
WN = '2100 2200'
WN = str.strip(os.environ.get(f'C{channel_number}_WN'))
# Lower bound of spectral range
WNLO = int(str.split(WN)[0])
# Higher bound of spectral range
WNHI = int(str.split(WN)[1])
......
......@@ -632,25 +632,26 @@ if __name__ == '__main__':
######################################################################
# Argument Parsing
parser = argparse.ArgumentParser(description='Generate cal val plots for IBB and NBB. The first record is record 1\n' \
'The following are optional environmental variables you can set:\n' \
'IDNBB - (IDK)\n' \
'IDIBB - (IDK)\n' \
'NBEMFL - (IDK)\n' \
'IBEMFL - (IDK)\n' \
'CAVFAC2 - (IDK)\n' \
'WTNB - (IDK)\n' \
'TOSNB - (IDK)\n' \
'WTIB - (IDK)\n' \
'TOSIB - (IDK)\n' \
'NRNGS - (IDK)\n\n' \
'C1_MLTFILE - MLT output filename for channel 1\n' \
'C1_LOGFILE - Log output filename for channel 1\n' \
'C1_SUMFILE - Sum output filename for channel 1\n' \
'C1_WN - lower and upper wavenumber for channel 1 (ex. default is "900 1100")\n\n' \
'C2_MLTFILE - MLT output filename for channel 2\n' \
'C2_LOGFILE - Log output filename for channel 2\n' \
'C2_SUMFILE - Sum output filename for channel 2\n' \
'C2_WN - lower and upper wavenumber for channel 2 (ex. default is "2100 2200")'
'environmental variables:\n' \
'\tIDNBB\t\t\t(IDK)\n' \
'\tIDIBB\t\t\t(IDK)\n' \
'\tNBEMFL\t\t\t(IDK)\n' \
'\tIBEMFL\t\t\t(IDK)\n' \
'\tCAVFAC2\t\t\t(IDK)\n' \
'\tWTNB\t\t\t(IDK)\n' \
'\tTOSNB\t\t\t(IDK)\n' \
'\tWTIB\t\t\t(IDK)\n' \
'\tTOSIB\t\t\t(IDK)\n' \
'\tNRNGS\t\t\t(IDK)\n\n' \
'\tC1_MLTFILE\t\t\tMLT output filename for channel 1\n' \
'\tC1_LOGFILE\t\t\tLog output filename for channel 1\n' \
'\tC1_SUMFILE\t\t\tSum output filename for channel 1\n' \
'\tC1_WN\t\t\tlower and upper wavenumber for channel 1 (ex. default is "900 1100")\n\n' \
'\tC2_MLTFILE\t\t\tMLT output filename for channel 2\n' \
'\tC2_LOGFILE\t\t\tLog output filename for channel 2\n' \
'\tC2_SUMFILE\t\t\tSum output filename for channel 2\n' \
'\tC2_WN\t\t\tlower and upper wavenumber for channel 2 (ex. default is "2100 2200")',
formatter_class=argparse.RawTextHelpFormatter
)
parser.add_argument("input", help="Channel 1 input filename in HHMMSSC1.RNC format. Realtive or absolute path")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment