Skip to main content

A simple and universal package for loading large amounts of distributed acoustic sensing (DAS) data.

Project description

Module for loading Distributed Acoustic Sensing (DAS) data. SILIXA / OPTASENSE

Python: If you want to get started quickly, have a look at the example.py.

Install

You can install via PIP.

python -m pip install das2numpy

If you want to run the source have a look at install_dependencies.sh.

Use as python module

API

Recommended: simplest interface

def load_array(t_start:datetime, t_end:datetime, channel_start:int, channel_end:int) -> NP.ndarray:
Loads data and returns it as a numpy array. 
Args:
    t_start (datetime): datetime object which defines the start of the data to load.
    t_end (datetime): datetime object which defines the end of the data to load.
    channel_start (int): The starting index of sensor in the data (inclusive).
    channel_end (int): The ending index of sensors in the data (exclusive).
Returns:
    A 2d-numpy-array containing the data.
    The first axis corresponds to the time, the second, to the channel

More detailed interface

def load_array(t_start:datetime, t_end:datetime, t_step:int, channel_start:int, channel_end:int, channel_step:int) -> NP.ndarray:
Returns nothing, the data can be accessed by accessing the data field of this instance.
Warning: using a different value then 1 for t_step or channel_step can result in a high cpu-usage.
        Consider using multithreaded=True in the constructor and a high amount of workers if needed.
Constraints: 
    t_start has to be less or equal t_end, 
    same for channel_start and channel_end.
    t_step and channel_step have to be greater then 0
Args:
    t_start (datetime): datetime object which defines the start of the data to load.
    t_end (datetime): datetime object which defines the end of the data to load.
    t_step (int): If you, for example only want to load the data of every fourth timestep use t_end=4
    channel_start (int): The starting index of sensor in the data (inclusive).
    channel_end (int): The ending index of sensors in the data (exclusive).
    channel_step (int): Like t_step, but for the sensor position.
Returns:
    A 2d-numpy-array containing the data.
    The first axis corresponds to the time, the second, to the channel

Lower level interfaces

There are also lower level interfaces in the module. For example, the above interfaces also exist with POSIX timestamps in milliseconds instead of datetime objects. These timestamps have exactly the same resolution as the time axis of the resulting array.

Use as command line interface

Example call:

python -m das2numpy "SILIXA" /pnfs/desy.de/m/project/iDAS/raw/2025-DESY/2025-03-25-desy 2025-03-25T10:01:00 2025-03-25T10:02:00 10 0 1000 10 default

For more information:

python -m das2numpy -h

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

das2numpy-0.0.4.tar.gz (32.8 kB view details)

Uploaded Source

Built Distribution

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

das2numpy-0.0.4-py3-none-any.whl (36.0 kB view details)

Uploaded Python 3

File details

Details for the file das2numpy-0.0.4.tar.gz.

File metadata

  • Download URL: das2numpy-0.0.4.tar.gz
  • Upload date:
  • Size: 32.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.1

File hashes

Hashes for das2numpy-0.0.4.tar.gz
Algorithm Hash digest
SHA256 35b19b6c5d00b5fa49d766383df2b7749a794ee05713fe53cf7087fcbeb9d6a9
MD5 64dc7bc17546fa8136c985d394945970
BLAKE2b-256 8c481f297e90c2aeb1a15f4da9c3d486301e79f408980f35fe9f02902c1de5a5

See more details on using hashes here.

File details

Details for the file das2numpy-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: das2numpy-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 36.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.1

File hashes

Hashes for das2numpy-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 07f4bcec00f45768025bb9848ac31538a6d317e5ef71e6e241dca8076ba66546
MD5 78054a98eb74197b700dd08ec9c62d3e
BLAKE2b-256 2db2116a25ed12bf84fb024401b3d723b82286282236eeae38c4abe2a4d36577

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