I have a list of objects given in equatorial coordinates... Is there a programm
which lets me plot a projection of these coordinates (like you would print out a
map of the world) with my datapoints in it?
Greetings,
Christian Herenz
I use SkyMap, but it isn't free, and of course you need to do a little
work to prepare the data and define it to SkyMap.
Eric
Below is a Perl subroutine to convert a series of (RA, Dec)
values into a Hammer-Aitoff projection. The resulting
(x, y) values can then be plotted with any ordinary graphics
package to show the projected locations.
####################################################################
# Given (RA, Dec), convert to (x, y) in Hammer-Aitoff projection
#
# The two arguments are RA and Dec in decimal degrees,
# and we return a two-element list for x, y.
# We scale (x, y) so that they range from
#
# 0 < x < 360
# -90 < y < 90
#
# so that labels will correspond to (RA, Dec) in decimal degrees.
#
# MWR 7/22/2006
sub convert_radec_to_hammeraitoff {
my($ra, $dec);
my($tra, $tdec);
my($x, $y, $z);
my($DEGTORAD);
my($pi);
$ra = $_[0];
$dec = $_[1];
$pi = 3.14159;
$DEGTORAD = $pi/180.0;
# convert RA and Dec into radians
$tra = ($ra*$DEGTORAD) - $pi;
$tdec = ($dec*$DEGTORAD);
# calc auxiliary variable z
$z = sqrt( 1.0 + cos($tdec)*cos($tra/2.0) );
# calc Hammer-Aitoff normalized coords (x, y)
$x = ( cos($tdec)*sin($tra/2.0) ) / $z;
$y = sin($tdec) / $z;
# now scale the normalized coords so that X ranges over 0 to 360,
# and y ranges over -90 to +90.
$x = ($x*180.0) + 180.0;
$y *= 90.0;
return($x, $y);
}