#! /usr/bin/env python
from __future__ import print_function, division
import pandas as pd
import matplotlib.pyplot as plt
"""plot the histgram of chisq distribution of the fit
"""

if __name__ == '__main__':
    fn125 = '2015_Jun_24TinyTimF125Result.csv'
    fn160 = '2015_Jun_24TinyTimF160Result.csv'
    df125 = pd.read_csv(
        fn125, parse_dates={'datetime': ['OBSDATE', 'OBSTIME']},
        index_col='datetime').sort_index()
    df160 = pd.read_csv(
        fn160, parse_dates={'datetime': ['OBSDATE', 'OBSTIME']},
        index_col='datetime').sort_index()
    fig1 = plt.figure()
    ax = plt.add_subplot()
    ax.hist(df125['CHISQ'].values)
