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-1.0.tar.gz (35.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-1.0-py3-none-any.whl (41.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for das2numpy-1.0.tar.gz
Algorithm Hash digest
SHA256 3b6d07b28b3ad2313c9bce09cb7cec1f11b9c5cb7297997227fc1942808e5680
MD5 3934e404da024b79c54f54ee596bbf4c
BLAKE2b-256 0da949dc819214d7dca43cfad50f99b065b6cb390d1575dba63472a4982cd01d

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for das2numpy-1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8eba2fd01252c1f8949c45acf0751a5db7bd4c31b22a566936b75608706b41f8
MD5 32926f4daca633e0dd986b96b3840b09
BLAKE2b-256 42bc1198a62b1c9a0fe990cf452f4b0336c0b3e2fdbb9424256cd164c629cd52

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