Jump to content

Banner.jpg.b89429c566825f6ab32bcafbada449c9.jpg

Downloadable moon rise/set times?


BrendanC

Recommended Posts

Hi all,

I have a spreadsheet that I use to help me plan my shoots. To plan around the Moon, I've been using data from this site, because it very conveniently allows me to download the output as a CSV file which is easy to import into Excel: https://in-the-sky.org/ephemeris.php?startday=31&startmonth=12&startyear=2021&ird=1&irs=1&ima=0&iph=1&ias=0&iss=0&iob=0&ide=0&ids=0&interval=1&tz=0&format=html&rows=25&objtype=1&objpl=Moon&objtxt=the%2BMoon&town=2643743

However, I just realised: it's wrong.

On days when there's no moonrise or set, for example 7 Feb or indeed tonight (22 Feb, which is how I just spotted this), it seems to get confused, with the times offset by a day before or after - I've checked it against several other sources. It sort of seems to get back into sync somehow, but basically, it's wrong. I had a similar problem when using this site to locate a comet a while ago, emailed the guy who runs it, got no response. I've emailed him again about this, but I don't expect a response this time either.

I've tried building in clever functions to my spreadsheet that recognise this and skip a day or go back a day, but I think there are other strange, random issues with the data besides this.

So I need an alternative source.

Previously, I used this site, but it's a pain to have to copy the table, paste it, extract the data, etc: https://www.timeanddate.com/moon/uk/london

OK, maybe a couple of hours or thereabouts, but still a pain. And I'm lazy. It also doesn't have the Moon's RA and Dec which I also find handy, to calculate how close a given DSO in my target list will be to it.

So I was wondering if anyone else knew of any other sites that actually show the correct data, and that have a download feature?

Thanks, Brendan

Edited by BrendanC
Link to comment
Share on other sites

What I think it does is give the time that the Moon would rise if the moon was at the position it is at at 00h00m00s on the date given. 

If you check with Stellarium it does much the same thing, so that it gives different rising times depending on whether you ask for the rising time at 0h, 12 h or 23h

 

 

 

Link to comment
Share on other sites

46 minutes ago, BrendanC said:

Hi all,

I have a spreadsheet that I use to help me plan my shoots. To plan around the Moon, I've been using data from this site, because it very conveniently allows me to download the output as a CSV file which is easy to import into Excel: https://in-the-sky.org/ephemeris.php?startday=31&startmonth=12&startyear=2021&ird=1&irs=1&ima=0&iph=1&ias=0&iss=0&iob=0&ide=0&ids=0&interval=1&tz=0&format=html&rows=25&objtype=1&objpl=Moon&objtxt=the%2BMoon&town=2643743

However, I just realised: it's wrong.

On days when there's no moonrise or set, for example 7 Feb or indeed tonight (22 Feb, which is how I just spotted this), it seems to get confused, with the times offset by a day before or after - I've checked it against several other sources. It sort of seems to get back into sync somehow, but basically, it's wrong. I had a similar problem when using this site to locate a comet a while ago, emailed the guy who runs it, got no response. I've emailed him again about this, but I don't expect a response this time either.

I've tried building in clever functions to my spreadsheet that recognise this and skip a day or go back a day, but I think there are other strange, random issues with the data besides this.

So I need an alternative source.

Previously, I used this site, but it's a pain to have to copy the table, paste it, extract the data, etc: https://www.timeanddate.com/moon/uk/london

OK, maybe a couple of hours or thereabouts, but still a pain. And I'm lazy. It also doesn't have the Moon's RA and Dec which I also find handy, to calculate how close a given DSO in my target list will be to it.

So I was wondering if anyone else knew of any other sites that actually show the correct data, and that have a download feature?

Thanks, Brendan

I notice timeanddate has an priced option for using an API or downloading the data is csv format. The basic package may give you what you need at $99 per year, but you can get a free trial to confirm. https://dev.timeanddate.com/astro/pricing

  • Like 1
Link to comment
Share on other sites

  

18 minutes ago, Gfamily said:

What I think it does is give the time that the Moon would rise if the moon was at the position it is at at 00h00m00s on the date given. 

 

 

But it's still displaying incorrect times though, right?

For example, it says the Moon rose at 20:44 on 20 Feb. It didn't. It rose at 22:03. On the previous day, the 19th, it rose at 20:44. So it's a day out.  (These are local times to me btw, I don't actually live in London, but you might see the same anomalies if you specify your location).

Edited by BrendanC
Link to comment
Share on other sites

1 minute ago, BrendanC said:

Hmmm, interesting, and it could be all copied and pasted very quickly, but that big, square layout would take a radical rewrite of my spreadsheet to read that format.

Thanks anyway, it's a definite contender. :)

or how about this? Same website - not quite the positioning you want but this may be the best you get for free - use this link https://aa.usno.navy.mil/data/mrst

image.png.80d81ae47141058f2f263f5f7eec670d.png

  • Like 1
Link to comment
Share on other sites

2 minutes ago, cwis said:

Want me to have delve for you? I'm not a Python person but it seems simple enough for what you want it to do...

Thanks! It's a very kind offer, and if your Python prog could do this for my lat/long, for a year (or more!), outputting a nice CSV or similar format, I'd definitely be up for it. Only if you'd be doing this for your own amusement (which is kind of what I'm doing with this spreadsheet, truth be told).  Ideally it would also do the Moon's RA, Dec, culmination, height at culmination and phase, but I realise that's pushing it...! 

Edited by BrendanC
Link to comment
Share on other sites

3 minutes ago, BrendanC said:

Thanks! It's a very kind offer, and if your Python prog could do this for my lat/long, for a year (or more!), outputting a nice CSV or similar format, I'd definitely be up for it. Only if you'd be doing this for your own amusement (which is kind of what I'm doing with this spreadsheet, truth be told).  Ideally it would also do the Moon's RA, Dec, culmination, height at culmination and phase, but I realise that's pushing it...! 

Well I'm kind of forcing myself to learn Python at the moment so an interesting short task is probably ideal.

Let's start with moonrise and moonset and I'll add the rest of the columns - those two look the hardest believe it or not.

The charts go to 2050 by the way...

I'll fire up my python environment (Raspberry zero!) and get started.  I may be able to find somewhere to host it online too - may be handy!

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

Hmmm. 

Does this data look valid? It's calculated between timenow and timelater (24 hours from now) for the moon. I THINK it's in GMT but the time settings are obviously critical in this and I'm trying to get my head round them... Not sure the location is set correctly in my Pi and I'll need to do that to get a valid datetime object.

I'm just cutting and pasting various examples in the docs at the mo - fastest way to gain understanding!

timenow 2022-02-22 17:49
timelater 2022-02-23 17:49
2022-02-23 00:47 Rise
2022-02-23 09:34 Set
['Meridian transit', 'Antimeridian transit']
['2022-02-23 05:16', '2022-02-23 17:44']
Ra now  15h 04m 07.35s
Dec now -16deg 38' 03.1"
Moon phase now: 254.5 degrees
 

If I get sensible numbers I know I have the datetime correct and I can sort out the rest of the calcs and format the output for you! It looks like the data comes back in arrays thanks to numpy so that should be pretty easy.

Edited to add - locations is (+51.6441483, 0.7694381)

Edited by cwis
added location for calcs
Link to comment
Share on other sites

Not downloadable data, so sorry - a bit off topic, but there's an App I use on my iPhone called APT Darkness Clock. This tells you for any date (defaults to today) all the twilight times, the moonrise, moonset, and illumination, and right at the top a Start and End time for totally dark moonless deep sky imaging (or n/a if none). I was moving towards keeping my own record, but I find this so quick and easy, that I don't bother. I also figure that detailed planning in advance is a bit soul destroying given the paucity of clear nights here!  So I just mark NEW MOON in my diary, and use the App when there's half a chance of a clear night and start my plans from there.

https://astrophotography.app/mobile_apps.php

Link to comment
Share on other sites

Hi all,

to close off this topic nicely, I wrote Brendan a simple Python program to get the data he needed, which I've enclosed in case anyone else finds it handy!  I've commented it fairly extensively so it's probably a nice base for hacking about with even if you're a newcomer to Python (which I am too!)

During the course of my research I found the source that I think Brendan's original web source was using - it's the JPL Horizon app, and access is free:

https://ssd.jpl.nasa.gov/horizons/app.html#/ 

API access is also free...  I think the issue Brendan had was caused by the parser on the website he was using not being set up to deal will NULL fields from the JPL API - the previous value in that field was printed instead. Tut tut!

The Python program uses the module skyfield as mentioned in a previous post. If anyone wants to mess with the program (assuming windows):

Install Python https://www.python.org/downloads/windows/  

Once done:

In a cmd window type "pip install skyfield" and hit enter (this downloads and installs the module required by the program and supporting modules).

Download the program from this post and stick it in a folder.

Navigate to the folder with your cmd window and type "domaths.py" and hit enter to run it. It will output to the screen - redirect to a file in the same directory like this: "domaths.py > afile.csv"

Currently it will print out a year's worth of data, and the location for moonrise calculations etc is set to my house - both can easily be changed by editing the program in a text editor and saving it:

Change this line to match your location:

 

yourhouse = api.wgs84.latlon(+51.6441483, 0.7694381)

Change this line to change the number of days:

datelist = list((base + delta *x for x in range(1,365))) 

If anyone wants assistance or questions about this program answering - ask!

 

domaths.py

Edited by cwis
Added file.
  • Like 3
Link to comment
Share on other sites

Brendan Hi Ithink I can also help you here. Some time ago I wrote myself a spreadsheet-based Planisphere which I now use to plan all my sessions and see what the sky is doing. I can easily use it to generate the data you need. I've appended a spreadsheet screengrab below which shows what I can produce. I'll happily send you a file of the data you need, but I need a couple of things from you first:

- PM me the coordinates you want me to use;

- What time do you want the Moonphase calculated for? In the example below I've assumed 7pm;

- Similarly for RA and Dec, I've assumed 7pm local;

- Do you want me to adjust for daylight saving or leave the times as non-daylight-saving? Say I send you 10 years' data, the rules for daylight saving might change in the future so I think "non" is probably best, then you can make your own adjustment;

Cheers, Magnus

ExampleEphemeris.JPG

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. By using this site, you agree to our Terms of Use.