The YMW16 electron-density model

YMW16 is a model for the distribution of free electrons in the Galaxy (Gal), the Magellanic Clouds (MC) and the inter-galactic medium (IGM) that can be used to estimate distances for real or simulated pulsars and fast radio bursts (FRBs) based on their dispersion measure.

The Galactic model is based on 189 pulsars which have independently determined distances as well as dispersion measures, whereas simpler models are used for the electron density in the MC and the IGM. It is estimated that the 95% of predicted Galactic pulsar distances will have a relative error of less than a factor of 0.9. Pulse broadening due to scattering in the Galactic interstellar medium, the Magellanic Clouds, the intergalactic medium and FRB host galaxies is estimated.

As well as the ymw16 dm-distance program, we also provide a program, ymw16_ne, which gives the electron density at any point in the Galaxy or the Magellanic Clouds.

A paper by Yao, Manchester and Wang giving a complete description of the model and comparing its predictions with those of earlier Galactic electron density models is published in Astrophysical Journal, vol. 835, eid 29 (2017) and is also available on arXiv (1610.09448v2). YMW16 is the first electron-density model to estimate extragalactic pulsar distances and FRB distances.

Electron density in the plane of the Galaxy for the YMW16 model

Electron Density Program

Entries marked with a * are required.

(x, y, z): Galactocentric coordinate system with x-axis parallel to gl=90 deg., y-axis parallel to gl=180 deg., and z-axis towards the NGP.

(gl, gb, dist): Galactic longtitude (0 to 360), Galactic latitude (-90 to 90), and distance (in pc).

ncrd: For ncrd=1, the input is (x, y, z). For ncrd=2, the input is (gl, gb, dist).

The output electron density has units of cm^-3.

Distance-Dispersion Measure Program

Entries marked with a * are required.

DM or Dist: One of DM (cm^−3 pc) or distance, depending on ndir. Distance has units of pc for modes Gal and MC and Mpc for mode IGM.

DM Host: Optional dispersion measure of host galaxy (default 100 cm^−3 pc). (Note: if present, DM Host is ignored for Gal and MC modes.)

ndir: ndir=1 converts from DM to Dist and ndir=2 converts from distance to DM. The output tau_sc has units of seconds.

Program Version History

V1.0: 2016 June 3. Original program version corresponding to submitted version of Yao, Manchester and Wang (2016).

V1.1: 2016 September 1. Revised program version corresponding to revised version of Yao, Manchester and Wang (2016) following referee's comments.

V1.2: 2016 September 25. Revised program version following second round of referee's comments.

V1.2.1: 2016 November 17. Accepted version. No significant change from V1.2.

V1.2.2: 2016 November 28. Minor corrections.

V1.2.3: 2017 March 23. Restructure of dmd modules and small corrections.

V1.2.4: 2017 August 30. Addition of ymw16_ne modules and small corrections.

V1.3: 2017 October 27. Inclusion of Copyright notices.

V1.3.1: 2017 November 20. Correction to usage for ymw16_ne.

V1.3.2: 2018 February 28. Allow longer path for YMW16_DIR.

Download and Installation

Download the latest source files as a gzipped package.

Run make_ymw16 to compile the code and set YMW16_DIR. Contact Jumei Yao ( or Dick Manchester ( if any problem is encountered.