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.5.tar.gz (34.5 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.5-py3-none-any.whl (39.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: das2numpy-0.0.5.tar.gz
  • Upload date:
  • Size: 34.5 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.5.tar.gz
Algorithm Hash digest
SHA256 85969cb1118ac841164b592276fb0bf5516e26dca52e843c9cf3b7c25411d5ba
MD5 d67b4746e5171ea2ae31c191bbf3fc18
BLAKE2b-256 6345d45e540ec21306aac4f4d2f0330327eaff90d6f56bc507bd993c10336879

See more details on using hashes here.

File details

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

File metadata

  • Download URL: das2numpy-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 39.8 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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 ad0d9fe0d2a93ef3de160f5ad991e157f7d5fe7ac1f7fd512fde2dad1633f733
MD5 7dd9b987c6b99fd9fb655c71d89011ea
BLAKE2b-256 3225d791d4cc792610b9d39177a0ddca33e1b4658a721c75dbb9dec9fc69ac03

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