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.3.tar.gz (32.3 kB view details)

Uploaded Source

Built Distribution

das2numpy-0.0.3-py3-none-any.whl (35.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: das2numpy-0.0.3.tar.gz
  • Upload date:
  • Size: 32.3 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.3.tar.gz
Algorithm Hash digest
SHA256 1a8e73753d57a11aaf134c1c9d5e9276796d9dfd67c5a65afe947ffaef010ef0
MD5 131b7bc09e2ef2b008eefe1c77ab66e9
BLAKE2b-256 7a251505acd3722e04030f32d1b6f2671301d714619a4f39da5c8624c3ae3834

See more details on using hashes here.

File details

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

File metadata

  • Download URL: das2numpy-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 35.5 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 6012633b2e8e90c57a765eb14cefed8f8cc0f150cd1826b0847a802df8d9decf
MD5 600e6e7fe28449603dbf367a097d1373
BLAKE2b-256 62156844f0d693faff412fba48f10d6ce3ec0ebb61523e5d2afa6f37cd84f786

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