commonly used code for plotting and analysis
Functions
bin_up (data_bin_by, data_for_percentile[, …]) |
bins “data_for_percentile” into “nbins” based on “data_bin_by” |
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) |
converts nanomaggies to AB mag |
mag2flux (ABmag) |
converts AB mag to nonomaggies |
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” based on “data_bin_by”
Returns: | (bin center,N,q25,50,75) for each bin |
---|---|
Return type: | tuple |
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