Package: eqchlorine
eqchlorinePython 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.InstallJust download the package, extract it in your working directory.Requirements :Python 3.9numpymatplotlibscipycoloramaCreating a virtual environment to install those libraries is highly recommendedWith Conda/Miniconda:
From your terminal : enter the following commandpip install eqchlorineCheck out your installation:In your terminal, enter the following command :cd test
python3 run_test.pyCitationIf you use EQCHLORINE in a publication, please cite the original Modelscarp paper (Sclagenhauf et al.
2010).LicenseThe 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 inlicenses.FAQWhy 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 purposesThe long term history of the fault is calculated following (Tesson & Benedetti 2019)
and is now calculated as a function of the longterm reliefWhat 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 directoryOpen "parameter.py" and enter your site parameters.Open "seismic_scenario.py" and set your earthquake sequence.From a terminal window, in src directory, run the following command :python3 run_forward.pyFrom IDE (PyCharm, Spyder, ...) :
Open "run_forward.py" and hit the run buttonFew 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 usedparameters.py : inputs parametersseismic_scenario.py : the input seismic sequencechemistry_scaling.py : functions that calculates the 36cl concentration due to chemistrygeometric_scaling.py : functions that calculates the incident cosmogenic fluxforward_function.py : the main function from which the final 36cl is calculatedrun_forward.py : script to run the codeYou can also find a "util" folder containing basic functions used in the geometric_scaling.py