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
5
votes
2 answers

Earth to Jupiter distance with Skyfield

I'm trying to use Skyfield to plot the distance in au from Earth to solar system planets as a function of time. This is super simple and is even given in the front page of the package homepage. However while this works perfectly well for mercury,…
Fabio
  • 75
  • 6
5
votes
6 answers

Hack a FITs Image Header

I need to change a few values in a couple of FITs image headers to fit with some test data I have. Therefore I'm trying to hack a FITs image header at the minute to run with the application. However at the minute - I can't even see the header, never…
Federer
  • 33,677
  • 39
  • 93
  • 121
5
votes
1 answer

libnova odd behavior for 89.5 degrees north latitude

I wrote this program: #!/usr/bin/perl use Astro::Nova qw(get_solar_equ_coords get_lunar_equ_coords get_hrz_from_equ get_solar_rst_horizon get_timet_from_julian get_julian_from_timet get_lunar_rst…
user354134
5
votes
1 answer

Assign WCS coordinates to a FITS image

I've been searching the documentation like crazy and cannot find an answer for this one. I'm generating FITS images in python and need to assign WCS coordinates to the image. I know there are lots of ways to do this by matching up point sources…
Teachey
  • 549
  • 7
  • 18
5
votes
1 answer

Numpy Array Slicing using a polygon in Matplotlib

This seems like a fairly straightforward problem, but I'm new to Python and I'm struggling to resolve it. I've got a scatter plot / heatmap generated from two numpy arrays (about 25,000 pieces of information). The y-axis is taken directly from an…
Teachey
  • 549
  • 7
  • 18
5
votes
2 answers

Plotting elliptical orbits

I'm trying to write a code that plots the elliptical paths of an object using the equation for the ellipse r=a(1-e^2)/(1+e*cos(theta)). I'd also like this data to be put into an array for other use. from numpy import *#Imports Python mathematical…
4
votes
1 answer

Convert topocentric coordinates (Azimuth, Elevation) to equatorial coordinates (RA, Dec) with PyEphem

This looks quite a basic task, but I cannot sort it out. The PyEphem documentation: http://rhodesmill.org/pyephem/radec.html describes how to perform the conversion the other way around, from a Body and an Observer objects to Apparent Topocentric…
Andrea Zonca
  • 8,378
  • 9
  • 42
  • 70
4
votes
3 answers

Improve performance of Velocity-Verlet integration algorithm

I am trying to integrate orbits of stars using a Velocity-Verlet integrator inside a potential. However, my current algorithm takes around 25 seconds per orbit, I aim to integrate around 1000 orbits which would take around 7 hours. Therefore I hope…
Viktor VN
  • 235
  • 2
  • 7
4
votes
1 answer

Issue translating World Coordinate system to cartesian coordinate

I have two fits images from the WFC3 that I am trying to combine with a C# program. When I try to combine multiple images I don't think the values I am getting for my x/y coordinates (calculated from Right Ascension/Declination) are correct. I am…
JamesL
  • 319
  • 2
  • 4
  • 11
4
votes
2 answers

How can we compute solar position at a given place on a given day and time?

I have UTC time (hours, minutes, seconds), longitude(deg E), latitude (deg N) and date. Can anyone provide me with a code to calculate solar zenith angle in Python 2.7?
hima Fernando
  • 137
  • 2
  • 8
4
votes
1 answer

Finding the break in data from a piecewise function

Greetings, I'm performing research that will help determine the size of observed space and the time elapsed since the big bang. Hopefully you can help! I have bilinear data on which I want to perform two linear regressions. There is a point at which…
rhombidodecahedron
  • 7,693
  • 11
  • 58
  • 91
4
votes
2 answers

Matplotlib 3D plot - parametric curve "wraparound" from certain perspectives

I have been writing a Python script (GitHub LINK) for visualizing asteroid/comet/meteoroid orbits. The script also plots the position of planets and their orbits. It works just right for orbits with small semi-major axis (i.e. "smaller" orbits). But…
D Vida
  • 51
  • 3
4
votes
2 answers

Radial Profile from a .fits image

I have been trying to plot a radial profile of a fits image using a modified script I found on-line. I always get y axis units which are completely different to what's expected. I'm not even sure what the y axis units are. I have attached the fits…
BubbleGum
  • 53
  • 1
  • 4
4
votes
1 answer

pyephem next_pass not matching heavens-above

I am using pyEphem to get the next over pass of the ISS from my location, but the results I get back do not match what I see on heavens-above using the same coordinates I am probably making a stupid mistake but I can't figure it out My code below…
kujosHeist
  • 810
  • 1
  • 11
  • 25
4
votes
1 answer

Bing Maps Silverlight Control: How do I Display the Sun's Footprint?

I have the Sun's latitude, longitude, and altitude but I don't know how to display the Sun's footprint in a particular time as in http://www.karhukoti.com and http://www.timeanddate.com/worldclock/sunearth.html. Can someone please…
bahith
  • 441
  • 10
  • 18