Page 1 of 2

Co-ordinate systems?

Posted: 01.03.2004, 06:44
by Evil Dr Ganymede
I seem to be having a lot of trouble grokking how equatorial and galactic co-ordinate systems work. So I'll tell you what system I'd ideally like to see, and then hope that someone in the audience can let me know if one of the existing co-ordinate systems is remotely like it.

What I would like is a polar co-ordinate system that has Sol as the origin (0,0,0), and a star described in terms of (1) distance from Sol, (2) a 'horizontal' angle relative to a zero-line pointing towards the galactic centre, measured in the galactic plane, and (3) a 'vertical' angle relative to the galactic plane, as measured from Sol. So (2) is kind of like a longitude with the zero meridian being the direction to the galactic core, and (3) is kinda like a latitude (if the sun was in the middle of the sphere, with the equator being the galactic plane).

So if there was a star 10 lightyears away from the Sol, in the direct opposite direction from the galactic centre, and 45 degrees above the galactic plane, you'd write the co-ordinates as (10, 180, 45).

I realise that most co-ordinate systems don't explicitly state the distance as part of the co-ordinate, but is there one that expresses the angles in a similar way to what I'm after here?

Posted: 01.03.2004, 12:05
by selden
Oh Evil One,

As best I can tell, you've just described the Galactic coordinate system.

Posted: 01.03.2004, 16:29
by granthutchison
Yes indeed. Some more detail: galactic longitude (l) is measured in the same sense as right ascension: that is, anticlockwise when viewed from galactic north. Galactic latitude (b) is positive towards galactic north, which is the galactic pole that lies north of the ecliptic plane. The Galaxy rotates clockwise when viewed from galactic north.

Grant

Posted: 01.03.2004, 18:48
by Evil Dr Ganymede
Oh. Ok then :D

I thought that galactic latitude was defined relative to the galactic core though (not Sol) - so a latitude of 90 degrees was something directly "above" the core.

So, the co-ordinates of stars in the Hipparcos catalogue are all either shown in RA and declination (H3 and H4) and there's also a couple of fields called alpha and delta (H8 and H9). I don't think either of those are galactic co-ordinates, and I can't seem to find those expressed as such there.

For example, I just entered a random HIP number and got:

H0 : H Catalogue (H = Hipparcos, T = Tycho)
H1 : 21453 Identifier (HIP number)
H3 : 04 36 24.77 Identifier RA, h m s (J1991.25)
H4 : +13 07 21.6 Identifier Dec, d m s (J1991.25)
H8 : 69.10322032 alpha, degrees (J1991.25)
H9 : 13.12267059 delta, degrees (J1991.25)

There's an explanation of those here:
http://astro.estec.esa.nl/Hipparcos/pstex/sect2_01.pdf

Is there a way to convert from either of those co-ordinates to galactic co-ordinates? I get the impression from the explanation that neither of those are galactic co-ords as they stand.

Posted: 01.03.2004, 19:10
by granthutchison
Evil Dr Ganymede wrote:I thought that galactic latitude was defined relative to the galactic core though (not Sol) - so a latitude of 90 degrees was something directly "above" the core.
Only in Star Trek!

Evil Dr Ganymede wrote:So, the co-ordinates of stars in the Hipparcos catalogue are all either shown in RA and declination (H3 and H4) and there's also a couple of fields called alpha and delta (H8 and H9).
Alpha and delta are just RA and dec in decimal degrees.

Evil Dr Ganymede wrote:Is there a way to convert from either of those co-ordinates to galactic co-ordinates?

b = asin[cos(delta)*cos(27.4)*cos(alpha-192.25)+sin(delta)*sin(27.4)]

l = 33 + atan{[sin(delta)-sin(b)*sin(27.4)]/[cos(delta)*sin(alpha-192.25)*cos(27.4)]}

The numerical values are all in degrees: if you're interested in their origin, the coordinates of the north galactic pole are alpha = 192.25 deg, delta = 27.4 deg; the ascending node of the galactic plane on the celestial equator is l = 33 deg.

Grant

Posted: 01.03.2004, 20:11
by Evil Dr Ganymede
Thanks, Grant. :)

This bit I didn't quite get though:

The numerical values are all in degrees: if you're interested in their origin, the coordinates of the north galactic pole are alpha = 192.25 deg, delta = 27.4 deg; the ascending node of the galactic plane on the celestial equator is l = 33 deg.


What is the north galactic pole defined as? The point above the galactic core? Or do you mean the point above the sun relative to the galactic plane?

And what's the celestial equator?

Posted: 01.03.2004, 20:58
by granthutchison
Evil Dr Ganymede wrote:What is the north galactic pole defined as? The point above the galactic core? Or do you mean the point above the sun relative to the galactic plane?
They're the same thing. If you imagine infinitely long lines projected normal to the galactic plane from a) the galactic core and b) the sun (or indeed any other star in the galaxy), they'll converge on the same vanishing point on the celestial sphere, which is the galactic pole.

Evil Dr Ganymede wrote:And what's the celestial equator?
It's the projection of the plane of the Earth's equator on to the celestial sphere - right ascension is measured parallel to it, and declination at right angles to it.

Grant

Posted: 02.03.2004, 00:16
by Evil Dr Ganymede
b = asin[cos(delta)*cos(27.4)*cos(alpha-192.25)+sin(delta)*sin(27.4)]

l = 33 + atan{[sin(delta)-sin(b)*sin(27.4)]/[cos(delta)*sin(alpha-192.25)*cos(27.4)]}


So.... RA 0 0 0 means alpha = 0 and Dec 0 0 0 means delta = 0,
and plugging that into those equations I get that the galactic latitude of that point (where alpha = delta = 0) is 0.55 degrees and galactic longitude 33.83 degrees?

(what is that anyway? The point where the zero meridian of the equatorial co-ordinate system crosses its equator? That doesn't appear to be pointing anywhere special in Celestia - seems to be a point in Pisces, the nearest star is HIP 56.)

And why is it that setting alpha = 360 doesn't produce the same result as alpha = 0??

Posted: 02.03.2004, 00:42
by granthutchison
Evil Dr Ganymede wrote:So.... RA 0 0 0 means alpha = 0 and Dec 0 0 0 means delta = 0, and plugging that into those equations I get that the galactic latitude of that point (where alpha = delta = 0) is 0.55 degrees and galactic longitude 33.83 degrees?
'Fraid not. Galactic longitude 97.74 deg, latitude -60.18 deg. Is it possible your trig functions require radians and you're feeding them degrees?

Evil Dr Ganymede wrote:what is that anyway? The point where the zero meridian of the equatorial co-ordinate system crosses its equator? That doesn't appear to be pointing anywhere special in Celestia - seems to be a point in Pisces, the nearest star is HIP 56.
It's the position of the Sun at northern vernal equinox - where it pops through the celestial equator on its way north. This equinox position is used to define the zero longitude line for both RA and ecliptic longitude.
(Turn on the celestial grid, goto Earth, and set the time and date to 20 March 2004 06:49:42 (this year's vernal equinox). Centre the Sun ... and there it is, at RA zero, dec zero.)

Evil Dr Ganymede wrote:And why is it that setting alpha = 360 doesn't produce the same result as alpha = 0??
I guess it's something to do with whatever caused the error above.

Grant

Posted: 02.03.2004, 06:10
by Evil Dr Ganymede
granthutchison wrote:'Fraid not. Galactic longitude 97.74 deg, latitude -60.18 deg. Is it possible your trig functions require radians and you're feeding them degrees?

D'oh. I keep forgetting Excel works in radians (I never could get used to those). I've corrected it now - and sure enough I got your numbers. :)

That also gets rid of the error when alpha=360 too, so that's good.

It's the position of the Sun at northern vernal equinox - where it pops through the celestial equator on its way north. This equinox position is used to define the zero longitude line for both RA and ecliptic longitude.

Ack, there's far too many co-ordinate systems going on here... equatorial, ecliptic, celestial, galactic... :?

Ok. The celestial equator is the projection of Earth's equator into the sky, right? And the celestial poles are the extension of the Earth's axis of rotation?

And the ecliptic plane is the plane of the Earth's orbit around the sun, projected into the sky, yes?

Which means that the ecliptic plane and the celestial equator are tilted relative to eachother, and only cross on the Equinoxes, yes? (presumably the autumn equinox is at RA 180 Dec 0, yes?)


(Turn on the celestial grid, goto Earth, and set the time and date to 20 March 2004 06:49:42 (this year's vernal equinox). Centre the Sun ... and there it is, at RA zero, dec zero.)


So it is... :)

Thanks again for the help! :D

Posted: 02.03.2004, 13:49
by granthutchison
Evil Dr Ganymede wrote:... (presumably the autumn equinox is at RA 180 Dec 0, yes?)
Yep. You've got it. (Except in a nit-picky way that would strictly be RA 12h or alpha 180 degrees :wink:)

Grant

Posted: 02.03.2004, 16:45
by Evil Dr Ganymede
granthutchison wrote:
Evil Dr Ganymede wrote:... (presumably the autumn equinox is at RA 180 Dec 0, yes?)
Yep. You've got it. (Except in a nit-picky way that would strictly be RA 12h or alpha 180 degrees :wink:)
Grant


Yeah, I noticed that. I was looking for Barnards Star on the little java animation thing on Hipparcos' proper motion webpage and couldn't find it, and then I noticed the RA I entered was wrong. Turns out I'd assumed that RA was in degrees/minutes/seconds rather than hours/minutes seconds...

And after all that I couldn't get Barnards Star to show up on the animation because it was too dim :(

Posted: 03.03.2004, 15:48
by Evil Dr Ganymede
OK. Time to check values...

Could some kind soul please provide me with alpha/delta and galactic latitude/longitude pairs for the following stars?

UV Ceti: Ra 1h 39m 1.3s, Dec -17 57' 1"
Sirius: RA 6h 45m 8.9s, Dec -16 42' 58"
Proxima: Ra 14h 29m 43s, Dec -62 40' 46"
Delta Pavonis: 20h 8m 43.6s, -66 10' 55"


I've got:

UV Ceti: alpha = 24.755, delta = -16.05, gal lat = -73.78, gal lon = -8.84
Sirius: alpha = 101.287, delta = -15.28, gal lat = -7.80, gal lon = 46.22
Proxima: alpha = 217.43, delta = -61.32, gal lat = -1.04, gal lon = -45.22
Delta Pavonis: alpha = 302.18, delta = -65.82, gal lat = -32.94, gal lon = -29.69


I suspect my alpha/deltas are OK, since they go from 0 to 360. If I had the correct b/l values then I could see where I'm going wrong converting from the alpha/deltas. Grant, all the numbers in those equations you posted were angles, right? I might have accidentally converted something into radians that I shouldn't, maybe?? :?:

Posted: 03.03.2004, 17:58
by selden
Oh Evil One,

This is, of course, "an already solved problem". :)


You might consider using Precess to check your numbers.
It converts between Equatorial, Galactic and Ecliptic coordinate systems.

Precess (Celestial Coordinate Conversion and Precession)
http://cxc.harvard.edu/toolkit/precess.jsp
Precess help
http://cxc.harvard.edu/ciao/ahelp/precess.html
Precess instructions
http://ledas-cxc.star.le.ac.uk/udocs/do ... ode76.html

Posted: 03.03.2004, 18:28
by granthutchison
OK, there's a problem with your delta calcs - if the declination is negative, you're treating the degrees as negative but the minutes and seconds as positive, which is bollixing the conversion.
I've got galactic coord calcs for these nearby stars in a spreadsheet already:

UV Ceti b=-75.699 l=175.486
Sirius b=-8.890 l=227.230
Proxima b=-1.927 l=313.940
Del Pav b=-32.417 l=329.767

I think you're also not checking which quadrant your atan should be in, which is introducing a 180 degree error for some of your longitude values.

Grant

Posted: 03.03.2004, 18:31
by Evil Dr Ganymede
Thanks... Spiff just pointed out something weird about Excel's TAN functions (apparently I'm using ATAN instead of ATAN2, which is what I should be using here), that might be at least part of the solution.

I think the ATAN2 thing has mostly solved the conversion to galactic longitude, but the latitude still seems a bit screwy.

For Sirius I now have:

alpha = 101.2871, delta = -15.2836
galactic longitude: 226.22, galactic longitude: -7.799

The precess tool gives the result as

galactic longitude: 227.23, galactic longitude: -8.89

So I'm still out by about a degree in both cases :(. Changing to a different epoch doesn't change the results by that much, so I can't be using the wrong epoch...

Chandra can't verify my alpha/delta values... do you know ones that I gave are correct? Maybe I'm screwing up the conversion from RA/Dec to alpha/delta?

Posted: 03.03.2004, 18:42
by Evil Dr Ganymede
granthutchison wrote:OK, there's a problem with your delta calcs - if the declination is negative, you're treating the degrees as negative but the minutes and seconds as positive, which is bollixing the conversion.

Aha. That makes sense, now you mentoin it. Hrm. So how do I persuade Excel to do that? So far I've told it to calculate delta by:

delta = DEGREES+(MINUTES/60)+(SECONDS/3600)

I suppose the best way to handle it would be to write in an IF statement there to pick up whether the sign of the degrees is +ve or -ve? So if it's -ve, then it should be:

-ve DEC: delta = DEGREES-(MINUTES/60)-(SECONDS/3600)

yes?

And I guess that's what's screwing up the l value since b is used in the equation for that...

So if I do that as well, I get

Sirius: alpha = 101.28871, delta = -16.716
Sirius: b = -8.43, l = 227.52

Dang. That's still out by about a quarter degree.... :(

I'm missing something else here. Does it make much difference if one converts the RA into alpha by assuming that 1 Hour is exactly 15 degrees?


I think you're also not checking which quadrant your atan should be in, which is introducing a 180 degree error for some of your longitude values.


This I've got sorted now, I think, thanks to Spiff's contribution on the other thread (I never was a wiz at trigonometry, the fact that my brain is currently addled by flu doesn't help either :( )

Posted: 03.03.2004, 19:19
by selden
One hour is exactly 15 degrees: 360/24.

Make sure you'r using the appropriate precision for Pi in your degrees to radians conversion. I was using a value that wasn't even single precision and it took me a while to figure out why the result for 360 wasn't exactly the same as for 0.

Posted: 03.03.2004, 20:10
by granthutchison
Evil Dr Ganymede wrote:I suppose the best way to handle it would be to write in an IF statement there to pick up whether the sign of the degrees is +ve or -ve?
Yah. I'm doing something similar except I'm handling a string rather than separate entries for deg/min/sec.

Evil Dr Ganymede wrote:Dang. That's still out by about a quarter degree....
Nonono. I get the same answer, using my formulae. As Spiff pointed out, the equation I gave assumes B1950 instead of J2000. (Sorry, I hadn't checked this in my spreadsheet, which calculates both epochs. :cry:) So precessing J2000 back and then applying the formulae should give you the same answers I posted. No?

Grant

Posted: 03.03.2004, 21:19
by Spaceman Spiff
Evil Dr G!

so near, yet so far. OK, following your earlier request to actually compute b and l, I just bashed up an Excel spreadsheet and get (your Alphas and Deltas):

Code: Select all

UV Ceti:       RA  1h 39m 1.3s,  Dec -17 57'  1"   b = -75.10362954   l = 176.2546546
Sirius:        RA  6h 45m 8.9s,  Dec -16 42' 58"   b =  -8.43322558   l = 227.5169003
Proxima:       RA 14h 29m 43s,   Dec -62 40' 46"   b =  -2.29843483   l = 314.2695762
Delta Pavonis: RA 20h  8m 43.6s, Dec -66 10' 55"   b = -32.90366639   l = 329.8836616


Now, if those R.A.'s and Dec.'s were from stars.dat, being sourced from Hipparcos, they should be epoch 2000.0. The figures in the formulae convert R.A. and Dec. co-ords as if they were 1950.0, but that doesn't matter. To test the equations, we just want equivalent numbers - we can update NGP co-ords to 2000.0 later.

After all that, the small piece of good news is that my Sirius co-ords AGREE with yours that you posted at 19:42 Wed, 03 Mar 2004 GMT. The reason you worry about a ? degree is because granthutchisons value might be correct for epoch 2000.0

Incidently, if you enter e.g., UV Ceti's Dec as -17 and 57 and 1 in separate cells, it's more efficient to ensure mins and secs are added sign-wise correctly like this:

For RA, where hours are in col. B, mins in col. C, secs in col. D.

Code: Select all

=SIGN($B8)*15*(ABS($B8)+$C8/60+$D8/3600)


{Oh look, the font changes and I can't do anything about it...)
For Dec, where degs are in col. F, mins in col. G, secs in col. H.

Code: Select all

=SIGN($F8)*(ABS($F8)+$G8/60+$H8/3600)


Stick the NGP Alpha, Delta and Lambda (ascending node of Cel. Eq.) if separate cells, and convert to radians (*PI()/180)). I put them in C4, D4 and E4. Then our grand formulae become in my spreadsheet:

For Beta (in cell J8)

Code: Select all

=ASIN(COS($K8)*COS($D$4)*COS($J8-$C$4)+SIN($K8)*SIN($D$4))


For Lambda (in cell I8)

Code: Select all

=$E$4+ATAN2(COS($K8)*SIN($J8-$C$4)*COS($D$4),SIN($K8)-SIN($L8)*SIN($D$4))


Note. I updated cells C4-E4 with those NGP co-ords I thought were 2000.0, but they cause stronger disagreement with granthutchison's figures.

Still, all you need to do is check those formulae, and then get the right NGP co-ords for epoch 2000.0.

Spiff.