import dascore as dc
# Import fetch to read DASCore example files
from dascore.utils.downloader import fetch
# Fetch a sample file path from DASCore
file_path = fetch('terra15_das_1_trimmed.hdf5')
# To read DAS data stored locally on your machine, simply replace the above line with:
# file_path = "/path/to/data/directory/data.EXT"
spool = dc.spool(file_path)
patch = spool[0]DASCore
A python library for distributed fiber optic sensing.
Documentation [stable, development]
Chambers, D., Jin, G., Tourei, A., Issah, A. H. S., Lellouch, A., Martin, E., Zhu, D., Girard, A., Yuan, S., Cullison, T., Snyder, T., Kim, S., Danes, N., Pnithan, N., Boltz, M. S. & Mendoza, M. M. (2024). DASCore: a Python Library for Distributed Fiber Optic Sensing. Seismica, 3(2).
Highlights
DASCore is a Python library for distributed acoustic sensing (DAS). It provides:
- IO support for many DAS data formats
- Common processing routines
- Basic visualizations
DASCore is part of the DAS Data Analysis Ecosystem (DASDAE).
Introductory usage
Read a file
Working with a directory of DAS files
import dascore as dc
# Import fetch to read DASCore example files
from dascore.utils.downloader import fetch
# Fetch a sample file path from DASCore (just to get a usable path for the rest of the cell)
directory_path = fetch('terra15_das_1_trimmed.hdf5').parent
# To read a directory of DAS data stored locally on your machine,
# simply replace the above line with:
# directory_path = "/path/to/data/directory/"
spool = (
# Create a spool to interact with directory data
dc.spool(directory_path)
# Index the directory contents
.update()
# Sub-select a specific time range
.select(time_min=('2020-01-01', ...))
# Specify chunk of the output patches
.chunk(time=60, overlap=10)
)Get patches (array w/ metadata)
import dascore as dc
spool = dc.get_example_spool('diverse_das')
# Spools are like lists, you can get patches through iteration
for patch in spool:
...
# or through indexing
patch = spool[0]Perform processing
import dascore as dc
patch = dc.get_example_patch('random_das')
out = (
# Decimate along time axis (keep every 8th sample)
patch.decimate(time=8)
# Detrend along the distance dimension
.detrend(dim='distance')
# Apply 10Hz low-pass filter along time dimension
.pass_filter(time=(..., 10))
)Visualize
import dascore as dc
patch = dc.get_example_patch('example_event_2')
patch.viz.waterfall(show=True, scale=0.2);
Installation
Use pip or conda to install DASCore:
pip install dascoreconda install dascore -c conda-forgeSee this recipe for installation with Docker.
See the contributing docs for development installations.
Feedback and Support
Use the project discussions to ask a question.
Use the project issues to report an issue.

