Bayesian photometric parallax. Infers distances, reddenings, stellar types, and line-of-sight extinction profiles.