calc_b_from_periastron ====================== .. py:function:: luminet.black_hole_math.calc_b_from_periastron(p: float, bh_mass: float) -> float Get impact parameter :math:`b` from the photon periastron :math:`P` .. math:: b = \sqrt{\frac{P^3}{P - 2M}} :Parameters: * **p** (*float*) -- periastron distance * **bh_mass** (*float*) -- Black hole mass .. attention:: :cite:t:`Luminet_1979` has a typo here. The fraction on the right hand side equals :math:`b^2`, not :math:`b`. You can verify this by filling in :math:`u_2` in Equation 3. Only this way do the limits :math:`P -> 3M` and :math:`P >> M` hold true, as well as the value for :math:`b_c`. The resulting images of the paper are correct though. :returns: *float* -- Impact parameter :math:`b`