Skip to main content

A library high accuracy ephemeris in REBOUND

Project description

Version GPL Python unit tests) C unit tests DOI

ASSIST

ASSIST is a software package for ephemeris-quality integrations of test particles. ASSIST is an extension of the REBOUND framework and makes use of its IAS15 integrator to integrate test particle trajectories in the field of the Sun, Moon, planets, and 16 massive asteroids, with the positions of the masses coming from the JPL DE441 ephemeris and its associated asteroid perturber file. The package incorporates the most significant gravitational harmonics and general relativistic corrections. ASSIST also accounts for position- and velocity-dependent non-gravitational effects according to the Marsden (1973) model. All components in the equations of motion have been verified to machine precision in a term-by-term comparison with output from JPL's small body integrator. The first order variational equations are included for all terms to support orbit fitting and covariance mapping. This framework is meant to provide an open-source package written in a modern language to enable high-precision orbital analysis and science by the small body community.

Planet ephemeris formats (DE440)

ASSIST supports both ASCII-derived binary ephemerides (e.g., linux_p1550p2650.440 / .441) and NAIF SPK .bsp kernels (e.g., de440.bsp) for planets:

  • If you pass a planets file, ASSIST auto-detects its format at init and uses the matching provider.
  • If you omit the planets path and set ASSIST_DIR, ASSIST will try (in order):
    • ASSIST_DIR/de441.bsp
    • ASSIST_DIR/de440.bsp
    • ASSIST_DIR/linux_m13000p17000.441
    • ASSIST_DIR/linux_p1550p2650.440

Asteroids continue to use SPK (sb441-n16.bsp by default), and their masses are joined from the selected planets ephemeris constants.

Constants (AU, EMRAT, J2E, J3E, J4E, J2SUN, RE, CLIGHT, ASUN) are unified onto the ephemeris object and used consistently across force models. Only the required kernel is loaded in memory.

Recommended downloads

# Planets (SPK)
curl https://ssd.jpl.nasa.gov/ftp/eph/planets/bsp/de440.bsp -o assist/data/de440.bsp
# Asteroids (SPK)
curl https://ssd.jpl.nasa.gov/ftp/eph/small_bodies/asteroids_de441/sb441-n16.bsp -o assist/data/sb441-n16.bsp

ASCII-derived binary planets file (smaller coverage) is also supported:

curl https://ssd.jpl.nasa.gov/ftp/eph/planets/Linux/de440/linux_p1550p2650.440 -o assist/data/linux_p1550p2650.440

Installation (Python)

It's easiest to install ASSIST into a python virtual environment. If you already have a virtual environment or do not want to use one, you can skip this step. Otherwise, run the following command in an empty directory. They will setup and activate a new virtual environment in a directory.

python3 -m venv venv
source venv/bin/activate

Now we can install numpy, REBOUND, and ASSIST:

pip install numpy
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.

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/small_bodies/asteroids_de441/sb441-n16.bsp -o data/sb441-n16.bsp

Now you can try out if assist works.

python3

>>> import assist
>>> ephem = assist.Ephem("data/linux_p1550p2650.440", "data/sb441-n16.bsp")
>>> print(ephem.jd_ref)
>>> ephem.get_particle("Earth", 0)

You should see the default reference Julian date (2451545.0) and the position of the Earth at that time printed on the screen.

Installation (C)

To install the C version of ASSIST, first clone the REBOUND and then the ASSIST repositories. In an empty directory, run:

git clone https://github.com/hannorein/rebound.git
git clone https://github.com/matthewholman/assist.git

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/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

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.

cd assist/examples/asteroid
make

Now, you're ready to run the example with:

./rebound

License

ASSIST is open source, freely distributed under the GNU General Public license, version 3.

Contributors

  • Matthew J. Holman, Center for Astrophysics | Harvard & Smithsonian, mholman@cfa.harvard.edu
  • Arya Akmal, Montgomery College, Rockville
  • Davide Farnocchia, Jet Propulsion Laboratory, California Institute of Technology
  • Hanno Rein, University of Toronto, hanno@hanno-rein.de
  • Matthew J. Payne, Center for Astrophysics | Harvard & Smithsonian
  • Robert Weryk, University of Western Ontario
  • Dan Tamayo, Harvey Mudd College, dtamayo@hmc.edu
  • David M. Hernandez, Center for Astrophysics | Harvard & Smithsonian

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

assist-1.2.0.tar.gz (61.5 kB view details)

Uploaded Source

File details

Details for the file assist-1.2.0.tar.gz.

File metadata

  • Download URL: assist-1.2.0.tar.gz
  • Upload date:
  • Size: 61.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for assist-1.2.0.tar.gz
Algorithm Hash digest
SHA256 7ac7293baec207fe813564d4aa75242c5e7c977c16ff723b037c619352f02559
MD5 0b68a91e8003dd8162da1e22165c399b
BLAKE2b-256 b72fc4c50225a335f7b3df1df7a7d2657b310aa3ecece95a04753f55548e07e7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page