astronomy

Position of the sun given time of day, and lat/long

Anyone want to share some nice code that gives the position of the sun (elevation and azimuth) given latitude and longitude and time of day ? And date, of course. ...

Interactive Data Language, IDL: Does anybody care?

Anyone use a language called Interactive Data Language, IDL? It is popular with scientists. I think it is a poor language because it is proprietary (every terminal running it has to have an expensive license purchased) and it has minimal support (try searching for IDL, the language, right now on stack) . I am trying to convince my col...

How can I compute sunrise/sunset times?

I like to keep track of sunrise and sunset times. For the past couple of years I've been doing this with a small program written with a popular library for my favorite programming language. The last two months I've been keeping track of these times more regularly than usual, and I happened to notice that on the day of the equinox the s...

How do I compute equinox/solstice moments?

What algorithms or formulas are available for computing the equinoxes and solstices? I found one of these a few years ago and implemented it, but the precision was not great: the time of day seemed to be assumed at 00:00, 06:00, 12:00, and 18:00 UTC depending on which equinox or solstice was computed. Wikipedia gives these computed out...

C code for solar azimuth angle given date, time, lat, and long

I seem to have asked my question wrong so here goes again I'll try to be more to the point. Is the top answer on this page http://stackoverflow.com/questions/257717/position-of-the-sun-given-time-of-day-and-lat-long the solution to the question asked or is more needed? Thanks ...

NOVAS for .NET

Any astronomers out there? I'm wondering if anyone has produced or stumbled upon a .NET (preferably C#) implementation of the US Naval Observatoru Vector Astrometry Subroutines (NOVAS). ...

Astronomy API

Hi, I am interested in charting the positions of the planets. If you have any information about API's or other means of accomplishing this on mac osx, I would appreciate a response. Thanks, Bill ...

web service or .net library for moon and sun set/rise times?

Anyone know of a web service or .NET class library that can provide rise/set times for the sun and moon for any given date and any given latitude/longitude? Thanks in advance. ...

Error when using astWCS trying to create WCS object

I'm running python2.5 and trying to use the astLib library to analyse WCS information in astronomical images. I try and get the object instanciated with the following skeleton code: from astLib import astWCS w = astWCS.WCS('file.fits') # error here where file.fits is a string pointing to a valid fits file. I have tried using the al...

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 NASA as calculating the positions myself seems a but overcomplicated. I'm not sure though...

What are some algorithms that will allow me to simulate planetary physics?

I'm interested in doing a "Solar System" simulator that will allow me to simulate the rotational and gravitational forces of planets and stars. I'd like to be able to say, simulate our solar system, and simulate it across varying speeds (ie, watch Earth and other planets rotate around the sun across days, years, etc). I'd like to be ab...

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 mind hack it. I run Ubuntu. Can anyone advise some software to view the FITs - perhaps ...

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? ...

Visualisation of star catalogues and celestial coordinates

Does anyone have a suggested methodology for visualising the data in a star catalogue such as the Bright Star Catalogue. I'm thinking that there would be a notional sphere and a viewpoint i.e. at the center of that sphere with two vectors representing the view direction and view horizons. I would then somehow project from the star cata...

B-V to Kelvin formula

Whilst looking for a "B-V color index to temperature conversion formula" I found this javascript: var C1 = 3.979145; var C2 = -0.654499; var C3 = 1.74069; var C4 = -4.608815; var C5 = 6.7926; var C6 = -5.39691; var C7 = 2.19297; var C8 = -.359496; bmv = parseFloat(BV); with (Math) { logt= ...

Moon / Lunar Phase Algorithm

Does anyone know an algorithm to either calculate the moon phase or age on a given date or find the dates for new/full moons in a given year? Googling tells me the answer is in some Astronomy book, but I don't really want to buy a whole book when I only need a single page. Update: I should have qualified my statement about googling a ...

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 .. http://transpotools.com/sun_time.xls # Created on 2010-03-28 # @author: dassouki # @source...

Python Ephem / Datetime calculation

the output should process the first date as "day" and second as "night". I've been playing with this for a few hours now and can't figure out what I'm doing wrong. Any ideas? Edit I assume that the problem is due to my date comparison implementation Output: $ python time_of_day.py * should be day: event date: 2010/4/6 16:00:59 prev ...

Calculating dawn and sunset times using PyEphem

Is it possible to calculate Dawn, Dusk, and sunset times using PyEphem? I've used PyEphem to produce day and night time, but I didn't find anything on sunset/dusk/dawn ...

PyEphem (sunrise / sunset time calculation) equivalent in C#

PyEphem is a neat library that allows easy calculation of sunrise, set, dawn, and dusk of location based on lat, long, and UTC timestamp I don't want to go through the calculation myself, rather I was wondering if there is an existing library I could use ...