astropy/astropy — pull request #59 by eteq (2011-11-09 12:50:14+00:00)
Title: long-based approach to astrotime

This pull request is an approach to implementing the AstroTime package that's somewhat different from #57. The key idea here is that the time is internally represented as a python long in the `AstroTime` class. This allows essentially arbitrary user-selected precsision. It also includes an `ArrayAstroTime` subclass that re-uses most of the `AstroTime` methods, but holds *ndarrays* of times instead of single times per object. The price is the lost of arbitrarily high precision, though (it takes the same approach as @wkerzendorf of using a float64 and int64 together).

A few things that are not yet working:
* datetime/gregorian calendar conversions. These are straightforward to do, but are a bit tricky to do in an array-safe way, so I'm holding off on this until we decide which is the approach to take (vs #57).
* using DeltaAstroTime from an ArrayAstroTime. DeltaAstroTime loses some information because it converts to the AstroTime representation - this can be fixed/adjusted, but will require a bit more thought (again, to be done if this approach is deemed worthy).