Howto convert position angle

Asked by Christoph Deil

Hi,

can someone give an example of how to convert a position angle from Equatorial to Galactic coordinates with pyephem?
E.g. what is the position angle in Galactic coordinates for RA = 42 deg, DEC = 42 deg, ANGLE = 42 deg?

Thanks!
--Christoph

Question information

Language:
English Edit question
Status:
Answered
For:
PyEphem Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Mr.Peanut (seamus-spam) said :
#1

Perfect example under section on coordinate conversion. All you have to do is read it...
>>>from ephem import *
>>>np = Equatorial('42', '42')
>>>g = Galactic(np)
>>>print g.long, g.lat
68:36:19.2 26:53:31.7

Revision history for this message
Christoph Deil (deil-christoph) said :
#2

I want to know how to convert a *position angle*, not simply a coordinate.

Revision history for this message
Brandon Rhodes (brandon-rhodes) said :
#3

Christoph: that is a really good question!

I will think about it today and try to get back to you with an elegant solution. You are quite right that the system for translating coordinates can not, with any one single answer, help you determine how much position angles are skewed between one coordinate system and another. To take the example given above: knowing that a particular Equatorial position is Galactic position (68°,26°) only nails down a single Galactic coordinate out of the whole sky. But having nailed down that spot in the sky as being a particular dot on the Galactic sphere would still let us twirl the sphere through 360° around that one dot — that one coordinate does not, in other words, constrain the Galactic sphere to being at a particular orientation; it does not let us know at what angle the rest of the sphere rests.

So we will have to ask for at least two coordinates to be translated before we can construct an actual angle as an answer — and I am wondering whether the answer will come out cleanest if one of those points is, say, the pole of the Galactic or Equatorial sphere. Let me draw some sketches when I get a chance today, and let you know what I work out!

Revision history for this message
Mr.Peanut (seamus-spam) said :
#4

I don't see any docs refering to position angle in pyephem(but xepehm does handle binaries). Would not the answer be to add the position angle in equatorial to the (position)angle formed between the two norths with the binary primary as the middle point?

Can you help with this problem?

Provide an answer of your own, or ask Christoph Deil for more information if necessary.

To post a message you must log in.