Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8545423
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T12:47:16+00:00 2026-06-11T12:47:16+00:00

I am finding that when I convert an (Alt, Az) to an (Ra, Dec)

  • 0

I am finding that when I convert an (Alt, Az) to an (Ra, Dec) and then back with PyEphem, I don’t get what I started with. Below is a simple example.

import ephem
print ephem.__version__
# '3.7.3.4'

gbt = ephem.Observer()
gbt.long = '-79:50:23.4'
gbt.lat = '38:25:59.23'
gbt.pressure = 0 # no refraction correction.
gbt.epoch = ephem.J2000
# Set the date to the epoch so there is nothing changing.
gbt.date = '2000/01/01 12:00:00'

# Should get the north pole right?
ra, dec = gbt.radec_of(0, '38:25:59.23')
# Not the north pole... error might be abberation.
print dec
# 89:59:30.5

# Now check internal consistancy by reversing the calculation.
pole = ephem.FixedBody()
pole._ra = ra
pole._dec = dec
pole._epoch = ephem.J2000
pole.compute(gbt)
# Should get what I started with right?
alt = pole.alt
# Not what I started with... error unknown.
print alt
# 38:26:26.7

As noted in the comments, not getting exactly the north pole might just be stellar aberration, although the 30″ is more than Wikipedia stated maximum effect of 20″.

The fact that I don’t get the same thing when I do the reverse calculation is truly puzzling me. Any suggestions?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T12:47:17+00:00Added an answer on June 11, 2026 at 12:47 pm

    The result you are getting is off because of both aberration and nutation. If you were to compile PyEphem yourself and comment out lines lines 271 and 272 of circum.h then you would find that you get exactly the result that you expect — with those edits, the code would look like:

        /* correct EOD equatoreal for nutation/aberation to form apparent 
         * geocentric
         */
        /* nut_eq(mjed, &ra, &dec); */
        /* ab_eq(mjed, lsn, &ra, &dec); */
        op->s_gaera = ra;
        op->s_gaedec = dec;
    

    When you ask PyEphem to “go backwards” from an observed RA and dec to the sky-position behind them, it merely reverses refraction (which you have already turned off) and precession to generate its answer.

    Why does it stop there? Why does it not try to reverse nutation and aberration? (Besides the practical reason: that those quantities are estimated through expensive polynomials that cannot be easily reversed!)

    The reason why it does not attempt to reverse-compensate for nutation and aberration is that it does not know the range to the object that sits at the RA and dec you are asking about. If you are asking about that RA and dec because you saw a satellite passing overhead, for example, then aberration would be irrelevant — earth satellites travel in the same relativistic frame as the Earth does — and nutation would also be irrelevant, since you would not be interested in where the “ideal” pole of earth points — you would be interested in where the pole was pointing on the particular night that you looked up and observed the satellite passing overhead.

    So without knowing whether the object you saw is an earth satellite, or the Moon, or a planet out in the different relativistic frame of the solar system, or something even farther away, the “libastro” library does the simplest thing possible and stops there, rather than mucking up the answer with reverse-effects that might not even apply to your situation. I will keep this in mind, though, as I approach PyEphem’s next version, and think about whether multiple radec_of() techniques might not be appropriate.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am having trouble finding a simple example of how to get the video
I am actually finding that chkContactType.Items is empty when I step through the code.
I'm finding that with dynamic linking, even with SxS, Windows Update will come along
I'm finding that the code that I write in my controllers is largely repetitive
I'm finding that when I link an executable against a static library (.a), the
I'm finding that std::sort is very slow with sorting only 1000 items. In class
Am using Math.round and I am finding that it will not return me any
Again I'm moving from Xcode 3 to 4 and finding that some things are
Working on a bunch of forms at the moment and I'm finding that I
Historically I've mainly written web apps in Django, but now I'm increasingly finding that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.