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

R function for position of sun giving unexpected results

I'd like to calculate the position of the sun given time, latitude, and longitude. I found this great question and answer here: Position of the sun given time of day, latitude and longitude. However, when I evaluate the function I get incorrect…
Tedward
  • 1,652
  • 15
  • 19
7
votes
3 answers

Sunrise / set calculations

I'm trying to calculate the sunset / rise times using python based on the link provided below. My results done through excel and python do not match the real values. Any ideas on what I could be doing wrong? My Excel sheet can be found under ..…
dassouki
  • 6,286
  • 7
  • 51
  • 81
7
votes
2 answers

Calculate the date & time given the position of the sun (Azimuth & elevation) and latitude and longitude

Related to this extremely helpful question regarding finding the azimuth & elevation of the sun for a given date, and coordinates. I wish to find the inverse: times & dates the sun will be in that position of the sky. Therefore I am wondering could…
Brian Halpin
  • 169
  • 1
  • 14
6
votes
0 answers

How to get the exact season (autumn, winter, spring and summer) from a datetime vector in R using some built-in package function?

I need to get the exact season (autumn, winter, spring and summer) of my dataset using a "POSIXct" "POSIXt" datetime column. It's important to consider that the seasons depends on equinoxes and solstices on Earth and the exact time it takes places…
Guz
  • 387
  • 3
  • 21
6
votes
1 answer

How do I trim a .fits image and keep world coordinates for plotting in astropy Python?

This issue has been plaguing me for some time. I'm trying to handle some large amount of data that is in the form of a .fits file (on the order of 11000x9000 pixels). What I need to do is create a 'zoomed in' RA/Dec coordinate plot (ideally using…
FriskyGrub
  • 979
  • 3
  • 14
  • 25
6
votes
1 answer

Cropping very large fits files using specified boundaries

I have a large fits file (over 30,000 x 30,000) pixels. IRAF cannot handle this size of image. How can one crop a file of this size while retaining correct header information, as IRAF does when using its standard cropping mode?
ConnorG
  • 61
  • 1
  • 3
6
votes
3 answers

Slicing a circle in equal segments, Python

I have a set of close of 10,000 points on the sky. They are plotted using the RA (right ascension) and DEC (declination) on the sky. When plotted, they take the shape of a circle. What I would like to do is to slice the circle into 8 equal parts…
Srivatsan
  • 9,225
  • 13
  • 58
  • 83
6
votes
4 answers

Solar system computer model

I'm interested in building a 3D model of our solar system for web use (probably with AS3 and papervision) and have been looking into how I would go about encoding the planetary positions. My idea was to download the already calculated positions from…
Matti Lyra
  • 12,828
  • 8
  • 49
  • 67
5
votes
1 answer

How to draw sky chart?

How do I draw a star chart like this? I have: A star database with coordinates (right ascension and declination) Observer coordinates (latitude, longitude) Time of observation I need a formula which considered these parameters.
Bogdan
  • 171
  • 3
  • 13
5
votes
1 answer

Couple Differential Equations using Python

I am trying to solve a system of geodesics orbital equations using python. They are coupled ordinary equations. I've tried different approaches, but they all yielded me a wrong shape (the shape should be some periodic function when plotting r and…
5
votes
2 answers

How to calculate longitude using PyEphem

tried to calculate sun lat and long using PyEphem but not matching with ephemeris SUN: 2011 MAY 04 We 04 14:46:08 13TA12 = 43 degrees approx (As per website www.findyourfate.com) a = Sun() a.compute('2011-05-04') >>> a.hlon 274:18:49.1 >>>…
Narendra Kamma
  • 1,431
  • 1
  • 11
  • 19
5
votes
1 answer

Astronomy application

I am trying to build an astronomy application where I should display the stars at and near zenith for a given latitude, longitude and time. I am aware of the basics of Positional astronomy, what is puzzling me is to create database out of huge set…
Raj Pawan Gumdal
  • 7,390
  • 10
  • 60
  • 92
5
votes
2 answers

Plotting SDSS images with python

I need to plot some SDSS images with python. I downloaded the original frames from the SDSS DR7 and I'm trying to display (a zoom of) the image with the WCS coordinates projection. The original image has north on the right and east on top. According…
Cloud182
  • 111
  • 1
  • 10
5
votes
6 answers

Optimized processing of very large files

My task is relatively simple: for each line in an input file, test whether the line satisfies a given set of conditions, and if so, write specific columns of that line to a new file. I've written a python script that does this, but I'd like some…
Jake
  • 51
  • 1
  • 3
5
votes
1 answer

How do I overlay two .fits images each with different WCS / resolutions?

I'm trying to plot contours from one image of an object, let's say in band A, on top of a lower resolution image of that same object, let's say in band Z. Both images are in large fits files, so I have to create a 2D cutout of each. However, the…
astrobrown
  • 51
  • 1
  • 3
1 2
3
41 42