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 (make sure that the current working directory is not inside idas2numpy):

python -m idas2numpy "SILIXA" ~/iDAS/work/2024-05-10-desy/ 2024-05-10T10:01:00 2024-05-10T10:02:00 10 0 1000 10 default

For more information:

python -m idas2numpy -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.2.tar.gz (31.9 kB view details)

Uploaded Source

Built Distribution

das2numpy-0.0.2-py3-none-any.whl (35.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: das2numpy-0.0.2.tar.gz
  • Upload date:
  • Size: 31.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.8.5

File hashes

Hashes for das2numpy-0.0.2.tar.gz
Algorithm Hash digest
SHA256 7bc3791d5b591c0ddc83c38747e4b69be19d6229db08f7ca1c21bb139cf4af8a
MD5 7945b5a39855c91ac411dcdf688da0fc
BLAKE2b-256 14ebb79f7066a41e1ac678fac23766da688402f21b5aea61066dda7cc9af1453

See more details on using hashes here.

File details

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

File metadata

  • Download URL: das2numpy-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 35.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.8.5

File hashes

Hashes for das2numpy-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 dea3f85475eba94afcd210e6219582b1be2ebb5ef08ea9a372b30f9abcba6b3a
MD5 67f8a7a98d1ef001e0750f6a1d64e90a
BLAKE2b-256 892d0b61ff66bd3184e12a466b220c2d84d64378025e499be47a71c7f5b65c8b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page