Skip to main content

Forward function to generate chlorine36 concentration profiles associated to sesimic history

Project description

eqchlorine

Python script to generate chlorine 36 profile on fault scarp.

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.

Install

Just download the package, extract it in your working directory.

  • Requirements :
  • Python 3.9
  • numpy
  • matplotlib
  • scipy
  • colorama

Creating a virtual environment to install those libraries is highly recommended

  1. With Conda/Miniconda: From your terminal : enter the following command
pip install eqchlorine

Check out your installation: In your terminal, enter the following command :

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 MIT. 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 : Pymodelscarp. The heart Pymodelscarp project is to make a user-friendly code to invert chlorine 36 data in order to retrieve earthquake sequences. Python was the obvious choice because Python is open-source, easy to use and offers a 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. '/n' 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"

I am new to Python : How do I use EQCHLORINE ?

Make sure your "data.txt", "coll.txt" and "sf.txt" files are in the correct format ('txt') and have the correct name:

  • Copy your data files in the src directory
  • Open "parameter.py" and enter your site parameters.
  • Open "seismic_scenario.py" and set your earthquake sequence.
  1. From a terminal window, in src directory, 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 You should find in "example" folder an example for the MA3 site located on the Magnola fault (Schlangenhauf et al. 2010).

What does my package contain ?

LICENSE.txt : the declared license README.md : the read_me file src : folder with the source code example : example folder with data from Magnola Fault (Schlangenhauf et al. 2010)

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

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.9.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

eqchlorine-0.0.9-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file eqchlorine-0.0.9.tar.gz.

File metadata

  • Download URL: eqchlorine-0.0.9.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for eqchlorine-0.0.9.tar.gz
Algorithm Hash digest
SHA256 1e08b54e0e69102ce9462c2b6f19a76cb6949e254343d8246b21ba17dac6b2f7
MD5 ff6f920f36f18a99f7e838acbf209eb9
BLAKE2b-256 f31841997f5ab98eac428b0185077ca2f0081ac824d3708e38360e9171311bff

See more details on using hashes here.

File details

Details for the file eqchlorine-0.0.9-py3-none-any.whl.

File metadata

  • Download URL: eqchlorine-0.0.9-py3-none-any.whl
  • Upload date:
  • Size: 5.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for eqchlorine-0.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 8556882a181764f2cdc567bdcc18c051a346fb81ae858e6e14a4dbcbda9da2bc
MD5 97aba5d3725bd9cd3d37f51ba18c5f40
BLAKE2b-256 22a0ec885d8d60c97dd33cd8509def2611142fed091e3ae8d0d53e2aec5f3bd0

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