Commit Graph

286 Commits

Author SHA1 Message Date
Brandon Rhodes b5d3a5f297 Add support for old NASA kernels like de405.bsp
Fixes #12.
2015-08-03 23:23:28 -04:00
Brandon Rhodes 33bf5a824a Simplify SPK constructor by demanding DAF argument 2015-08-03 23:23:28 -04:00
Brandon Rhodes 7884c8039a Merge pull request #10 from Juanlu001/conda-recipe
Added conda recipe
2015-08-03 23:18:25 -04:00
Brandon Rhodes 0f0bf19179 Fix typo pointed out in #12 2015-06-22 23:12:35 -04:00
Brandon Rhodes f1045acc72 Fix exception caused by coefficient_count=2 2015-06-02 10:58:26 -04:00
Brandon Rhodes 74d117550a Fix final test message for Python 2.6 2015-06-02 10:25:54 -04:00
Brandon Rhodes bb174e3906 Expand jpltest.py to understand targets 11, 12, 13 2015-06-02 09:42:03 -04:00
Brandon Rhodes 36c0cc073b Remove unused import 2015-06-01 23:47:59 -04:00
Brandon Rhodes 397ca0d70c Add changelog entry 2015-04-20 12:09:43 -04:00
Brandon Rhodes 7e310bdc2f Add a simple command line to the module 2015-04-20 12:08:05 -04:00
Juan Luis Cano Rodríguez 7a7c3b9e4f Added conda recipe 2015-04-04 20:20:57 +02:00
Brandon Rhodes 2e74682980 Update changelog and version for 2.1 2015-02-24 01:55:51 -05:00
Brandon Rhodes 26c75cd27f Issue friendlier error for files not in 'b' mode 2015-02-13 06:41:20 -05:00
Brandon Rhodes 1fd914f568 Switch from one big mmap() to an mmap() per array
Bringing the whole file in at once was offering the error

OSError: [Errno 12] Cannot allocate memory

in experiments I was doing with Skyfield with Jovian moons, because of
the large size of jup310.bsp plus some other data that I was using.  So
with this change, jplephem uses mmap() separately for each segment the
user needs, making it possible to map only one — or a few — segments of
a file at a time, discarding older ones as newer ones are needed and
limiting the amount of simultaneously mapped memory required.
2015-02-13 06:28:47 -05:00
Brandon Rhodes 5a4e7abfb4 Have Travis CI do a real install from .tar.gz 2015-02-08 15:20:04 -05:00
Brandon Rhodes 4f7a3aafdf Final documentation tweaks for 2.0 2015-02-08 15:17:22 -05:00
Brandon Rhodes 32a51f52c2 Change main computation routine to a generator
This is kind of magic.  Because it is now a generator, you have the
option of asking for position, then only proceeding to the velocity if
you need it, without having to repeat the work of getting to that point
again.
2015-02-08 14:31:07 -05:00
Brandon Rhodes 2f7dfefd43 Further document the new API, in code and README 2015-02-08 14:04:49 -05:00
Brandon Rhodes c4575cc1d1 Pivot to index segments by both center and target
The great wonder of writing documentation once again asserts itself!
Only while writing up the documentation — frighteningly enough, the last
step before release — did I realize that the API was dangerously
misleading because it let you just ask the position of a target, without
any context as to where the measurement was from.

So the quick go-to indexing that the SPK object supports — which I now
like so very much that I have promoted it to the __getitem__ of the
kernel object — now makes the user name both the center and the target
that they want a vector between.
2015-02-08 13:03:19 -05:00
Brandon Rhodes 7b0ceefc24 Title-case target names when printing a segment 2015-02-08 12:12:25 -05:00
Brandon Rhodes 19248ff89e Fix D''ARREST so that it becomes D'ARREST 2015-02-08 11:58:35 -05:00
Brandon Rhodes 95199b0114 Start documenting new SPK capabilities 2015-02-08 05:32:37 -05:00
Brandon Rhodes f7cf0bf6b5 Remove legacy ephemerides instructions from README 2015-02-08 04:29:00 -05:00
Brandon Rhodes e9896e4c9d Quick benchmark script to test new performance 2015-02-08 04:27:09 -05:00
Brandon Rhodes 360ed0107f Switch to SPK.open() if the user has a path
Because, what if they have an open file instead?  The previous design
made it impossible to ever just keep their file open and have the SPK
class use it.
2015-02-08 04:18:49 -05:00
Brandon Rhodes f928bbe74a Elide now-useless "segment" parameter to compute() 2015-02-08 03:52:30 -05:00
Brandon Rhodes 1c494092aa Add claims of Python 2.6 and 3.4 compatibility 2015-02-08 03:40:13 -05:00
Brandon Rhodes 7a4e856e84 Remove extraneous "print" from test 2015-02-08 03:37:39 -05:00
Brandon Rhodes f339fbd5f3 Be more careful to make array dimensions ints 2015-02-08 03:37:04 -05:00
Brandon Rhodes 2491588038 Switch JPL tests to our SPK code with DE430 2015-02-08 03:31:53 -05:00
Brandon Rhodes 9447048a25 Have segments, when printed, include object names 2015-02-08 03:15:45 -05:00
Brandon Rhodes bc8192f66a Quick awk script to parse target names 2015-02-08 02:19:00 -05:00
Brandon Rhodes 6e64e93565 Make SPK pretty-print, and able to return scalars
Two conveniences that I myself need while working with "jpltest.py".
2015-02-08 01:52:23 -05:00
Brandon Rhodes 79b53434a9 Remember to tell Travis where package lives now 2015-02-08 01:31:39 -05:00
Brandon Rhodes 23f9f7f4cf Move crucial DAF format checks earlier during init
Checking the file type should be first, before trying to determine the
endian-ness.
2015-02-08 01:29:32 -05:00
Brandon Rhodes fff52d0106 Promote "jplephem" and its "setup.py" to top level
Now that the main point of this package is the "jplephem" module for
reading SPK kernels, we should go ahead and promote it to being a top
level directory.
2015-02-08 00:40:43 -05:00
Brandon Rhodes 5d5d52b686 Remove old "tox.ini" file 2015-02-08 00:37:51 -05:00
Brandon Rhodes a56040b044 Move old Python-format ephemerides to "legacy"
Because bare directories with *.py files inside are now considered
packages to Python 3, these directories were being grabbed by the
"import" statement during certain tests, instead of letting Python find
the actual installed ephemerides packages.  Bumping them down a level
solves the problem, and also unclutters the top level.
2015-02-08 00:32:11 -05:00
Brandon Rhodes d8180b7364 Git-ignore files of test data from JPL 2015-02-08 00:31:42 -05:00
Brandon Rhodes b45eaccf4d Write, and test, a pretty str() for Segment 2015-02-08 00:15:25 -05:00
Brandon Rhodes 1cc4d8bf3b Repent of crazy namedtuple; make Segment a class 2015-02-08 00:03:20 -05:00
Brandon Rhodes 75ff7383c4 Remove dict comprehension to succeed under 2.6 2015-02-07 23:05:00 -05:00
Brandon Rhodes c9a51f1a7b Fix Travis tests by downloading necessary file 2015-02-07 21:30:24 -05:00
Brandon Rhodes e621443749 Add SPK to tests, and clean up SPK some more 2015-02-07 20:48:05 -05:00
Brandon Rhodes 7d5d84373f Parameterize tests to be independent of Ephemeris 2015-02-07 19:31:42 -05:00
Brandon Rhodes ff46a58065 Tighten most test precision by 100x 2015-02-07 19:26:23 -05:00
Brandon Rhodes e800059767 Try to make tests importable under Python 2.6 2015-02-07 19:21:29 -05:00
Brandon Rhodes 27a77343d9 Add Travis CI integration 2015-02-07 19:16:48 -05:00
Brandon Rhodes 541302e1e7 Skip simple tests if DE421 is not installed 2015-02-07 19:16:26 -05:00
Brandon Rhodes d5e0de7970 Ignore SPK files downloaded for tests 2015-02-07 19:08:46 -05:00