lightguide


Namelightguide JSON
Version 0.4.0 PyPI version JSON
download
home_pageNone
SummaryTools for distributed acoustic sensing and modelling.
upload_time2023-04-14 11:47:45
maintainerNone
docs_urlNone
authorMarius Paul Isken
requires_python>=3.8
licenseNone
keywords distributed acoustic sensing das seismology earthquake modelling
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Lightguide

*Tools for distributed acoustic sensing and modelling.*

![PyPI](https://img.shields.io/pypi/v/lightguide)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/lightguide)](https://pypi.org/project/lightguide)
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://pre-commit.com/)
<a href="https://github.com/psf/black"><img alt="Code style: black" src="https://img.shields.io/badge/code%20style-black-000000.svg"></a>
[![CI](https://github.com/pyrocko/lightguide/actions/workflows/build.yml/badge.svg)](https://github.com/pyrocko/lightguide/actions/workflows/build.yml)

Lightguide is a package for handling, filtering and modelling distributed acoustic sensing (DAS) data. The package interfaces handling and processing routines of DAS data to the [Pyrocko framework](https://pyrocko.org). Through Pyrocko's I/O engine :rocket: lightguide supports handling the following DAS data formats:

- Silixa iDAS (TDMS data)
- ASN OptoDAS
- MiniSEED

Numerical forward modelling of various dislocation sources in layered and homogeneous half-space towards DAS strain and strain-rate is employed through Pyrocko-Green's function package.

> The framework is still in Beta. Expect changes throughout all functions.

## Installation

Install the compiled Python wheels from PyPI:

```sh
pip install lightguide
```

## Usage

### Adaptive frequency filter

The adaptive frequency filter (AFK) can be used to suppress incoherent noise in DAS data sets.

```python
from lightguide import filters
from lightguide.utils import download_numpy, ExampleData


das_data = download_numpy(ExampleData.VSPData)

filtered_data = filters.afk_filter(
    das_data, window_size=32, overlap=15, exponent=0.8, normalize_power=False)
```

[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/pyrocko/lightguide/blob/master/examples/1-denoise-DAS-data.ipynb)

The filtering performance of the AFK filter, applied to an earthquake recording at an [ICDP](https://www.icdp-online.org/home/) borehole observatory in Germany. The data was recorded on a [Silixa](https://silixa.com/) iDAS v2. For more details see <https://doi.org/10.5880/GFZ.2.1.2022.006>.

![AFK Filter Performance](https://user-images.githubusercontent.com/4992805/170084970-9484afe7-9b95-45a0-ac8e-aec56ddfb3ea.png)

*The figures show the performance of the AFK filter applied to noisy DAS data. (a) Raw data. (b) The filtered wave field using the AFK filter with exponent = 0.6, 0.8, 1.0, 32 x 32 sample window size and 15 samples overlap. (c) The normalized residual between raw and filtered data. (d) Normalized raw (black) waveform and waveforms filtered (colored) by different filter exponents, the shaded area marks the signal duration. (e) Power spectra of signal shown in (d; shaded duration), the green area covers the noise band used for estimating the reduction in spectral amplitude in dB. The data are neither tapered nor band-pass filtered, the images in (a-c) are not anti-aliased.*

## Citation

Lightguide can be cited as:

> Marius Paul Isken, Sebastian Heimann, Christopher Wollin, Hannes Bathke, & Torsten Dahm. (2022). Lightguide - Seismological Tools for DAS data. Zenodo. <https://doi.org/10.5281/zenodo.6580579>

[![DOI](https://zenodo.org/badge/495774991.svg)](https://zenodo.org/badge/latestdoi/495774991)

Details of the adaptive frequency filter are published here:

> Marius Paul Isken, Hannes Vasyura-Bathke, Torsten Dahm, Sebastian Heimann, De-noising distributed acoustic sensing data using an adaptive frequency-wavenumber filter, Geophysical Journal International, 2022;, ggac229, <https://doi.org/10.1093/gji/ggac229>

[![DOI](https://img.shields.io/badge/DOI-10.1093%2Fgji%2Fggac229-blue)](https://doi.org/10.1093/gji/ggac229)

## Packaging

To package lightguit requires Rust and the maturin build tool. maturin can be installed from PyPI or packaged as well. This is the simplest and recommended way of installing from source:

```sh
# Install rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

# Install maturin and build
pip install maturin
maturin build
```

### Development

Local development through pip or maturin.

```sh
cd lightguide
pip3 install .[dev]
```

or

```sh
cd lightguide
maturin develop
```

The project utilizes pre-commit for clean commits, install the hooks via:

```sh
pre-commit install
```

## License

Contribution and merge requests by the community are welcome!

Lightguide was written by Marius Paul Isken and is licensed under the GNU GENERAL PUBLIC LICENSE v3.


            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "lightguide",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "distributed acoustic sensing,DAS,seismology,earthquake modelling",
    "author": "Marius Paul Isken",
    "author_email": "mi@gfz-potsdam.de",
    "download_url": "https://files.pythonhosted.org/packages/8b/9d/16d36fd97a205dcc74b54efe5268f983c0e20d5434320da35b2b371ec5d2/lightguide-0.4.0.tar.gz",
    "platform": null,
    "description": "# Lightguide\n\n*Tools for distributed acoustic sensing and modelling.*\n\n![PyPI](https://img.shields.io/pypi/v/lightguide)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/lightguide)](https://pypi.org/project/lightguide)\n[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://pre-commit.com/)\n<a href=\"https://github.com/psf/black\"><img alt=\"Code style: black\" src=\"https://img.shields.io/badge/code%20style-black-000000.svg\"></a>\n[![CI](https://github.com/pyrocko/lightguide/actions/workflows/build.yml/badge.svg)](https://github.com/pyrocko/lightguide/actions/workflows/build.yml)\n\nLightguide is a package for handling, filtering and modelling distributed acoustic sensing (DAS) data. The package interfaces handling and processing routines of DAS data to the [Pyrocko framework](https://pyrocko.org). Through Pyrocko's I/O engine :rocket: lightguide supports handling the following DAS data formats:\n\n- Silixa iDAS (TDMS data)\n- ASN OptoDAS\n- MiniSEED\n\nNumerical forward modelling of various dislocation sources in layered and homogeneous half-space towards DAS strain and strain-rate is employed through Pyrocko-Green's function package.\n\n> The framework is still in Beta. Expect changes throughout all functions.\n\n## Installation\n\nInstall the compiled Python wheels from PyPI:\n\n```sh\npip install lightguide\n```\n\n## Usage\n\n### Adaptive frequency filter\n\nThe adaptive frequency filter (AFK) can be used to suppress incoherent noise in DAS data sets.\n\n```python\nfrom lightguide import filters\nfrom lightguide.utils import download_numpy, ExampleData\n\n\ndas_data = download_numpy(ExampleData.VSPData)\n\nfiltered_data = filters.afk_filter(\n    das_data, window_size=32, overlap=15, exponent=0.8, normalize_power=False)\n```\n\n[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/pyrocko/lightguide/blob/master/examples/1-denoise-DAS-data.ipynb)\n\nThe filtering performance of the AFK filter, applied to an earthquake recording at an [ICDP](https://www.icdp-online.org/home/) borehole observatory in Germany. The data was recorded on a [Silixa](https://silixa.com/) iDAS v2. For more details see <https://doi.org/10.5880/GFZ.2.1.2022.006>.\n\n![AFK Filter Performance](https://user-images.githubusercontent.com/4992805/170084970-9484afe7-9b95-45a0-ac8e-aec56ddfb3ea.png)\n\n*The figures show the performance of the AFK filter applied to noisy DAS data. (a) Raw data. (b) The filtered wave field using the AFK filter with exponent = 0.6, 0.8, 1.0, 32 x 32 sample window size and 15 samples overlap. (c) The normalized residual between raw and filtered data. (d) Normalized raw (black) waveform and waveforms filtered (colored) by different filter exponents, the shaded area marks the signal duration. (e) Power spectra of signal shown in (d; shaded duration), the green area covers the noise band used for estimating the reduction in spectral amplitude in dB. The data are neither tapered nor band-pass filtered, the images in (a-c) are not anti-aliased.*\n\n## Citation\n\nLightguide can be cited as:\n\n> Marius Paul Isken, Sebastian Heimann, Christopher Wollin, Hannes Bathke, & Torsten Dahm. (2022). Lightguide - Seismological Tools for DAS data. Zenodo. <https://doi.org/10.5281/zenodo.6580579>\n\n[![DOI](https://zenodo.org/badge/495774991.svg)](https://zenodo.org/badge/latestdoi/495774991)\n\nDetails of the adaptive frequency filter are published here:\n\n> Marius Paul Isken, Hannes Vasyura-Bathke, Torsten Dahm, Sebastian Heimann, De-noising distributed acoustic sensing data using an adaptive frequency-wavenumber filter, Geophysical Journal International, 2022;, ggac229, <https://doi.org/10.1093/gji/ggac229>\n\n[![DOI](https://img.shields.io/badge/DOI-10.1093%2Fgji%2Fggac229-blue)](https://doi.org/10.1093/gji/ggac229)\n\n## Packaging\n\nTo package lightguit requires Rust and the maturin build tool. maturin can be installed from PyPI or packaged as well. This is the simplest and recommended way of installing from source:\n\n```sh\n# Install rust\ncurl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh\n\n# Install maturin and build\npip install maturin\nmaturin build\n```\n\n### Development\n\nLocal development through pip or maturin.\n\n```sh\ncd lightguide\npip3 install .[dev]\n```\n\nor\n\n```sh\ncd lightguide\nmaturin develop\n```\n\nThe project utilizes pre-commit for clean commits, install the hooks via:\n\n```sh\npre-commit install\n```\n\n## License\n\nContribution and merge requests by the community are welcome!\n\nLightguide was written by Marius Paul Isken and is licensed under the GNU GENERAL PUBLIC LICENSE v3.\n\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Tools for distributed acoustic sensing and modelling.",
    "version": "0.4.0",
    "split_keywords": [
        "distributed acoustic sensing",
        "das",
        "seismology",
        "earthquake modelling"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "b0366deb2a6d332e49f68b372a4fcc375fc7ae9a6f94a5b40a1fc7be444ac5a2",
                "md5": "c24a339f4d3963bee3551c3db445281b",
                "sha256": "6afa3e92df2898752c4d7c3f68dd9cc4293d21f8f2c91e1ad47293c861235430"
            },
            "downloads": -1,
            "filename": "lightguide-0.4.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "c24a339f4d3963bee3551c3db445281b",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": ">=3.8",
            "size": 2258865,
            "upload_time": "2023-04-14T11:47:26",
            "upload_time_iso_8601": "2023-04-14T11:47:26.271126Z",
            "url": "https://files.pythonhosted.org/packages/b0/36/6deb2a6d332e49f68b372a4fcc375fc7ae9a6f94a5b40a1fc7be444ac5a2/lightguide-0.4.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "0a152a17c6a5efdf0a080edfa961724c14f40c5e9feb6a23bd414d559fb4c244",
                "md5": "fc83ed69950736268d3530fcd458c523",
                "sha256": "324bed7c8cb2787a2ebe261fabaafcb03c93848f392dbe0d77be1d6fd8ca2abf"
            },
            "downloads": -1,
            "filename": "lightguide-0.4.0-cp310-none-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "fc83ed69950736268d3530fcd458c523",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": ">=3.8",
            "size": 231583,
            "upload_time": "2023-04-14T11:47:28",
            "upload_time_iso_8601": "2023-04-14T11:47:28.285284Z",
            "url": "https://files.pythonhosted.org/packages/0a/15/2a17c6a5efdf0a080edfa961724c14f40c5e9feb6a23bd414d559fb4c244/lightguide-0.4.0-cp310-none-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "24d0b37c8848c8af2626580a00e7c5e117352dbae855f535abe2f19c6eb03731",
                "md5": "0da56c4f0a3da7f2f194fd65e52f3dc6",
                "sha256": "76a81792f0ac1848abd848cea73b340228a9c57bf1000ab651f9a1eb77e39694"
            },
            "downloads": -1,
            "filename": "lightguide-0.4.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "0da56c4f0a3da7f2f194fd65e52f3dc6",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": ">=3.8",
            "size": 2258863,
            "upload_time": "2023-04-14T11:47:30",
            "upload_time_iso_8601": "2023-04-14T11:47:30.480497Z",
            "url": "https://files.pythonhosted.org/packages/24/d0/b37c8848c8af2626580a00e7c5e117352dbae855f535abe2f19c6eb03731/lightguide-0.4.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "cad70188dbc72502f479e7645653e3c7e7bdf73e7cd86edd93367f6168d475d3",
                "md5": "9d7a58f8ddaf538e7675867da0ddcf12",
                "sha256": "ccc0a8aa88c9e91ae0816dfcde8719a34465b37636dcfa5224d0e3a08e098e1d"
            },
            "downloads": -1,
            "filename": "lightguide-0.4.0-cp311-none-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "9d7a58f8ddaf538e7675867da0ddcf12",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": ">=3.8",
            "size": 231590,
            "upload_time": "2023-04-14T11:47:32",
            "upload_time_iso_8601": "2023-04-14T11:47:32.299689Z",
            "url": "https://files.pythonhosted.org/packages/ca/d7/0188dbc72502f479e7645653e3c7e7bdf73e7cd86edd93367f6168d475d3/lightguide-0.4.0-cp311-none-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "6a3ab2ea443300313d1ad1aa74209cc157fb21e0342e0fee93d12fcea75a6fb7",
                "md5": "e835887d4cd349a1aa4350049951a414",
                "sha256": "af5bb97c3fa447a5869f21dda77f0a8433346a85300037ddfb1c7e9e478daabb"
            },
            "downloads": -1,
            "filename": "lightguide-0.4.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "e835887d4cd349a1aa4350049951a414",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": ">=3.8",
            "size": 2259015,
            "upload_time": "2023-04-14T11:47:33",
            "upload_time_iso_8601": "2023-04-14T11:47:33.920751Z",
            "url": "https://files.pythonhosted.org/packages/6a/3a/b2ea443300313d1ad1aa74209cc157fb21e0342e0fee93d12fcea75a6fb7/lightguide-0.4.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "dfd03ad128573329a8b5374ce68036757be5db197ab6c99ada92895cd1e97c88",
                "md5": "da4adaa324c32a32768e271b41b61fab",
                "sha256": "abd64f46c26dc87dbda9f2707350ac9ecd3ecdb011c870d3416b38f5b4d4b29e"
            },
            "downloads": -1,
            "filename": "lightguide-0.4.0-cp38-none-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "da4adaa324c32a32768e271b41b61fab",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": ">=3.8",
            "size": 231614,
            "upload_time": "2023-04-14T11:47:35",
            "upload_time_iso_8601": "2023-04-14T11:47:35.592526Z",
            "url": "https://files.pythonhosted.org/packages/df/d0/3ad128573329a8b5374ce68036757be5db197ab6c99ada92895cd1e97c88/lightguide-0.4.0-cp38-none-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "9095f05fbb2ae9f24c5d083f599eb15441a81e7788ffe0d37508c9ab219fd0b9",
                "md5": "40a5938d3ca9616974469863bd8dbbc4",
                "sha256": "0358d264a141bd23f366fa24b11b0aaf80a3de20527384dbfffd58eba9b542c2"
            },
            "downloads": -1,
            "filename": "lightguide-0.4.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "40a5938d3ca9616974469863bd8dbbc4",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": ">=3.8",
            "size": 2258919,
            "upload_time": "2023-04-14T11:47:37",
            "upload_time_iso_8601": "2023-04-14T11:47:37.887472Z",
            "url": "https://files.pythonhosted.org/packages/90/95/f05fbb2ae9f24c5d083f599eb15441a81e7788ffe0d37508c9ab219fd0b9/lightguide-0.4.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "159aa003dc6678f7eb1764ce7a3471565439338aeacfa7c51ad896d5b5f2da5e",
                "md5": "a875c56662239d89aa8a5128377e29ab",
                "sha256": "2a281cd8713f392cc58cd68abfc684e836b81ae9b03ee068d135f9c7f15bfb47"
            },
            "downloads": -1,
            "filename": "lightguide-0.4.0-cp39-none-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "a875c56662239d89aa8a5128377e29ab",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": ">=3.8",
            "size": 231627,
            "upload_time": "2023-04-14T11:47:39",
            "upload_time_iso_8601": "2023-04-14T11:47:39.393866Z",
            "url": "https://files.pythonhosted.org/packages/15/9a/a003dc6678f7eb1764ce7a3471565439338aeacfa7c51ad896d5b5f2da5e/lightguide-0.4.0-cp39-none-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "62874cbcdcc80b679c9cec9eada34f6b73b1a1c403163e2789a5b05f5e4b1c70",
                "md5": "6300a55dd51f7be72e960be56c623039",
                "sha256": "c37ea1d92599eff3ed32e6992f876c6f7acb1dc1db75aac946c396bae4a9a5e9"
            },
            "downloads": -1,
            "filename": "lightguide-0.4.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "6300a55dd51f7be72e960be56c623039",
            "packagetype": "bdist_wheel",
            "python_version": "pp38",
            "requires_python": ">=3.8",
            "size": 2258964,
            "upload_time": "2023-04-14T11:47:41",
            "upload_time_iso_8601": "2023-04-14T11:47:41.441807Z",
            "url": "https://files.pythonhosted.org/packages/62/87/4cbcdcc80b679c9cec9eada34f6b73b1a1c403163e2789a5b05f5e4b1c70/lightguide-0.4.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "33fcfcfda69f45aa43edef672254a50c236936570ccb1f332877a943bd8556ca",
                "md5": "087891b88bf43ca96a7eb6a53b313b77",
                "sha256": "41ba55a75e63c215b1d5ff8402e84bdcda675605520b888d1af8654371220166"
            },
            "downloads": -1,
            "filename": "lightguide-0.4.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "087891b88bf43ca96a7eb6a53b313b77",
            "packagetype": "bdist_wheel",
            "python_version": "pp39",
            "requires_python": ">=3.8",
            "size": 2258935,
            "upload_time": "2023-04-14T11:47:43",
            "upload_time_iso_8601": "2023-04-14T11:47:43.325575Z",
            "url": "https://files.pythonhosted.org/packages/33/fc/fcfda69f45aa43edef672254a50c236936570ccb1f332877a943bd8556ca/lightguide-0.4.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "8b9d16d36fd97a205dcc74b54efe5268f983c0e20d5434320da35b2b371ec5d2",
                "md5": "89ef503e93d632929e4c1e64badbfdf9",
                "sha256": "37d5280b6db16a96d684f7ae23b1e69ce66f3ac2ec9a8c7b6702a1cc7bf01126"
            },
            "downloads": -1,
            "filename": "lightguide-0.4.0.tar.gz",
            "has_sig": false,
            "md5_digest": "89ef503e93d632929e4c1e64badbfdf9",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 13539724,
            "upload_time": "2023-04-14T11:47:45",
            "upload_time_iso_8601": "2023-04-14T11:47:45.727458Z",
            "url": "https://files.pythonhosted.org/packages/8b/9d/16d36fd97a205dcc74b54efe5268f983c0e20d5434320da35b2b371ec5d2/lightguide-0.4.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-04-14 11:47:45",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "lightguide"
}
        
Elapsed time: 0.08324s