For a detailed description of the project, take a look at publication at JGR: Solid Earth. This publication was also highlighted in Eos. Take a look to the article Should I Stay or Should I Go…To Another Paleomagnetic Site? by Daniel Pastor-Galán.
This repository contains all the notebooks and code to reproduce the analysis for the different sampling procedures in order to estimate the precision of different strategies for estimating paleomagnetic poles and paleosecular variation of the magnetic field based on site magnetizations.
You can open a cloud JupyterHub version of all the code in this repository and execute it using the following Binder link:
Learn more about the Binder project in this link. Note that it will take a very long time to load.
The notebooks in this repository can be directly been access though the following JupyterBook. This link opens a website where all the notebooks can be visualized.
This repository includes a series of tools and code organized in different folders:
notebooks
: It includes Jupyter Notebooks with examples of different sampling procedures and the code to parallelize the simulations using Dask (Parallel.ipynb
).figures
: It includes all the Jupyter Notebooks to generate the figures in the paper.outputs
: It includes the simulated data from all the simulations used in the figures incsv
format.smpsite
: Python package to run simulations and estimate poles and dispersion (see Installation for more information).
We also provide an environment.yml
and Makefile
for setup of the computational environment used for this project.
All the notebooks inside this notebook can be executed after properly setting the environment. The environment.yml
file can be used to
install all the required dependencies. Beside some standard Python dependencies, the environment.yml
file include the installation of
Pmagpy
using pip and the extra installation of the module smpsite
(included in this repository). The package smpsite
includes all the code used to make the simulations and compute the
estimated poles.
In order to install the environment, you can use conda or mamba (see Managing Environments for more information) with conda env create -f environment.yml
. Once the environment is created, you can create the associated iPython kernel with
python -m ipykernel install --user --name paleostats --display-name "IPython - PaleoStats"
This will allow you to execute this environment directly from Jupyter notebooks.
Alternatively, we included a Makefile
that creates the conda environment and installs the associated iPython kernel so this environment can be accessible though Jupyter notebooks all at once. In order to use the Makefile, you need to open a terminal where the repository is located and enter
make env
Alternatively, if you just want to install the smpsite
module, you can clone this repository and do
pip install smpsite
or
pip install -e smpsite
if you are working in developer mode.
The current repository contains a Makefile
that allows the user to run different routines on the code. You can move in a terminal to the
path to this repository and use the following commands to trigger their respective actions.
make env
: Creates the conda environment associated with theenvironment.yml
file and then creates the respective iPython kernel such that the environment can be accessed via Jupyter notebooks.make help
: Prints a short description of all available commands and their explanation.
If you want to cite this work, please use this BibTex citation from our latest preprint:
@article{sapienza2023quantitative,
title = {Quantitative Analysis of Paleomagnetic Sampling Strategies},
author = {Sapienza, Facundo and Gallo, Leandro Cesar and Zhang, Yiming and Vaes, Bram and Domeier, Mathew and Swanson-Hysell, Nicholas L},
journal = {Authorea Preprints},
year = {2023},
publisher = {Authorea}
}
If you want to cite the software in this repository, you can instead use the following DOI in Zenodo:
or simply use the bibtex format
@software{Sapienza_PaleoSampling,
author = {Sapienza, Facundo and Gallo, Leandro Cesar and Zhang, Yiming and Vaes, Bram and Domeier, Mathew and Swanson-Hysell, Nick},
title = {PaleoSampling},
month = sep,
year = 2023,
note = {{Quantitative Analysis of Paleomagnetic Sampling Strategies}},
publisher = {Zenodo},
version = {v1.0.0},
doi = {10.5281/zenodo.8347149},
url = {https://doi.org/10.5281/zenodo.8347149}
}
Facundo Sapienza 📖 💻 🚇 🎨 🚧 |
Leandro Gallo 💻 🐛 🧑🏫 🎨 💬 |
Nick Swanson-Hysell 👀 📖 🎨 🧑🏫 💻 |
matdomeier 🤔 🎨 |
Bram Vaes 🎨 🤔 |
Yiming Zhang 🤔 |