Skip to main content

Forward function to generate chlorine36 concentration profiles associated to sesimic history

Project description

EQCHLORINE

Python

![Build Status] First release

About

EQCHLORINE is a python package designed to generate synthtic chlorine 36 concentration profiles associated to seismic sequence. This code is the adaptation in python of an earlier published code : Modelscarp (Schlagenhauf et al. 2010). Modelscarp (matlab) is the basis of many algorithm to retrieve earthquake sequence with chlorine 36 sampling profiles on limestone.

Python

Documentation:

Requirements:

  • Python 3.7
  • numpy
  • scipy
  • matplotlib
  • colorama

Install release version:

EQCHLORINE can be installed with pip:

pip install eqchlorine

If you get an error about permissions, you are probably using your system Python. In this case, we recommend using pip's "user install" option to install eqchlorine into your user directory:

Run tests:

cd test
python3 run_test.py

Citation

If you use EQCHLORINE in a publication, please cite the original Modelscarp paper (Sclagenhauf et al. 2010).

License

The license for all parts of the code derived from modelscarp is LGPLv3. The license for each file is explicitly stated at the top of the file and the full text of each license can be found in licenses.

FAQ

Why go to Python ?

EQCHLORINE is just the fisrt step of a wider project : making an inversion algorithm in order to retrieve earthquake sequences. The heart of this project is to make a friendly user code to invert chlorine 36 data. Python was the obvious choice because its large catalogue of libraries. EQCHLORINE will be the core of the inversion code, as it will be used as a forward function for the coming inversion code.

What changes with modelscarp ?

  • The package was reorganised for readibility and optimization purposes

  • The long term history of the fault is calculated following (Tesson & Benedetti 2019) and is now calculated as a function of the longterm relief

What is the format for the data files?

All your data files must be in .txt format. The chemistry of the samples must be stored in a "data.txt" file The chemistry of the colluvium must be stored in a "coll.txt" file The magnetic filed data must be stored in "sf.txt" file. For further formating see "format_you_data.pdf"

How do I use EQCHLORINE ?

Make sure your "data.txt", "coll.txt" and "sf.txt" files are in the correct format. Copy your data files in your working directory (same directory of the "run_forward.py" file) Open "parameter.py" and enter your site parameters. Open "seismic_scenario.py" and set your earthquake sequence.

  1. From a terminal window, run the following command :
python3 run_forward.py
  1. From IDE (PyCharm, Spyder, ...) : Open "run_forward.py" and hit the run button

Few files will be created:

  • "results.txt" file will be created and will contain the resulting chlorine 36 concentration profile.
  • "plot.png" plot with the synthetic profile associated with the long-term history and the final chlorine 36 concentration profile.
  • "inputs.pckl" file, the input paramters you used to generate the profile

What does my package contain ?

LICENSE.txt : the declared license README.md : the read_me file src : folder with the source code

In the src folder, you will find :

  • constants.py : all the constants used
  • parameters.py : inputs parameters
  • seismic_scenario.py : the input seismic sequence
  • chemistry_scaling.py : functions that calculates the 36cl concentration due to chemistry
  • geometric_scaling.py : functions that calculates the incident cosmogenic flux
  • forward_function.py : the main function from which the final 36cl is calculated
  • run_forward.py : script to run the code

You can also find a "util" folder containing basic functions used in the geometric_scaling.py

I have more questions!

Open a discussion on the GitHub Discussions pageGithub-flavored Markdown

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

eqchlorine-0.0.1.tar.gz (21.9 kB view hashes)

Uploaded Source

Built Distributions

eqchlorine-0.0.1.0-py3-none-any.whl (29.7 kB view hashes)

Uploaded Python 3

eqchlorine-0.0.1-py3-none-any.whl (29.6 kB view hashes)

Uploaded Python 3

Supported by

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