Questions tagged [astronomy]

Astronomy is the study of celestial objects, such as planets, stars, and galaxies. Any astronomy question on this site should be programming related; other astronomy questions should be asked on our sister site Astronomy Stack Exchange.

Astronomy is the study of celestial objects, such as planets, stars, and galaxies. Any astronomy question on this site should be programming related; other astronomy questions should be asked on our sister site Astronomy Stack Exchange.

619 questions
12
votes
3 answers

Python coordinate transformation ECI to ECEF

I am using sgp4 python package (developed by Brandon Rhodes); I am inputting the TLE information for ISS(Zarya). I get the position of the satellite at a certain date, in the in ECI coordinate system. However, I want to convert it to ECEF coordinate…
11
votes
1 answer

Creating Star Map Visualizations Based on Location and Date

Background I am working on trying to create a Celestial map based on a given location and date in R. Ideally the visual would look like this: (Source) I did see this blog which utilized D3 Celestial Maps and was very helpful in creating the visual…
Bensstats
  • 988
  • 5
  • 17
11
votes
1 answer

Calculations of the path of the Sun

I'm writing several methods necessary to calculate the path of the Sun across a specific point. I have written the code using two different sources for my calculations and neither is producing the desired result. The sources are:…
wellington
  • 471
  • 1
  • 7
  • 19
10
votes
1 answer

Make a 2D histogram with HEALPix pixellization using healpy

The data are coordinates of objects in the sky, for example as follows: import pylab as plt import numpy as np l = np.random.uniform(-180, 180, 2000) b = np.random.uniform(-90, 90, 2000) I want to do a 2D histogram in order to plot a map of the…
AlbertBranson
  • 405
  • 2
  • 7
10
votes
1 answer

pyephem, libnova, stellarium, JPL Horizons disagree on moon RA/DEC?

MINOR EDIT: I say below that JPL's Horizons library is not open source. Actually, it is, and it's available here: http://naif.jpl.nasa.gov/naif/tutorials.html At 2013-01-01 00:00:00 UTC at 0 degrees north latitude, 0 degrees east latitude, sea…
user354134
9
votes
1 answer

Results for Observer() seemingly not accounting for elevation effects in PyEphem

I've a query on the results given by the PyEphem module relating to Observer() queries, and the effects of elevation. I understand from a couple of sources (such as http://curious.astro.cornell.edu/question.php?number=388) that the elevation of the…
Smingos
  • 280
  • 1
  • 3
  • 9
9
votes
1 answer

How to keep only a certain set of rows by index in a pandas DataFrame

I have a DataFrame I created by doing the following manipulations to a .fits file: data_dict= dict() for obj in sortedpab: for key in ['FIELD', 'ID', 'RA' , 'DEC' , 'Z_50', 'Z_84','Z_16' , 'PAB_FLUX', 'PAB_FLUX_ERR']: …
Nikko Cleri
  • 185
  • 1
  • 1
  • 11
9
votes
2 answers

Reverse radial axes of Matplotlib polar plot

I'm trying to create an astronomical polar plot with a radial axis that starts from -45° on outer line and increases to 90° in the center of the plot. But I didn't find any way to reverse radial axis of the PolarAxes instance. invert_yaxis() method…
Hello Human
  • 454
  • 7
  • 11
9
votes
4 answers

Calculate "Solar Noon" using ephem, translating to local time

I have looked at the examples here on using ephem to calculate sunrise and sunset, and have that working great. I get in trouble when I try to calculate the midpoint between those two times. Here's what I have: import datetime import ephem o =…
Lorin Rivers
  • 7,912
  • 1
  • 18
  • 9
9
votes
3 answers

Linear shift between 2 sets of coordinates

My Problem is the following: For my work I need to compare images of scanned photographic plates with a catalogue of a sample of known stars within the general area of the sky the plates cover (I call it the master catalogue). To that end I extract…
Christoph Pohl
  • 325
  • 5
  • 19
9
votes
6 answers

Objective-C Astronomy Library

I need to do some moonrise azimuth and time calculations. Can anyone recommend a good astronomy library, preferably in Objective-C?
8
votes
1 answer

Compute shadow length using PyEphem

I am using PyEphem and want to calculate the length of a shadow (assume a stick of unit length is planted in the ground). The length will be given by cot(phi), where phi is the solar elevation angle (please correct me if I'm wrong). I'm not sure…
7
votes
3 answers

How do i fill "holes" in an image?

I have photo images of galaxies. There are some unwanted data on these images (like stars or aeroplane streaks) that are masked out. I don't just want to fill the masked areas with some mean value, but to interpolate them according to surrounding…
miceuz
  • 3,327
  • 5
  • 29
  • 33
7
votes
1 answer

Determining lunar eclipse in skyfield

I am given a list of dates in UTC, all hours cast to 00:00. I'd like to determine if a (lunar) eclipse occurred in a given day (ie past 24 hours) Considering the python snippet from sykfield.api import load eph = load('de421.bsp') def…
Jernej
  • 342
  • 5
  • 18
7
votes
3 answers

Solving Kepler's Equation computationally

I'm trying to solve Kepler's Equation as a step towards finding the true anomaly of an orbiting body given time. It turns out though, that Kepler's equation is difficult to solve, and the wikipedia page describes the process using calculus. Well, I…
Carson Myers
  • 37,678
  • 39
  • 126
  • 176
1
2
3
41 42