thetazero
This module contains functions to calculate the angle $\theta_0$ with a normal distribution.
isotropic.thetazero
This module contains functions for generating $\theta_0$.
get_theta_zero(x, g)
Calculate the inverse angle $\theta_0$ with a normal distribution given a value x.
This function finds the angle $\theta_0$ such that the integral of g from 0 to $\theta_0$ equals x. It uses Simpson's rule for numerical integration and a bisection method to find the root.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
x
|
ArrayLike
|
Value for which to find the inverse, should be uniformly distributed in $[0, 1]$. |
required |
g
|
Callable
|
Function $g(\theta)$ that is integrated to calculate $F(\theta)$. |
required |
Returns:
Type | Description |
---|---|
float
|
Value of $\theta_0$. |
Source code in src/isotropic/thetazero.py
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
|