Chris Beaumont's IDL Library

Download source code

single page | use frames     summary     class     fields     routine details     file attributes

./

kdist.pro

topkdist

coordinate systems

result = kdist(longitude, velocity [, radians=radians] [, debug=debug])

This function calculates the near and far kinematic distances for a given galactic longitude and radial velocity. The calculation uses the Galactic rotaion model of Brand and Blitz 1993, A&A, 275 : 67.

Currently only computes distances for objects in the inner galaxy.

Return value

The two element vector [near_distance, far_distance] in kpc.

Parameters

longitude in required

Galactic Longitude. Currently must be in the range [-180, 180] in degrees.

velocity in required

Radial velocity in km/s

Keywords

radians in optional

If set, input Longitude is in radians

debug in optional

If set, produce debugging plots / information

Author information

History:

Written by: Chris Beaumont, June 2008. June 23, 2008: Changed name from kinematic_distance to kdist. cnb June 23, 2008: Fixed bug in modding l with 2 pi. cnb July 17, 2008: Removed degrees keyword. Added radians. cnb July 17, 2008: Changed things so that, if l is a variable, it isn't modified March 18, 2009: Changed theta_0 and v_sol to reflect arxiv 0902.3913 March 20, 2009: Changed minor typo in value of a1. Added /DEBUG keyword

File attributes

Modifcation date: Mon Mar 19 09:58:19 2012
Lines: 117