1

I'm trying to make a program that displays stars of my choice, from different locations on Earth and at different epochs. I've got it working so that I can display objects from ephem's database, such as Venus, but the stars I want to display aren't in the catalogue. How would I define the stars in Capricornus so they read to the program like any other star?

I've researched around and found articles similar to what I want:

The list of stars available: https://github.com/brandon-rhodes/pyephem/blob/master/ephem/stars.py

Sample script plotting Big Dipper:http://nbviewer.ipython.org/github/brandon-rhodes/pyephem/blob/master/issues/github-issue-61.ipynb#

The code I'm using to generate observation site and desired objects:

#Define observer location
gatech = Observer()
gatech.lon = '-3.0' #Longitude positive in the East
gatech.lat = '+51.0' #Latitude positive in the North
gatech.elevation = 0 

#Set date of observation and then prints Altitude and Azimuth of object
gatech.date = ((2000, 1, 1, 9, 30, 0)) #Year,month,day,hour,minute,second

v1 = Venus(gatech)
v1altrad = ('%.12f' % float(v1.alt))
v1azrad = ('%.12f' % float(v1.az -3.14159))

And inputting this into a matplotlib function produces the correct image.

As far as I know, I just need to figure out how to define the stars I want to see, as everything else appears to work. Any help plotting the stars of Capricorn would be greatly appreciated.

1 Answers1

2

What you really want to do is to convert arbitrary equatorial coordinates to horizontal coordinates for a given location and time.

There are at least two options:

You can either create your own version of "stars.py", say "mystars.py" and import that,

or do something like this

star = ephem.FixedBody(ra='21:00:00', dec='-20:00:00')
star.compute(gatech)
print(star.alt, star.az)
tos
  • 996
  • 1
  • 10
  • 20