[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [pysolar-discuss] Leap seconds
[Thread Prev] | [Thread Next]
- Subject: Re: [pysolar-discuss] Leap seconds
- From: Brandon Stafford <brandon@xxxxxxxxxxxxxxx>
- Date: Sun, 2 Aug 2015 15:05:50 -0400
- To: Naz Gassiep <naz@xxxxxxxxxxx>
- Cc: pysolar-discuss@xxxxxxxxxxx
Hi Naz, This sounds like a great idea. I would suggest a CSV format like: 2015, 1, 0 with one line for each year. A couple of other suggestions: 1. It would be good if Pysolar could read in all the leap-second data when it is imported, rather than re-opening, parsing, and closing the CSV file for every calculation. 2. Rather than updating the CSV file with a script, I would prefer to add to the user warning something like "You can get an updated version of the leap-second adjustments at https://github.com/pingswept/pysolar/blob/master/pysolar/leap-seconds.csv. The old file that needs updating is at <path-to-current-csv-file> on the computer running Pysolar. If that seems complicated, you could also try update to the newest version of Pysolar." But these are just suggestions-- I'll most likely go along with whatever code you're willing to write, provided it produces accurate results. Commentary from other Pysolar users definitely welcome. Cheers, Brandon On Sat, Aug 1, 2015 at 10:15 PM, Naz Gassiep <naz@xxxxxxxxxxx> wrote: > Hi all, > When calculating for dates beyond 2015, the user warning "I don't know > about leap seconds after 2015" is emitted. > > The leap second list is embedded in time.py . Surely a better architecture > would be to have this list split out into an external file, something > simple and human readable like csv or even just space delimited. That way > updates could easily be published on the pysolar web site as a simple file > to download and put into your pysolar directory. We could even have a > pysolar script that you run which fetches this file from the web site. > > If this suggestion is workable, I'm ok doing the work to make it happen > (refactoring the code to split out the list, selecting an appropriate > format, writing a script to fetch leap second data, etc). > > Thoughts? > - Naz. > > -- > *Nazeer Gassiep* > > E-mail: naz@xxxxxxxxxxx > Phone: +61 400 460 662 > > > السلام عليكم > -- Brandon Stafford Rascal Micro: small computers for art and science Somerville, MA, USA
[pysolar-discuss] Leap seconds | Naz Gassiep <naz@xxxxxxxxxxx> |