obiwan.qa.plots_common

Functions

bin_up(data_bin_by, data_for_percentile[, …]) bins “data_for_percentile” into “nbins” using “data_bin_by” to decide how indices are assigned to bins returns bin center,N,q25,50,75 for each bin
create_confusion_matrix(answer_type, …[, …]) compares classifications of matched objects, returns 2D array which is conf matrix and xylabels return 5x5 confusion matrix and colum/row names answer_type,predict_type – arrays of same length with reference and prediction types
eboss_ts(gmag, rz, gr[, region])
flux2mag(nmgy) return ABmag
mag2flux(ABmag) return nmgy
myannot(ax, xarr, yarr, sarr[, ha, va, fontsize]) x,y,s are iterable
myerrorbar(ax, x, y[, yerr, xerr, color, …])
myhist(ax, data[, bins, color, normed, ls, …])
myhist2D(ax, x, y[, xlim, ylim, nbins])
myhist_step(ax, data[, bins, color, normed, …])
myscatter(ax, x, y[, color, m, s, alpha, label])
myscatter_open(ax, x, y[, color, m, s, …])
mytext(ax, x, y, text[, ha, va, fontsize, …]) adds text in x,y units of fraction axis
obiwan.qa.plots_common.bin_up(data_bin_by, data_for_percentile, bin_minmax=(18.0, 26.0), nbins=20)[source]

bins “data_for_percentile” into “nbins” using “data_bin_by” to decide how indices are assigned to bins returns bin center,N,q25,50,75 for each bin

obiwan.qa.plots_common.create_confusion_matrix(answer_type, predict_type, poss_ans_types=['PSF', 'SIMP', 'EXP', 'DEV', 'COMP', 'REX'], poss_pred_types=['PSF', 'SIMP', 'EXP', 'DEV', 'COMP', 'REX'])[source]

compares classifications of matched objects, returns 2D array which is conf matrix and xylabels return 5x5 confusion matrix and colum/row names answer_type,predict_type – arrays of same length with reference and prediction types

obiwan.qa.plots_common.flux2mag(nmgy)[source]

return ABmag

obiwan.qa.plots_common.mag2flux(ABmag)[source]

return nmgy

obiwan.qa.plots_common.myannot(ax, xarr, yarr, sarr, ha='left', va='bottom', fontsize=20)[source]

x,y,s are iterable

obiwan.qa.plots_common.mytext(ax, x, y, text, ha='left', va='center', fontsize=20, rotation=0, color='k', dataCoords=False)[source]

adds text in x,y units of fraction axis