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 8125937
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T06:59:04+00:00 2026-06-06T06:59:04+00:00

For a given observer (lon, lat, time) on Earth and a given Galactic coordinate

  • 0

For a given observer (lon, lat, time) on Earth and a given Galactic coordinate (GLON, GLAT), how can I compute the corresponding (alt, az) point in the sky with PyEphem?

  • 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-06T06:59:05+00:00Added an answer on June 6, 2026 at 6:59 am

    Given the way that PyEphem currently works, there are two steps to answering your question. First, you have to convert a pair of galactic coordinates into an equatorial RA/dec pair of coordinates instead.

    import ephem
    
    # Convert a Galactic coordinate to RA and dec                          
    
    galactic_center = ephem.Galactic(0, 0)
    eq = ephem.Equatorial(galactic_center)
    print 'RA:', eq.ra, 'dec:', eq.dec
    
    → RA: 17:45:37.20 dec: -28:56:10.2
    

    Those coordinates are pretty close to the ones that the Wikipedia gives for the galactic center.

    Now that we have a normal RA/dec coordinate, we just need to figure out where it is in the sky right now. Since PyEphem is built atop a library that knows only about celestial “bodies” like stars and planets, we simply need to create a fake “star” at that location and ask its azimuth and altitude.

    # So where is that RA and dec above Boston?
    # Pretend that a star or other fixed body is there.
    
    body = ephem.FixedBody()
    body._ra = eq.ra
    body._dec = eq.dec
    body._epoch = eq.epoch
    
    obs = ephem.city('Boston')
    obs.date = '2012/6/24 02:00' # 10pm EDT
    body.compute(obs)
    print 'Az:', body.az, 'Alt:', body.alt
    
    → Az: 149:07:25.6 Alt: 11:48:43.0
    

    And we can check that this answer is reasonable by looking at a sky chart for Boston late that evening: Sagittarius — the location of the Galactic Center — is just rising over the southeastern rim of the sky, which makes perfect sense of a southeast azimuth like 149°, and for an as-yet low altitude like 11°.

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

Sidebar

Related Questions

In Skiena's book of algorithm design , given that the hash table has can
I have the following problem. Given a Interface EventNotifier for the Observer Pattern: public
class Observer def initialize(&block) instance_eval(&block) if block_given? end end I'm wondering what assumption is
Given that the web application doesn't have su privileges, I'd like to execute a
Given this method to work on a HTML page in a webbrowser: bool semaphoreForDocCompletedEvent;
Given an NSMutableArray of dynamic CGPoint s, what is the fastest and most efficient
Given a certain date, I want to set the value of a cell with
given a Python class hierarchy, say class Base: def method1 def method2 def method3
Given a MySQL table of real estate data, I would like to generate a
Given the following code: $(.force-selection).blur(function() { var value = $('matched-item').val(); //check if the input's

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.