Collection of Common Astronomical Conversion Routines and Functions

Contains a number of common astronomy conversion routines, particularly the HMS and degrees schemes, which can be fiddly to convert between on mass due to the textural nature of the former. It allows users to coordinate match datasets quickly. It also contains functions for various cosmological calculations.



Not released on CRAN.


FEATURE: Added support for many more ways of specifying deg2dms outputs, e.g. 2d34m45.5s and 2:34:45.5. Code can also take string versions of HMS and DMS coordinates and convert them back to degrees.


FEATURE: Added cosmological distance calculator and a sky area calculator.

v1.3 (CRAN)

FEATURE: Added individual cosmology routines as separate functions.

FEATURE: Added new cosgrow (structure growth) and cosmap (generic parameter inputs, not just redshift) functions.

FEATURE: Added sky coordinate matching functionality (coordmatch)

v1.4 (not on CRAN)

CHANGE: cosdistAngSize is now more accurately named cosdistAngScale

FEATURE: Added NEW cosdistAngSize and cosdistAngArea functions that conpute angular properties of extended sources (e.g. galaxies or halos).

FEATURE: Added cosvararea function, which is a simpler interface to cosvarsph where the assumption is aside=bside.

FEATURE: Added cosgrowRhoMean function, which is the mean matter density as a given redshift

FEATURE: Added NFW profile stuff.

FIXED: cosgrow RhoCrit column had a bug that meant it scaled by H(z) not H(z)^2 (cosgrowRhoCrit had no bug).

FEATURE: Added various Planck related functions (cosplanck).

DOCS: Fixed a couple of document issues.

FEATURE: Added Planck 2015 cosmology to cosref.

FEATURE: Added cosdistCoDist12ang function (and related) for arbitrary comoving separations.

FEATURE: Added Duffy 2008 mass to concentration relation.

FEATURE: Added Driver & Robotham 2010 cosmic variance calculator.

FEATURE: Added cosgrowDeltaVir to find over density compared to critical to Rho_crit from Bryan & Norman (1998).

FEATURE: Added coshaloSigmaToTvir (virial temperature of halo/gas).

FEATURE: Added cosgrowCoVel (cosmological recession velocity).

FEATURE: Added cosgrowPecVel (peculiar velocity).

DOCS: New cosdist examples by John Peacock (discussed when visiting ASGR at ICRAR in 2016).

v1.4.1 (on CRAN)

FEATURE: Added radec2xy, xy2radec and getpixscale Tan-Gnomonic WCS projection solvers.

FEATURE: Added cosNFWvcirc and cosNFWvesc functions to compute NFW halo unbinding.


FEATURE: Now also support Sine-Orthographic projections and can detect the header CTYPE.

FEATURE: Added internalclean function that cleans up a single table that has duplicate (N>1 within some sky position tolerance) sources.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


1.4.6 by Aaron Robotham, 3 years ago

Browse source code at

Authors: Aaron Robotham

Documentation:   PDF Manual  

Task views: Chemometrics and Computational Physics

GPL-3 license

Depends on RANN, NISTunits, pracma

Imported by ProFit, ProFound, magicaxis.

See at CRAN