This repository contains a series of tutorials to learn and play with the Xdas python library. Xdas is a Python library designed to facilitate the processing and analysis of DAS data.
This tutorial series aims to provide a comprehensive guide to using the Xdas library, from basic data manipulation to advanced analysis techniques.
You first need to setup an working environment. Then the tutorials are organized in a progressive manner, with each tutorial building on concepts introduced in the previous ones. It's recommended to go through them in order.
| Notebook | What it covers |
|---|---|
| 01 | Linking thousands of files into one virtual array, and gathering several cables into one tree |
| 02 | Selecting, plotting and processing in physical units |
| 03 | Atoms: chunked processing that gives the same answer as a single pass |
| 04 | Coordinates: repairing timing that lies, cable geometry, channel names, swapping dimensions |
| 05 | The same pipeline on a regional seismological network, fetched from FDSN |
| 06 | Associating and locating with GaMMA to build a small catalog |
| 07 | Real time: watching a directory, streaming over ZeroMQ, detecting as the data arrives |
The data is a set of telecom cables interrogated in central Chile during the POST and ABYSS experiments; the earthquake used from notebook 02 onwards is a real one, offshore Coquimbo.
Everything is done by one command. It needs uv, which installs itself in one line too:
curl -LsSf https://astral.sh/uv/install.sh | sh # macOS and Linux
Then clone the tutorials and run the installer:
git clone https://github.com/xdas-dev/tutorials.git
cd tutorials
uv run install.py
That single command creates the environment, installs every library the seven
notebooks use, downloads the DAS samples from Zenodo and unzips them into
data/, fetches the seismological waveforms of notebook 05 into
data/stations/ — one miniSEED file per station, plus the inventory — and
pulls the per-channel cable geometry (CCN_N, SER_N, SER_S) into
data/geometry/.
A few things worth knowing before you start it:
- It downloads 3.6 GB and unpacks to 4.5 GB, so keep ~9 GB free while it runs. The archive is deleted once unzipped.
- It is safe to re-run. A step already done is skipped, and an interrupted
download resumes where it stopped. Use
uv run install.py --forceto fetch everything again from scratch.
Then start Jupyter — no environment to activate, uv run uses the right one:
uv run jupyter lab
The samples are gracefully provided by the ABYSS project and hosted on Zenodo; the station waveforms come from the EarthScope FDSN service.
To fetch the latest version of the tutorials:
git pull
To reset the folder to its initial state (this does not touch data/):
git reset --hard HEAD
install.py is the only step that needs a connection. It also caches the
pretrained PhaseNet weights in ~/.seisbench, so once it has run the
notebooks work offline — the data, the stations and the model are all on
disk, and uv run no longer reaches out either.
You are ready to go!