Miscellaneous#

crop(x, y[, lower, upper])

Return x,y data where lower <= x <= upper

convert_cosine_to_angles(cos_angles, y_data)

Convert data given as a cosine to radians

integral_sum(bincenters, y_data[, lower, upper])

Get the integral of a histogram by summing the counts weighted by the binsize.

integral_polyfit(x, y[, lower, upper, ...])

Get the integral of the data.

edges_to_centers(edges)

Return centers of bins discribed by edges.

centers_to_edges(centers[, lower, upper])

Work out bin edges from bin centers.

work_out_bin_edges(centers[, lower, upper])

Alias for centers_to_edges().

sample_distribution(edges, values, size)

Sample a distribution described by edges and values.

sample_distribution_func(f, size, xlimits, ...)

Sample a distribution described by f.

sample_distribution_discrete(values, ...)

Sample a discrete distribution of values, where the probability is given by probabilities.

get_all_dividers(n)

Return possible rebins of the integer n.

for_pcolormesh(x, y, z[, permuting, xmin, ...])

Convert xyz-data such that it can be plotted with matplotlib.pyplot.pcolormesh().

for_imshow(x, y, z[, permuting, origin])

Convert xyz-data such that it can be plotted with matplotlib.pyplot.imshow().

eval_yl0_polynomial(thetas, *coeffs)

Evaluate a polynomial of spherical harmonics.

fit_yl0_polynomial(thetas, intensity, degree)

Fit data to a polynomial of \(\sum_l Y_l^0(\theta, 0)\)