pysofft.stats
pysofft.stats
Classes:
| Name | Description |
|---|---|
CharView |
Helper class that allows to acces a characteristic function \(M_{l,n,k}\) by its indices l,n,k. |
CharFuncSO3 |
A class to represent Charactersitic functions \(M_{lnk}\) of distributions \(\rho(\alpha,\beta,\gamma)\) on SO(3). |
CharFuncFactory |
Factory that can create various characteristic functions of probability distribitions on SO(3) |
CharView
[source]
Helper class that allows to acces a characteristic function \(M_{l,n,k}\) by its indices l,n,k. i.e. charview[l,n,k] returns \(M_{l,n,k}\). It is also possible to use slice notation i.e. charview[:,0,:] returns a view into \(M_{l,n,k}\) corresponding to all values with n=0.
Attributes:
| Name | Type | Description |
|---|---|---|
bw |
int
|
|
Bandwidth |
|
|
array |
(ndarray, ((4 * bw ** 4 - bw) / 3,), complex)
|
|
characteristic function array |
|
|
ls |
(ndarray, (bw,), int64)
|
|
l indices 0,...,bw |
|
|
ns |
(ndarray, 2 * bw + 1, int64)
|
|
n indices 0,...,bw,-bw+1,...,-1 |
|
|
ks |
(ndarray, 2 * bw + 1, int64)
|
|
k indices 0,...,bw,-bw+1,...,-1 |
|
|
_lnks |
(ndarray, (3, (4 * bw ** 4 - bw) / 3), int64)
|
|
l,n,k value grid |
|
|
_lookups |
(ndarray, ((4 * bw ** 4 - bw) / 3,), int64)
|
|
array ids associated to each entry of _lnks |
|
CharFuncSO3
[source]
Bases: ndarray
A class to represent Charactersitic functions \(M_{lnk}\) of distributions \(\rho(\alpha,\beta,\gamma)\) on SO(3). $\(M_{lnk} = \int_{SO(3)} \rho(\alpha,\beta,\gamma) D^l_{nk}(\alpha,\beta,\gamma) sin(\beta)\,d\alpha d\beta d\gamma\)$ where \(D^l_{nk}(\alpha,\beta,\gamma)\) are Wigner-D matrices.
Acts as a normal numpy array with additional attributes
Attributes:
| Name | Type | Description |
|---|---|---|
bw |
int
|
|
Bandwidth of the distribution. |
|
|
soft |
Soft
|
|
Fourier transform instance on SO(3) |
|
|
Methods |
|
|
lnk |
CharView
|
|
allows to acces $M_{lnk}$ by its indices l,n,k |
|
|
distrib |
(ndarray, (2 * bw,) * 3, complex)
|
|
property that calculates the SO3 distribution by inverse fourier transform of the current characteristic function. |
|
Methods:
| Name | Description |
|---|---|
mean |
Computes the average of a scalar/ndarray valued function on SO3 using the current probability distribution. |
mean_density |
Expects the density to be of shape (…,Nr,Ntheta,Nphi) where the last three dimensions correspond to the spherical coordinates and … can be any shape |
mean_spherical_coeff |
Expects input coeff to be stored in a 1d array with the l,m's coefficient beeing at location $ l(l+1)+m $. |
mean(so3_function)
[source]
Computes the average of a scalar/ndarray valued function on SO3 using the current probability distribution. Expects the function values to be given in the shape shape (M1,…,Mn,2bw,2bw,2bw) and (2bw,2bw,2bw) for scalar functions. Where bw is the bandwidth of the this probability distribution i.e. self._soft.bw and M1,…,Mn are the value array dimensions)
mean_density(density)
[source]
Expects the density to be of shape (…,Nr,Ntheta,Nphi) where the last three dimensions correspond to the spherical coordinates and … can be any shape
mean_spherical_coeff(spherical_harmonic_coeff)
[source]
Expects input coeff to be stored in a 1d array with the l,m's coefficient beeing at location $ l(l+1)+m $.