Package ivs :: Package sed :: Module distance
[hide private]
[frames] | no frames]

Module distance

source code

Calculate the distance to a star with Lutz-Kelker bias

Functions [hide private]
3-tuple
rho(z, z_sun=20.0, hd=31.8, hh=490., sigma=1.91e-3, f=0.039)
Stellar galactic density function.
source code
 
probability_cd(r, plx, e_plx)
Compute the probability for an object to be at distance r (pc), given its parallax (mas) and error on the parallax (mas) and a constant density function.
source code
 
distprob(r, theta, plx, **kwargs)
Compute the probability for an object to be located at a distance r (pc), given its parallax and galactic lattitude.
source code
Variables [hide private]
  logger = logging.getLogger("IVS.DIST")
Function Details [hide private]

rho(z, z_sun=20.0, hd=31.8, hh=490., sigma=1.91e-3, f=0.039)

source code 

Stellar galactic density function.

Galactic coordinate z: self-gravitating isothermal disk plus a Gaussian halo

See, e.g., Maiz-Apellaniz, Alfaro and Sota 2007/2008 (Poster)

Other values we found in the literature:

z_sun,hd,sigma,f = 24.7,34.2,1.62e-3,0.058

Parameters:
  • z (array or float) - galactic coordinate z (parsec)
  • z_sun (float) - Sun's distance above the Galactic plane (20.0 +/- 2.9 pc)
  • hd (float) - disk scale height (31.8+/-1.6 pc)
  • hh (float) - halo half width (490+/-170 pc)
  • sigma (float) - number of stars per square parsec (total surface number density) (1.91e-3+/-0.11e-3)
  • f (float) - fraction of stars in the halo population (0.039+/-0.015)
Returns: 3-tuple
halo+disk,halo and disk density function

probability_cd(r, plx, e_plx)

source code 

Compute the probability for an object to be at distance r (pc), given its parallax (mas) and error on the parallax (mas) and a constant density function.

Unnormalised!

To obtain the probabilty, multiply with a stellar galactic density function.

Parameters:
  • r (float/array) - distance (pc)
  • plx (float/array) - parallax (mas)
  • e_plx (float/array) - error on parallax (mas)
Returns:
probability function

distprob(r, theta, plx, **kwargs)

source code 

Compute the probability for an object to be located at a distance r (pc), given its parallax and galactic lattitude.

theta in degrees plx is a tuple!

returns (unnormalised) probability density function.