Parallax-based distance calculator v2

The spiral arms of the Milky Way are being accurately located for the first time via trigonometric parallaxes of massive star forming regions with the BeSSeL Survey, using the Very Long Baseline Array and the European VLBI Network, and with the Japanese VERA project. This calculator leverages these results to significantly improve the accuracy and reliability of distance estimates to other sources that are known to follow spiral structure. Using a Bayesian approach, sources are assigned to arms based on their (l,b,v) coordinates with respect to arm signatures seen in CO and HI surveys. A source's kinematic distance, displacement from the plane, and proximity to individual parallax sources are also considered in generating a full distance probability density function. A more detailed description of the methods can be found in Reid, Dame, Menten & Brunthaler 2016, ApJ 823, 77. An update was presented in Reid et al. 2019 (arXiv:1910.03357) and includes the following (the old version can be found here:

1) Source coordinates can be entered either as (longitude,latitude) or (RA,Dec).
2) We have combined the spiral arm and Galactic latitude PDFs in order to give a fairer representation off the probability of an arm assignment.
3) Proper motion components (Eastward,Northward) can be entered, if measured. Otherwise the default values of zero will inform the program to ignore them.
4) Uncertainties in motion parameters can now be entered and used.
5) Motion uncertainties are inflated for sources in regions with anomalous peculiar motions: ie, with Galactocentric radii by the bar) and in a section of the Perseus arm (see Reid+2016).
6) The probability_controls.inp file has been changed to improve performance.

The source code for a "batch input" version of the program that can read an input file that contains information for large numbers of sources can be downloaded here: v2.4_bundle.tar (0.33 MB).
This file also contains the spiral arm traces (arm_lbvRBD.2019), which give the following information for locations along each spiral
arm: Galactic longitude, latitude, Vlsr, Galactocentric radius, Galactocentric azimuth, and distance from the Sun.