SSHBinner

As mentioned before a SSHBinner can be created using SSHBinner(N_bins), where N_bins is the requested number of bins. Typically the binner will have slightly more or less bins as it optimizes the shape and size of each bin.

Beyond this a binner can also be created from the bins of another binner. This is useful for saving and loading it. Instead of saving the whole structure, you may save just binner.bins and recover the full object using SSHBinner(bins).

SphereSurfaceHistogram.SSHBinnerMethod
SSHBinner(bins)

Generate a Sphere Surface Histogram Binner using the bins of another SSHBinner. This effectively creates a copy of the other source SSHBinner.

source

You can also pick between two algorithms for generating bins. This can be done by using the method keyword argument in SSHBinner to pass either

SphereSurfaceHistogram.partition_sphere1Function
partition_sphere1(dA)

Partitions a sphere into bins of size dA where number of divisions in ϕ (0..2π) is not restricted, i.e. it can be any integer.

Note that for a random dA this will not produce equally sized bins. (Specifically bins at z ≈ 0 will be wrong.) The algorithm relies on partition_sphere_optim to optimize dA to a value fitting on the sphere surface which happens during the creation of an SSHBinner.

source
SphereSurfaceHistogram.partition_sphere2Function
partition_sphere2(dA)

Partitions a sphere into bins of size dA where number of divisions in ϕ (0..2π) is restricted to a power of 2.

Note that for a random dA this will not produce equally sized bins. (Specifically bins at z ≈ 0 will be wrong.) The algorithm relies on partition_sphere_optim to optimize dA to a value fitting on the sphere surface which happens during the creation of an SSHBinner.

source

Note that both methods are optimized by another function, so that the area of each bin is equal.

SSHAverager

The SSHAverager follows the same interface and provides the same methods:

SphereSurfaceHistogram.SSHAveragerMethod
SSHAverager(sums, counts)

Generate a Sphere Surface Histogram Averager using the bins of another SSHAverager. This effectively creates a copy of the other source SSHAverager.

source