def assess_fitting_results(basename, cormap_alpha=<NUM_LIT>):
plt.figure(figsize=(<NUM_LIT:12>, <NUM_LIT:4>))<EOL>plt.subplot2grid((<NUM_LIT:1>, <NUM_LIT:4>), (<NUM_LIT:0>, <NUM_LIT:0>), colspan=<NUM_LIT:2>)<EOL>fir = np.loadtxt(basename + '<STR_LIT>', skiprows=<NUM_LIT:1>)  <EOL>pvalf, Cf, cormapf = cormaptest(fir[:, <NUM_LIT:1>], fir[:, <NUM_LIT:3>])<EOL>cormapstatusf = ['<STR_LIT>', '<STR_LIT>'][pvalf >= cormap_alpha]<EOL>plt.errorbar(fir[:, <NUM_LIT:0>], fir[:, <NUM_LIT:1>], fir[:, <NUM_LIT:2>], None, '<STR_LIT>', label='<STR_LIT>')<EOL>plt.plot(fir[:, <NUM_LIT:0>], fir[:, <NUM_LIT:3>], '<STR_LIT>', label='<STR_LIT>')<EOL>chi2 = calc_chi2(fir[:, <NUM_LIT:1>], fir[:, <NUM_LIT:2>], fir[:, <NUM_LIT:3>])<EOL>R2 = calc_R2(fir[:, <NUM_LIT:1>], fir[:, <NUM_LIT:3>])<EOL>try:<EOL><INDENT>skiprows = <NUM_LIT:0><EOL>while True:<EOL><INDENT>try:<EOL><INDENT>fit = np.loadtxt(basename + '<STR_LIT>', skiprows=skiprows)  <EOL>break<EOL><DEDENT>except ValueError as ve:<EOL><INDENT>if ve.args[<NUM_LIT:0>].startswith('<STR_LIT>'):<EOL><INDENT>skiprows += <NUM_LIT:1><EOL>continue<EOL><DEDENT>else:<EOL><INDENT>raise<EOL><DEDENT><DEDENT><DEDENT>smoothed = fit[(fit[:, <NUM_LIT:0>] >= fir[:, <NUM_LIT:0>].min()) & (fit[:, <NUM_LIT:0>] <= fir[:, <NUM_LIT:0>].max()), <NUM_LIT:1>]<EOL>pvals, Cs, cormaps = cormaptest(fir[:, <NUM_LIT:1>], smoothed)<EOL>cormapstatuss = ['<STR_LIT>', '<STR_LIT>'][pvals >= cormap_alpha]<EOL>plt.plot(fit[:, <NUM_LIT:0>], fit[:, <NUM_LIT:1>], '<STR_LIT>', label='<STR_LIT>')<EOL>plt.plot(fit[:, <NUM_LIT:0>], fit[:, <NUM_LIT:2>], '<STR_LIT>', label='<STR_LIT>')<EOL><DEDENT>except ValueError as ve:<EOL><INDENT>print('<STR_LIT>'.format(basename, ve))<EOL><DEDENT>except FileNotFoundError:<EOL><INDENT>fit = None<EOL>cormaps = cormapstatuss = pvals = Cs = None<EOL><DEDENT>plt.xscale('<STR_LIT>')<EOL>plt.yscale('<STR_LIT>')<EOL>plt.legend(loc='<STR_LIT>')<EOL>plt.grid(which='<STR_LIT>')<EOL>if fit is not None:<EOL><INDENT>plt.subplot2grid((<NUM_LIT:1>, <NUM_LIT:4>), (<NUM_LIT:0>, <NUM_LIT:2>))<EOL>plt.imshow(cormaps, cmap='<STR_LIT>', interpolation='<STR_LIT>')<EOL>plt.title('<STR_LIT>')<EOL><DEDENT>plt.subplot2grid((<NUM_LIT:1>, <NUM_LIT:4>), (<NUM_LIT:0>, <NUM_LIT:3>))<EOL>plt.imshow(cormapf, cmap='<STR_LIT>', interpolation='<STR_LIT>')<EOL>plt.title('<STR_LIT>')<EOL>print('<STR_LIT>', R2)<EOL>print('<STR_LIT>', chi2)<EOL>if fit is not None:<EOL><INDENT>print('<STR_LIT>'.format(cormapstatuss, pvals, Cs, cormaps.shape[<NUM_LIT:0>]))<EOL><DEDENT>print('<STR_LIT>'.format(cormapstatusf, pvalf, Cf, cormapf.shape[<NUM_LIT:0>]))<EOL>
Assess the results of a fit based on the .fit and .fir files created by
    various programs from the ATSAS suite.