forked from matthewholman/assist
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement SPICE (bsp) for planet ephemeris
- Loading branch information
Showing
51 changed files
with
1,074 additions
and
741 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
assist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,18 +25,36 @@ Now we can install numpy, REBOUND, and ASSIST: | |
pip install rebound | ||
pip install assist | ||
|
||
To use use ASSIST, you also need to download ephemeris data files. One file for planet ephemeris and another suplementary file for asteroid ephemeris. The following commands download these files with curl. You can also manually download them using your browser. Note that these are large files, almost 1GB in size. | ||
To use use ASSIST, you also need to download ephemeris data files. One file for planet ephemeris and another suplementary file for asteroid ephemeris. You can do this with Python packages or by downloading files directly. Note that these are large files, almost 1GB in size. | ||
|
||
pip install naif-de440 | ||
pip install jpl-small-bodies-de441-n16 | ||
|
||
|
||
You can initialize the ephemeris data from the packages like so: | ||
|
||
python3 | ||
|
||
>>> import assist | ||
>>> from naif_de440 import de440 | ||
>>> from jpl_small_bodies_de441_n16 import de441_n16 | ||
>>> ephem = assist.Ephem(de440, de441_n16) | ||
|
||
The variables to the ephemeris files are simply path strings to the files. Alternatively, you can download these files with curl or your browser. | ||
|
||
mkdir data | ||
curl https://ssd.jpl.nasa.gov/ftp/eph/planets/Linux/de440/linux_p1550p2650.440 -o data/linux_p1550p2650.440 | ||
curl https://ssd.jpl.nasa.gov/ftp/eph/planets/bsp/de440.bsp -o data/de440.bsp | ||
curl https://ssd.jpl.nasa.gov/ftp/eph/small_bodies/asteroids_de441/sb441-n16.bsp -o data/sb441-n16.bsp | ||
|
||
Now you can try out if assist works. | ||
Now you can point assist to those files directly, like so: | ||
|
||
python3 | ||
|
||
>>> import assist | ||
>>> ephem = assist.Ephem("data/linux_p1550p2650.440", "data/sb441-n16.bsp") | ||
>>> ephem = assist.Ephem("data/de440.bsp", "data/sb441-n16.bsp") | ||
|
||
Once you've initialized the ephemeris data, you can test that assist is working by running the following commands: | ||
|
||
>>> print(ephem.jd_ref) | ||
>>> ephem.get_particle("Earth", 0) | ||
|
||
|
@@ -51,12 +69,12 @@ To install the C version of ASSIST, first clone the REBOUND and then the ASSIST | |
|
||
To use use ASSIST, you also need to download ephemeris data files. One file for planet ephemeris and another suplementary file for asteroid ephemeris. The following commands download these files with curl. You can also manually download them using your browser. Note that these are large files, almost 1GB in size. | ||
|
||
curl https://ssd.jpl.nasa.gov/ftp/eph/planets/Linux/de440/linux_p1550p2650.440 -o assist/data/linux_p1550p2650.440 | ||
curl https://ssd.jpl.nasa.gov/ftp/eph/planets/bsp/de440.bsp -o assist/data/de440.bsp | ||
curl https://ssd.jpl.nasa.gov/ftp/eph/small_bodies/asteroids_de441/sb441-n16.bsp -o assist/data/sb441-n16.bsp | ||
|
||
For some of the examples, you will also need the planet ephemeris file with an extended coverage. Note that this file is 2.6GB in size. | ||
|
||
curl https://ssd.jpl.nasa.gov/ftp/eph/planets/Linux/de441/linux_m13000p17000.441 -o assist/data/linux_m13000p17000.441 | ||
curl https://ssd.jpl.nasa.gov/ftp/eph/planets/bsp/de441.bsp -o assist/data/de441.bsp | ||
|
||
Next, go to one of the example directories and compile the problem file. This will also trigger the installation of the REBOUND and ASSIST shared libraries. | ||
|
||
|
@@ -81,5 +99,6 @@ ASSIST is open source, freely distributed under the [GNU General Public license, | |
* Robert Weryk, University of Western Ontario | ||
* Dan Tamayo, Harvey Mudd College, <[email protected]> | ||
* David M. Hernandez, Center for Astrophysics | Harvard & Smithsonian | ||
* Alec Koumjian, Asteroid Institute | B612 Foundation, <[email protected]> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
This is the standard location for the ephemeris files, i.e.: | ||
linux_m13000p17000.441 & sb441-n16.bsp | ||
de441.bsp & sb441-n16.bsp | ||
|
||
You can download them from: | ||
|
||
https://ssd.jpl.nasa.gov/ftp/eph/planets/Linux/de440/linux_p1550p2650.440 | ||
https://ssd.jpl.nasa.gov/ftp/eph/planets/bsp/de440.bsp | ||
https://ssd.jpl.nasa.gov/ftp/eph/small_bodies/asteroids_de441/sb441-n16.bsp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.