PYME.Analysis.binAvg module

PYME.Analysis.binAvg.binAvg(binVar, indepVar, edges)

Take the binned average of values in indepVar binned according to their corresponding entries in binVar and a given set of edges.

Parameters
binVarndarray

array which is used, in combination with edges, to determine bin membership.

indepVarndarray

array of the independent variable, to be averaged within each bin. Must be the same size as binVar.

edgesndarray

array of bin edges

Returns
bnint ndarray

Number of elements within each bin

bmfloat ndarray

Mean value of indepVar within each bin

bsfloat ndarray

Standard deviation of indepVar within each bin

PYME.Analysis.binAvg.binMedian(binVar, indepVar, edges)

Take the binned median of values in indepVar binned according to their corresponding entries in binVar and a given set of edges.

Parameters
binVarndarray

array used, in combination with edges, to determine bin membership.

indepVarndarray

array of the independent variable, to have the median calculated within each bin. Must be the same size as binVar.

edgesndarray

array of bin edges

Returns
bnint ndarray

Number of pixels within each bin

bmfloat ndarray

Median value of indepVar within each bin

bsfloat ndarray

Standard deviation of indepVar within each bin

PYME.Analysis.binAvg.binned_average(binVar, indepVar, edges)

Take the binned average of values in indepVar binned according to their corresponding entries in binVar and a given set of edges.

Parameters
binVarndarray

array which is used, in combination with edges, to determine bin membership.

indepVarndarray

array of the independent variable, to be averaged within each bin. Must be the same size as binVar.

edgesndarray

array of bin edges

Returns
bnint ndarray

Number of elements within each bin

bmfloat ndarray

Mean value of indepVar within each bin

bsfloat ndarray

Standard deviation of indepVar within each bin

PYME.Analysis.binAvg.binned_median(binVar, indepVar, edges)

Take the binned median of values in indepVar binned according to their corresponding entries in binVar and a given set of edges.

Parameters
binVarndarray

array used, in combination with edges, to determine bin membership.

indepVarndarray

array of the independent variable, to have the median calculated within each bin. Must be the same size as binVar.

edgesndarray

array of bin edges

Returns
bnint ndarray

Number of pixels within each bin

bmfloat ndarray

Median value of indepVar within each bin

bsfloat ndarray

Standard deviation of indepVar within each bin

PYME.Analysis.binAvg.errorPlot(filter, bins)