Giter Site home page Giter Site logo

bjdarrer / planetprofile Goto Github PK

View Code? Open in Web Editor NEW

This project forked from vancesteven/planetprofile

0.0 0.0 0.0 639.89 MB

Matlab software for constructing 1D interior structure models based on planetary properties. Self-consistent thermodynamics are used for fluid, rock, and mineral phases. Sound speeds, attenuation, and electrical conductivities are computed as outputs.

License: GNU General Public License v3.0

C++ 7.05% Python 16.82% C 0.85% Java 0.45% MATLAB 73.97% M 0.02% Mathematica 0.36% Makefile 0.48%

planetprofile's Introduction

PlanetProfile v2.0.0

Software framework for constructing 1D interior structure models based on planetary properties. Self-consistent thermodynamics are used for fluid, rock, and mineral phases. Sound speeds, attenuation, and electrical conductivities are computed as outputs. The main code is called from an input file containing all the planetary data.

Acknowledging PlanetProfile

We want to hear about your work with PlanetProfile! Please consider sending us a message alerting us to your work ([email protected]). Suggested acknowledgement in publications: "Data used in this work were generated using the open source PlanetProfile software hosted on GitHub."

Getting started

PlanetProfile is available in Python and Matlab.

For Python, the recommended way to install is with with pip:

  1. (Recommended) Install all dependencies listed in the next section before proceeding.
  2. At a terminal: python -m pip install PlanetProfile Python 3.8 or higher is required. Pip will install dependencies, but a conda environment with the prerequisites listed below is recommended.
  3. Create a directory where you'd like to store configurations and have folders for each body.
  4. Navigate into the new directory.
  5. At a terminal: python -m PlanetProfile.install PPinstall This will copy files from their defaults to the current directory.
  6. Run the software with, for example: python -m PlanetProfile.Main Europa or python -m PlanetProfile.Main path/to/PPBody.py or in a Python script with from PlanetProfile.Main import RunPPfile RunPPfile('Europa', 'PPEuropa.py')

For Matlab:

  1. Download or clone this repository.
  2. Install prerequisites below.
  3. At a terminal: make install Or, add everything in the top-level directory except the PlanetProfile sub-folder to the Matlab path.
  4. In Matlab, set the current directory to the top-level directory of the downloaded repository (top PlanetProfile folder).
  5. Run the software with PPEuropa in the Matlab command prompt, or by opening and running one of the files located at Body/PPBody.m (e.g. Titan/PPTitan.m).

Prerequisites

A simple list with install commands for Python is in the next section.

  • SeaFreeze -- see https://github.com/Bjournaux/SeaFreeze
    • Python: Installed with pip: pip install SeaFreeze
    • Matlab: Download the repository to Thermodynamics/SeaFreeze and add the contents to the Matlab path.
  • MoonMag -- see https://github.com/itsmoosh/MoonMag
    • Python only -- Installed with pip: pip install MoonMag
    • In Matlab, magnetic induction calculations are performed numerically and cannot incorporate lateral asymmetry in conducting layers.
  • Gibbs Seawater toolbox of TEOS-10 -- see https://www.teos-10.org/
    • Python: Installed with conda via conda-forge: conda install -c conda-forge gsw
    • Matlab: Already packaged into the PlanetProfile repository along with the original license.
  • Perple_X -- see http://www.perplex.ethz.ch/
    • For both Python and Matlab, Perple_X outputs are currently hosted as part of the installation, in Thermodynamics/Perple_X for Matlab and in PlanetProfile/Thermodynamics/EOSdata/Perple_X for Python. The files we use were generated with Perple_X v6.7.9.
  • TauP/ObsPy (optional) -- see https://www.seis.sc.edu/taup/
    • Python: Installed with conda via conda-forge: conda install -c conda-forge obspy
    • Matlab: Already packaged into the PlanetProfile repository along with the original license.
  • A working TeX/LaTeX distribution (such as TeXlive) is recommended for optimum plot labels. TeXlive is available at: https://tug.org/texlive/acquire-netinstall.html

Installation of prerequisites

Python

  1. Python version 3.8+ must be installed, preferably via Anaconda. Required modules can be installed in Miniconda with the following command:
  2. conda install numpy scipy matplotlib mpmath
  3. Conda-forge modules can be installed in Anaconda or Miniconda with the following command:
  4. conda install -c conda-forge gsw obspy spiceypy cmasher cartopy
  5. AFTER the above modules have been installed with conda, install SeaFreeze and MoonMag with the following command:
  6. pip install SeaFreeze MoonMag
  7. Finally, install PlanetProfile with pip install PlanetProfile Note that although MoonMag supports use of SPICE kernels with SpiceyPy, their use is not yet implemented in PlanetProfile.

Matlab

  1. Download PlanetProfile repository.
  2. Download SeaFreeze repository to PlanetProfile/Thermodynamics/SeaFreeze/ (NOT PlanetProfile/PlanetProfile/Thermodynamics).
  3. Add SeaFreeze folder and sub-folders to Matlab path. Some magnetic field features require use of the SPICE toolkit through Mice. To install Mice:
  4. Navigate to https://naif.jpl.nasa.gov/naif/toolkit_MATLAB.html
  5. Follow the link for your operating system and download the .zip or .tar.Z file to PlanetProfile/Utilities/spice/
  6. Unpack the archive (into PlanetProfile/spice/mice/)
  7. Add PlanetProfile/Utilities/spice/mice/src/mice/ and PlanetProfile/Utilities/spice/mice/lib/ to your Matlab path.
  8. Install necessary SPICE kernels by downloading them from https://naif.jpl.nasa.gov/pub/naif/generic_kernels/ and placing them in PlanetProfile/Utilities/spice/. The planetary constants kernel (PCK) and leap-seconds kernel (TLS) are saved in this repository, but the generic ephemeris kernels (SPK, .bsp files) are too large for us to save here. There is one for each planet's satellites, located at https://naif.jpl.nasa.gov/pub/naif/generic_kernels/spk/satellites/. Currently in use are:
  9. jup365.bsp
  10. sat427.bsp
  11. ura111.bsp
  12. nep095.bsp

Contributing

PlanetProfile is open source software. Please see the LICENSE file and read the guidelines for contrbuting in CONTRIBUTING.md if you are interested in joining the project. Also see our community guidelines in CODE_OF_CONDUCT.md.

Notes

  • With the PlanetProfile 2.0 release, both Python and Matlab are available. The two branches do not have the same functionality yet with this release--some features exist in each that are not yet found in the other. A later release will align their functionality as much as possible. For now, the Python version is recommended.
  • As of 2020-09-28, PlanetProfile v1.1.0 was released along with code for making calculations regarding magnetic induction. The development (master) branch of PlanetProfile is set up to generate profiles from minimal inputs. Output profiles that may be used along with the induction calculations may be found in the v1.1.0 release.
  • The default settings include a recalculation of all parameters. It is recommended to recalculate all parameters whenever PlanetProfile is updated and any time a change in input parameters may affect layer thicknesses or other intermediate variables.

Some calculations in Python use parallel computing with the multiprocessing builtin module. There are sometimes cross-platform compatibility issues that crop up. By default, multiprocessing is enabled; disable it by setting Params.DO_PARALLEL = False in configPP.py.

planetprofile's People

Contributors

itsmoosh avatar vancesteven avatar mniesyt avatar artlis321 avatar mmelwani avatar agmarusiak avatar kivega1 avatar abryant93 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.