# Path: arsf_envi_reader/envi_header.py
# ENVI_TO_NUMPY_DTYPE = {'1':  numpy.uint8,
#                        '2':  numpy.int16,
#                        '3':  numpy.int32,
#                        '4':  numpy.float32,
#                        '5':  numpy.float64,
#                        '6':  numpy.complex64,
#                        '9':  numpy.complex128,
#                        '12': numpy.uint16,
#                        '13': numpy.uint32,
#                        '14': numpy.int64,
#                        '15': numpy.uint64}
# def find_hdr_file(rawfilename):
# def read_hdr_file(hdrfilename, keep_case=False):
# def write_envi_header(filename, header_dict):


import argparse
import csv
import os
import sys
import matplotlib.pyplot as plt
import re
import numpy as np
import glob
from arsf_envi_reader import envi_header
                'binning' : {'xlabel':'File Index','ylabel':'Spectral binning factor','filename':'binning.png'},
                'temp' : {'xlabel':'File Index','ylabel':'Temperature of detector (K)','filename':'temp.png'}
    }

    # Set up values to plot
    nbands = []
    nsamples = []
    nlines = []
    fps = []
    tint = []
    tint1 = []
    tint2 = []
    binning = []
    binning2 = []
    temp = []
    dates = []
    start_times = []
    stop_times = []

    for each_hdr in args.inputfiles:
        # Check a header file has been provided.
        if os.path.splitext(each_hdr)[-1].lower() != '.hdr':
            print('Must provide header file as input (ending with ".hdr")',
                  file=sys.stderr)
            sys.exit(1)
        if not os.path.isfile(each_hdr):
            print('Could not open input header ({})'.format(each_hdr),
                  file=sys.stderr)
            sys.exit(1)


# Path: arsf_envi_reader/envi_header.py
# ENVI_TO_NUMPY_DTYPE = {'1':  numpy.uint8,
#                        '2':  numpy.int16,
#                        '3':  numpy.int32,
#                        '4':  numpy.float32,
#                        '5':  numpy.float64,
#                        '6':  numpy.complex64,
#                        '9':  numpy.complex128,
#                        '12': numpy.uint16,
#                        '13': numpy.uint32,
#                        '14': numpy.int64,
#                        '15': numpy.uint64}
# def find_hdr_file(rawfilename):
# def read_hdr_file(hdrfilename, keep_case=False):
# def write_envi_header(filename, header_dict):


# Path: plot_info_from_headers.py
import argparse
import csv
import os
import sys
import matplotlib.pyplot as plt
import re
import numpy as np
import glob
from arsf_envi_reader import envi_header

                'binning' : {'xlabel':'File Index','ylabel':'Spectral binning factor','filename':'binning.png'},
                'temp' : {'xlabel':'File Index','ylabel':'Temperature of detector (K)','filename':'temp.png'}
    }

    # Set up values to plot
    nbands = []
    nsamples = []
    nlines = []
    fps = []
    tint = []
    tint1 = []
    tint2 = []
    binning = []
    binning2 = []
    temp = []
    dates = []
    start_times = []
    stop_times = []

    for each_hdr in args.inputfiles:
        # Check a header file has been provided.
        if os.path.splitext(each_hdr)[-1].lower() != '.hdr':
            print('Must provide header file as input (ending with ".hdr")',
                  file=sys.stderr)
            sys.exit(1)
        if not os.path.isfile(each_hdr):
            print('Could not open input header ({})'.format(each_hdr),
                  file=sys.stderr)
            sys.exit(1)


        header_dict = envi_header.read_hdr_file(each_hdr)