Conversions and calculations¶
Convert degree into rad and vice versa¶
- PyAstronomy.pyaC.degtorad(d)¶
Convert degrees into radians.
- Parameters
- dfloat or array
Angle in degrees.
- Returns
- Anglefloat or array
The angle converted into radians.
- PyAstronomy.pyaC.radtodeg(r)¶
Convert radians into degrees.
- Parameters
- dfloat or array
Angle in radians.
- Returns
- Anglefloat or array
The angle converted into degrees.
Compute ratio of factorials¶
- PyAstronomy.pyaC.farat(x, y)¶
Compute ratio of factorials.
Computes x!/y! via ln(x!) - ln(y!) to avoid numerical overflow.
- Parameters
- xint, float
The factorial of x is the numerator
- yint, float
The factorial of y is the denumerator
- Returns
- Ratiofloat
The ratio x!/y! (not the logarithm).