eq2gal: Convert Equtorial to Galactic Coordinates

View source: R/sph2car.R

eq2galR Documentation

Convert Equtorial to Galactic Coordinates

Description

Simple conversions accurate to about 0.1 arcseconds between J2000 Equatorial and MW Galactic.

Usage

eq2gal(RA, Dec, pole_RA = 192.859508, pole_Dec = 27.128336, eta = 32.932)
gal2eq(gal_long, gal_lat, pole_RA = 192.859508, pole_Dec = 27.128336, eta = 32.932)

Arguments

RA

Numeric vector; Right Ascension in degrees (J2000 system). For convenience this can also be a two column matrix / data.frame containing RA and Dec columns.

Dec

Numeric vector; Declination in degrees (J2000 system).

gal_long

Numeric vector; Galactic Longitude in degrees (J2000 system). For convenience this can also be a two column matrix / data.frame containing gal_long and gal_lat columns.

gal_lat

Numeric vector; Galactic Latitude in degrees (J2000 system).

pole_RA

Numeric scalar; Right Ascension of Galactic Pole in degrees (J2000 system).

pole_Dec

Numeric scalar; Declination of Galactic Pole in degrees (J2000 system).

eta

Numeric scalar; Tilt of the Earth's axis in degrees (J2000 system).

Details

Approximate simple conversions, accurate usully to 0.1 arcseconds

Value

eq2gal returns the Galactic longitude and latitude in degrees (two column output). gal2eq returns the Equatorial RA and Dec in degress (two column output).

Author(s)

Aaron Robotham

References

"Practical astronomy with your calculator" (Peter Duffett-Smith)

See Also

sph2car,car2sph

Examples

# Notice the conversion anbiguity at the poles

gal2eq(eq2gal(seq(0,360, len=19), seq(-90,90, len=19)))

asgr/celestial documentation built on Dec. 12, 2023, 10:06 a.m.