ComDAS 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. comdas-0.1.0/.github/workflows/docs.yml +57 -0
  2. comdas-0.1.0/.github/workflows/publish.yml +53 -0
  3. comdas-0.1.0/.github/workflows/testing.yml +41 -0
  4. comdas-0.1.0/.gitignore +105 -0
  5. comdas-0.1.0/ComDAS.egg-info/PKG-INFO +69 -0
  6. comdas-0.1.0/ComDAS.egg-info/SOURCES.txt +40 -0
  7. comdas-0.1.0/ComDAS.egg-info/dependency_links.txt +1 -0
  8. comdas-0.1.0/ComDAS.egg-info/entry_points.txt +2 -0
  9. comdas-0.1.0/ComDAS.egg-info/requires.txt +14 -0
  10. comdas-0.1.0/ComDAS.egg-info/top_level.txt +1 -0
  11. comdas-0.1.0/LICENSE +165 -0
  12. comdas-0.1.0/PKG-INFO +69 -0
  13. comdas-0.1.0/README.md +44 -0
  14. comdas-0.1.0/comdas/__init__.py +35 -0
  15. comdas-0.1.0/comdas/arrays/__init__.py +9 -0
  16. comdas-0.1.0/comdas/arrays/duck_array.py +323 -0
  17. comdas-0.1.0/comdas/codecs/__init__.py +14 -0
  18. comdas-0.1.0/comdas/codecs/base.py +264 -0
  19. comdas-0.1.0/comdas/codecs/svd.py +258 -0
  20. comdas-0.1.0/comdas/codecs/wavelet.py +273 -0
  21. comdas-0.1.0/comdas/io/__init__.py +18 -0
  22. comdas-0.1.0/comdas/io/h5_container.py +429 -0
  23. comdas-0.1.0/comdas/utils.py +35 -0
  24. comdas-0.1.0/docs/Makefile +16 -0
  25. comdas-0.1.0/docs/api/index.rst +13 -0
  26. comdas-0.1.0/docs/codecs/add_a_codec.rst +90 -0
  27. comdas-0.1.0/docs/codecs/svd.rst +69 -0
  28. comdas-0.1.0/docs/codecs/wavelet.rst +70 -0
  29. comdas-0.1.0/docs/conf.py +61 -0
  30. comdas-0.1.0/docs/examples/compression_comparison.ipynb +240 -0
  31. comdas-0.1.0/docs/index.rst +61 -0
  32. comdas-0.1.0/docs/installation.rst +38 -0
  33. comdas-0.1.0/docs/make.bat +22 -0
  34. comdas-0.1.0/docs/quickstart.rst +62 -0
  35. comdas-0.1.0/pyproject.toml +50 -0
  36. comdas-0.1.0/setup.cfg +4 -0
  37. comdas-0.1.0/tests/__init__.py +0 -0
  38. comdas-0.1.0/tests/_dummy_codec.py +173 -0
  39. comdas-0.1.0/tests/test_codec_base.py +133 -0
  40. comdas-0.1.0/tests/test_codecs.py +263 -0
  41. comdas-0.1.0/tests/test_duck_array.py +200 -0
  42. comdas-0.1.0/tests/test_h5_container.py +129 -0
@@ -0,0 +1,57 @@
1
+ name: Documentation
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ paths:
7
+ - "docs/**"
8
+ - "comdas/**"
9
+ - ".github/workflows/docs.yml"
10
+ workflow_dispatch:
11
+
12
+ permissions:
13
+ contents: read
14
+ pages: write
15
+ id-token: write
16
+
17
+ concurrency:
18
+ group: pages
19
+ cancel-in-progress: true
20
+
21
+ jobs:
22
+ build:
23
+ runs-on: ubuntu-latest
24
+ steps:
25
+ - name: Check out repository
26
+ uses: actions/checkout@v4
27
+
28
+ - name: Set up Python
29
+ uses: actions/setup-python@v5
30
+ with:
31
+ python-version: "3.12"
32
+ cache: pip
33
+
34
+ - name: Install package and documentation dependencies
35
+ run: python -m pip install --upgrade pip && python -m pip install -e ".[dev]"
36
+
37
+ - name: Configure GitHub Pages
38
+ uses: actions/configure-pages@v5
39
+
40
+ - name: Build documentation
41
+ run: sphinx-build --fail-on-warning docs docs/_build/html
42
+
43
+ - name: Upload GitHub Pages artifact
44
+ uses: actions/upload-pages-artifact@v3
45
+ with:
46
+ path: docs/_build/html
47
+
48
+ deploy:
49
+ environment:
50
+ name: github-pages
51
+ url: ${{ steps.deployment.outputs.page_url }}
52
+ runs-on: ubuntu-latest
53
+ needs: build
54
+ steps:
55
+ - name: Deploy to GitHub Pages
56
+ id: deployment
57
+ uses: actions/deploy-pages@v4
@@ -0,0 +1,53 @@
1
+ name: Upload Python Package
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+
7
+ permissions:
8
+ contents: read
9
+
10
+ jobs:
11
+ release-build:
12
+ runs-on: ubuntu-latest
13
+
14
+ steps:
15
+ - uses: actions/checkout@v4
16
+
17
+ - uses: actions/setup-python@v5
18
+ with:
19
+ python-version: "3.x"
20
+
21
+ - name: Build release distributions
22
+ run: |
23
+ python -m pip install build
24
+ python -m build
25
+
26
+ - name: Upload distributions
27
+ uses: actions/upload-artifact@v4
28
+ with:
29
+ name: release-dists
30
+ path: dist/
31
+
32
+ pypi-publish:
33
+ runs-on: ubuntu-latest
34
+ needs:
35
+ - release-build
36
+ permissions:
37
+ id-token: write
38
+
39
+ environment:
40
+ name: pypi
41
+ url: https://pypi.org/project/ComDAS
42
+
43
+ steps:
44
+ - name: Retrieve release distributions
45
+ uses: actions/download-artifact@v4
46
+ with:
47
+ name: release-dists
48
+ path: dist/
49
+
50
+ - name: Publish release distributions to PyPI
51
+ uses: pypa/gh-action-pypi-publish@release/v1
52
+ with:
53
+ packages-dir: dist/
@@ -0,0 +1,41 @@
1
+ name: Run Tests
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ paths:
7
+ - "comdas/**"
8
+ - "tests/**"
9
+ - ".github/workflows/testing.yml"
10
+ pull_request:
11
+ branches: [main]
12
+
13
+ permissions:
14
+ contents: read
15
+
16
+ jobs:
17
+ build:
18
+ runs-on: ubuntu-latest
19
+ strategy:
20
+ matrix:
21
+ python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
22
+
23
+ steps:
24
+ - uses: actions/checkout@v4
25
+
26
+ - name: Set up Python
27
+ uses: actions/setup-python@v4
28
+ with:
29
+ python-version: ${{ matrix.python-version }}
30
+
31
+ - name: Install dependencies
32
+ run: |
33
+ python -m pip install --upgrade pip
34
+ pip install .[dev]
35
+
36
+ - name: Lint with ruff
37
+ run: ruff check .
38
+
39
+ - name: Test with pytest
40
+ run: |
41
+ pytest
@@ -0,0 +1,105 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ env/
12
+ build/
13
+ develop-eggs/
14
+ dist/
15
+ downloads/
16
+ eggs/
17
+ .eggs/
18
+ lib/
19
+ lib64/
20
+ parts/
21
+ sdist/
22
+ var/
23
+ *.egg-info/
24
+ .installed.cfg
25
+ *.egg
26
+
27
+ # PyInstaller
28
+ # Usually these files are written by a python script from a template
29
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
30
+ *.manifest
31
+ *.spec
32
+
33
+ # Installer logs
34
+ pip-log.txt
35
+ pip-delete-this-directory.txt
36
+
37
+ # Unit test / coverage reports
38
+ htmlcov/
39
+ .tox/
40
+ .coverage
41
+ .coverage.*
42
+ .cache
43
+ nosetests.xml
44
+ coverage.xml
45
+ *,cover
46
+ .hypothesis/
47
+
48
+ # Translations
49
+ *.mo
50
+ *.pot
51
+
52
+ # logs:
53
+ *.log
54
+
55
+ # Sphinx documentation
56
+ docs/_build/
57
+
58
+ # PyBuilder
59
+ target/
60
+
61
+ # pyenv python configuration file
62
+ .python-version
63
+ .pdm-python
64
+
65
+ # pycharm
66
+ .idea
67
+
68
+ # Ipython stuff
69
+ .ipynb_checkpoints
70
+
71
+ # linux/osx garbage
72
+ *~
73
+ *.swp
74
+ .DS_store*
75
+
76
+ # docs
77
+ docs/api/generated/
78
+ _autosummary
79
+ .quarto/
80
+ docs/site_libs
81
+ docs/_quarto.yml
82
+ .cross_ref.json
83
+
84
+ # profile stuff from asv
85
+ .asv
86
+ .codspeed
87
+
88
+ # misc
89
+ scratch/**
90
+ .ruff_cache
91
+ uv.lock
92
+
93
+ docs/index_files
94
+ docs/index.quarto_ipynb
95
+
96
+ # Agent stuff
97
+ .claude
98
+ CLAUDE.md
99
+ .agents/worktrees/
100
+
101
+ # profile stuff
102
+ prof/
103
+
104
+ # VSCode stuff
105
+ .vscode/
@@ -0,0 +1,69 @@
1
+ Metadata-Version: 2.4
2
+ Name: ComDAS
3
+ Version: 0.1.0
4
+ Summary: DASCORE companion package that adds support for compressed DAS data
5
+ Author-email: Byron-Selvage <bselvage@mines.edu>
6
+ License: LGPL-3.0-or-later
7
+ Keywords: dascore,compression,das,dasdae
8
+ Requires-Python: >=3.10
9
+ Description-Content-Type: text/markdown
10
+ License-File: LICENSE
11
+ Requires-Dist: numpy>=1.24
12
+ Requires-Dist: dascore>=0.1.0
13
+ Requires-Dist: h5py
14
+ Requires-Dist: PyWavelets
15
+ Provides-Extra: dev
16
+ Requires-Dist: pytest; extra == "dev"
17
+ Requires-Dist: ruff; extra == "dev"
18
+ Requires-Dist: sphinx; extra == "dev"
19
+ Requires-Dist: furo; extra == "dev"
20
+ Requires-Dist: sphinx-autodoc-typehints; extra == "dev"
21
+ Requires-Dist: myst-nb; extra == "dev"
22
+ Requires-Dist: matplotlib; extra == "dev"
23
+ Requires-Dist: ipykernel; extra == "dev"
24
+ Dynamic: license-file
25
+
26
+ # ComDAS
27
+
28
+ ![Python versions tested](https://img.shields.io/badge/Python-3.10%20%7C%203.11%20%7C%203.12%20%7C%203.13%20%7C%203.14-blue)
29
+
30
+ ComDAS (Compressed DAS) lets you store and work with compressed distributed acoustic sensing (DAS) data using ordinary [DASCore](https://dascore.org/) tools.
31
+
32
+ With ComDAS you can:
33
+
34
+ - **Shrink DAS data in memory.** Compress a DASCore patch and keep using it like any other.
35
+ - **Save compressed files.** Write patches, spools, or whole directories of raw data to a compressed HDF5 file or files.
36
+ - **Read compressed files with plain DASCore.** Once ComDAS is installed, `dascore.spool()` opens compressed files directly without needing to know how the data was compressed.
37
+ - **Choose your compression level.** Pick a codec and set how much detail to keep, from near-lossless to aggressive compression.
38
+ - **Implement your own algorithm.** Add a new compression method by writing a codec class.
39
+
40
+ > [!NOTE]
41
+ > ComDAS is in active development. The file format and public API may change between releases.
42
+
43
+ ## Supported codecs
44
+
45
+ | Codec | Main setting | Reference |
46
+ | --- | --- | --- |
47
+ | [SVD](https://byron-selvage.github.io/ComDAS/codecs/svd.html) | `rank` or retained `energy` | [NumPy SVD](https://numpy.org/doc/1.22/reference/generated/numpy.linalg.svd.html) |
48
+ | [Wavelet](https://byron-selvage.github.io/ComDAS/codecs/wavelet.html) | `keep_fraction` or `threshold` | [PyWavelets](https://doi.org/10.21105/joss.01237); [DeVore et al. (1992)](https://doi.org/10.1109/18.119733) |
49
+
50
+ ## Installation
51
+
52
+ ComDAS requires Python 3.10 or newer.
53
+
54
+ ```bash
55
+ pip install comdas
56
+ ```
57
+
58
+ ## Documentation
59
+
60
+ Full documentation is available at [byron-selvage.github.io/ComDAS](https://byron-selvage.github.io/ComDAS/), including:
61
+
62
+ - [Quick start](https://byron-selvage.github.io/ComDAS/quickstart.html): compress a patch, save a compressed file, and read it back
63
+ - [Codecs](https://byron-selvage.github.io/ComDAS/codecs/svd.html): configuration options and examples for each codec
64
+ - [Examples](https://byron-selvage.github.io/ComDAS/examples/compression_comparison.html)
65
+ - [API reference](https://byron-selvage.github.io/ComDAS/api/index.html)
66
+
67
+ ## License
68
+
69
+ ComDAS is licensed under the [GNU Lesser General Public License](LICENSE).
@@ -0,0 +1,40 @@
1
+ .gitignore
2
+ LICENSE
3
+ README.md
4
+ pyproject.toml
5
+ .github/workflows/docs.yml
6
+ .github/workflows/publish.yml
7
+ .github/workflows/testing.yml
8
+ ComDAS.egg-info/PKG-INFO
9
+ ComDAS.egg-info/SOURCES.txt
10
+ ComDAS.egg-info/dependency_links.txt
11
+ ComDAS.egg-info/entry_points.txt
12
+ ComDAS.egg-info/requires.txt
13
+ ComDAS.egg-info/top_level.txt
14
+ comdas/__init__.py
15
+ comdas/utils.py
16
+ comdas/arrays/__init__.py
17
+ comdas/arrays/duck_array.py
18
+ comdas/codecs/__init__.py
19
+ comdas/codecs/base.py
20
+ comdas/codecs/svd.py
21
+ comdas/codecs/wavelet.py
22
+ comdas/io/__init__.py
23
+ comdas/io/h5_container.py
24
+ docs/Makefile
25
+ docs/conf.py
26
+ docs/index.rst
27
+ docs/installation.rst
28
+ docs/make.bat
29
+ docs/quickstart.rst
30
+ docs/api/index.rst
31
+ docs/codecs/add_a_codec.rst
32
+ docs/codecs/svd.rst
33
+ docs/codecs/wavelet.rst
34
+ docs/examples/compression_comparison.ipynb
35
+ tests/__init__.py
36
+ tests/_dummy_codec.py
37
+ tests/test_codec_base.py
38
+ tests/test_codecs.py
39
+ tests/test_duck_array.py
40
+ tests/test_h5_container.py
@@ -0,0 +1,2 @@
1
+ [dascore.fiber_io]
2
+ COMDAS__V1 = comdas.io.h5_container:ComdasV1
@@ -0,0 +1,14 @@
1
+ numpy>=1.24
2
+ dascore>=0.1.0
3
+ h5py
4
+ PyWavelets
5
+
6
+ [dev]
7
+ pytest
8
+ ruff
9
+ sphinx
10
+ furo
11
+ sphinx-autodoc-typehints
12
+ myst-nb
13
+ matplotlib
14
+ ipykernel
@@ -0,0 +1 @@
1
+ comdas
comdas-0.1.0/LICENSE ADDED
@@ -0,0 +1,165 @@
1
+ GNU LESSER GENERAL PUBLIC LICENSE
2
+ Version 3, 29 June 2007
3
+
4
+ Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
5
+ Everyone is permitted to copy and distribute verbatim copies
6
+ of this license document, but changing it is not allowed.
7
+
8
+
9
+ This version of the GNU Lesser General Public License incorporates
10
+ the terms and conditions of version 3 of the GNU General Public
11
+ License, supplemented by the additional permissions listed below.
12
+
13
+ 0. Additional Definitions.
14
+
15
+ As used herein, "this License" refers to version 3 of the GNU Lesser
16
+ General Public License, and the "GNU GPL" refers to version 3 of the GNU
17
+ General Public License.
18
+
19
+ "The Library" refers to a covered work governed by this License,
20
+ other than an Application or a Combined Work as defined below.
21
+
22
+ An "Application" is any work that makes use of an interface provided
23
+ by the Library, but which is not otherwise based on the Library.
24
+ Defining a subclass of a class defined by the Library is deemed a mode
25
+ of using an interface provided by the Library.
26
+
27
+ A "Combined Work" is a work produced by combining or linking an
28
+ Application with the Library. The particular version of the Library
29
+ with which the Combined Work was made is also called the "Linked
30
+ Version".
31
+
32
+ The "Minimal Corresponding Source" for a Combined Work means the
33
+ Corresponding Source for the Combined Work, excluding any source code
34
+ for portions of the Combined Work that, considered in isolation, are
35
+ based on the Application, and not on the Linked Version.
36
+
37
+ The "Corresponding Application Code" for a Combined Work means the
38
+ object code and/or source code for the Application, including any data
39
+ and utility programs needed for reproducing the Combined Work from the
40
+ Application, but excluding the System Libraries of the Combined Work.
41
+
42
+ 1. Exception to Section 3 of the GNU GPL.
43
+
44
+ You may convey a covered work under sections 3 and 4 of this License
45
+ without being bound by section 3 of the GNU GPL.
46
+
47
+ 2. Conveying Modified Versions.
48
+
49
+ If you modify a copy of the Library, and, in your modifications, a
50
+ facility refers to a function or data to be supplied by an Application
51
+ that uses the facility (other than as an argument passed when the
52
+ facility is invoked), then you may convey a copy of the modified
53
+ version:
54
+
55
+ a) under this License, provided that you make a good faith effort to
56
+ ensure that, in the event an Application does not supply the
57
+ function or data, the facility still operates, and performs
58
+ whatever part of its purpose remains meaningful, or
59
+
60
+ b) under the GNU GPL, with none of the additional permissions of
61
+ this License applicable to that copy.
62
+
63
+ 3. Object Code Incorporating Material from Library Header Files.
64
+
65
+ The object code form of an Application may incorporate material from
66
+ a header file that is part of the Library. You may convey such object
67
+ code under terms of your choice, provided that, if the incorporated
68
+ material is not limited to numerical parameters, data structure
69
+ layouts and accessors, or small macros, inline functions and templates
70
+ (ten or fewer lines in length), you do both of the following:
71
+
72
+ a) Give prominent notice with each copy of the object code that the
73
+ Library is used in it and that the Library and its use are
74
+ covered by this License.
75
+
76
+ b) Accompany the object code with a copy of the GNU GPL and this license
77
+ document.
78
+
79
+ 4. Combined Works.
80
+
81
+ You may convey a Combined Work under terms of your choice that,
82
+ taken together, effectively do not restrict modification of the
83
+ portions of the Library contained in the Combined Work and reverse
84
+ engineering for debugging such modifications, if you also do each of
85
+ the following:
86
+
87
+ a) Give prominent notice with each copy of the Combined Work that
88
+ the Library is used in it and that the Library and its use are
89
+ covered by this License.
90
+
91
+ b) Accompany the Combined Work with a copy of the GNU GPL and this license
92
+ document.
93
+
94
+ c) For a Combined Work that displays copyright notices during
95
+ execution, include the copyright notice for the Library among
96
+ these notices, as well as a reference directing the user to the
97
+ copies of the GNU GPL and this license document.
98
+
99
+ d) Do one of the following:
100
+
101
+ 0) Convey the Minimal Corresponding Source under the terms of this
102
+ License, and the Corresponding Application Code in a form
103
+ suitable for, and under terms that permit, the user to
104
+ recombine or relink the Application with a modified version of
105
+ the Linked Version to produce a modified Combined Work, in the
106
+ manner specified by section 6 of the GNU GPL for conveying
107
+ Corresponding Source.
108
+
109
+ 1) Use a suitable shared library mechanism for linking with the
110
+ Library. A suitable mechanism is one that (a) uses at run time
111
+ a copy of the Library already present on the user's computer
112
+ system, and (b) will operate properly with a modified version
113
+ of the Library that is interface-compatible with the Linked
114
+ Version.
115
+
116
+ e) Provide Installation Information, but only if you would otherwise
117
+ be required to provide such information under section 6 of the
118
+ GNU GPL, and only to the extent that such information is
119
+ necessary to install and execute a modified version of the
120
+ Combined Work produced by recombining or relinking the
121
+ Application with a modified version of the Linked Version. (If
122
+ you use option 4d0, the Installation Information must accompany
123
+ the Minimal Corresponding Source and Corresponding Application
124
+ Code. If you use option 4d1, you must provide the Installation
125
+ Information in the manner specified by section 6 of the GNU GPL
126
+ for conveying Corresponding Source.)
127
+
128
+ 5. Combined Libraries.
129
+
130
+ You may place library facilities that are a work based on the
131
+ Library side by side in a single library together with other library
132
+ facilities that are not Applications and are not covered by this
133
+ License, and convey such a combined library under terms of your
134
+ choice, if you do both of the following:
135
+
136
+ a) Accompany the combined library with a copy of the same work based
137
+ on the Library, uncombined with any other library facilities,
138
+ conveyed under the terms of this License.
139
+
140
+ b) Give prominent notice with the combined library that part of it
141
+ is a work based on the Library, and explaining where to find the
142
+ accompanying uncombined form of the same work.
143
+
144
+ 6. Revised Versions of the GNU Lesser General Public License.
145
+
146
+ The Free Software Foundation may publish revised and/or new versions
147
+ of the GNU Lesser General Public License from time to time. Such new
148
+ versions will be similar in spirit to the present version, but may
149
+ differ in detail to address new problems or concerns.
150
+
151
+ Each version is given a distinguishing version number. If the
152
+ Library as you received it specifies that a certain numbered version
153
+ of the GNU Lesser General Public License "or any later version"
154
+ applies to it, you have the option of following the terms and
155
+ conditions either of that published version or of any later version
156
+ published by the Free Software Foundation. If the Library as you
157
+ received it does not specify a version number of the GNU Lesser
158
+ General Public License, you may choose any version of the GNU Lesser
159
+ General Public License ever published by the Free Software Foundation.
160
+
161
+ If the Library as you received it specifies that a proxy can decide
162
+ whether future versions of the GNU Lesser General Public License shall
163
+ apply, that proxy's public statement of acceptance of any version is
164
+ permanent authorization for you to choose that version for the
165
+ Library.
comdas-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,69 @@
1
+ Metadata-Version: 2.4
2
+ Name: ComDAS
3
+ Version: 0.1.0
4
+ Summary: DASCORE companion package that adds support for compressed DAS data
5
+ Author-email: Byron-Selvage <bselvage@mines.edu>
6
+ License: LGPL-3.0-or-later
7
+ Keywords: dascore,compression,das,dasdae
8
+ Requires-Python: >=3.10
9
+ Description-Content-Type: text/markdown
10
+ License-File: LICENSE
11
+ Requires-Dist: numpy>=1.24
12
+ Requires-Dist: dascore>=0.1.0
13
+ Requires-Dist: h5py
14
+ Requires-Dist: PyWavelets
15
+ Provides-Extra: dev
16
+ Requires-Dist: pytest; extra == "dev"
17
+ Requires-Dist: ruff; extra == "dev"
18
+ Requires-Dist: sphinx; extra == "dev"
19
+ Requires-Dist: furo; extra == "dev"
20
+ Requires-Dist: sphinx-autodoc-typehints; extra == "dev"
21
+ Requires-Dist: myst-nb; extra == "dev"
22
+ Requires-Dist: matplotlib; extra == "dev"
23
+ Requires-Dist: ipykernel; extra == "dev"
24
+ Dynamic: license-file
25
+
26
+ # ComDAS
27
+
28
+ ![Python versions tested](https://img.shields.io/badge/Python-3.10%20%7C%203.11%20%7C%203.12%20%7C%203.13%20%7C%203.14-blue)
29
+
30
+ ComDAS (Compressed DAS) lets you store and work with compressed distributed acoustic sensing (DAS) data using ordinary [DASCore](https://dascore.org/) tools.
31
+
32
+ With ComDAS you can:
33
+
34
+ - **Shrink DAS data in memory.** Compress a DASCore patch and keep using it like any other.
35
+ - **Save compressed files.** Write patches, spools, or whole directories of raw data to a compressed HDF5 file or files.
36
+ - **Read compressed files with plain DASCore.** Once ComDAS is installed, `dascore.spool()` opens compressed files directly without needing to know how the data was compressed.
37
+ - **Choose your compression level.** Pick a codec and set how much detail to keep, from near-lossless to aggressive compression.
38
+ - **Implement your own algorithm.** Add a new compression method by writing a codec class.
39
+
40
+ > [!NOTE]
41
+ > ComDAS is in active development. The file format and public API may change between releases.
42
+
43
+ ## Supported codecs
44
+
45
+ | Codec | Main setting | Reference |
46
+ | --- | --- | --- |
47
+ | [SVD](https://byron-selvage.github.io/ComDAS/codecs/svd.html) | `rank` or retained `energy` | [NumPy SVD](https://numpy.org/doc/1.22/reference/generated/numpy.linalg.svd.html) |
48
+ | [Wavelet](https://byron-selvage.github.io/ComDAS/codecs/wavelet.html) | `keep_fraction` or `threshold` | [PyWavelets](https://doi.org/10.21105/joss.01237); [DeVore et al. (1992)](https://doi.org/10.1109/18.119733) |
49
+
50
+ ## Installation
51
+
52
+ ComDAS requires Python 3.10 or newer.
53
+
54
+ ```bash
55
+ pip install comdas
56
+ ```
57
+
58
+ ## Documentation
59
+
60
+ Full documentation is available at [byron-selvage.github.io/ComDAS](https://byron-selvage.github.io/ComDAS/), including:
61
+
62
+ - [Quick start](https://byron-selvage.github.io/ComDAS/quickstart.html): compress a patch, save a compressed file, and read it back
63
+ - [Codecs](https://byron-selvage.github.io/ComDAS/codecs/svd.html): configuration options and examples for each codec
64
+ - [Examples](https://byron-selvage.github.io/ComDAS/examples/compression_comparison.html)
65
+ - [API reference](https://byron-selvage.github.io/ComDAS/api/index.html)
66
+
67
+ ## License
68
+
69
+ ComDAS is licensed under the [GNU Lesser General Public License](LICENSE).
comdas-0.1.0/README.md ADDED
@@ -0,0 +1,44 @@
1
+ # ComDAS
2
+
3
+ ![Python versions tested](https://img.shields.io/badge/Python-3.10%20%7C%203.11%20%7C%203.12%20%7C%203.13%20%7C%203.14-blue)
4
+
5
+ ComDAS (Compressed DAS) lets you store and work with compressed distributed acoustic sensing (DAS) data using ordinary [DASCore](https://dascore.org/) tools.
6
+
7
+ With ComDAS you can:
8
+
9
+ - **Shrink DAS data in memory.** Compress a DASCore patch and keep using it like any other.
10
+ - **Save compressed files.** Write patches, spools, or whole directories of raw data to a compressed HDF5 file or files.
11
+ - **Read compressed files with plain DASCore.** Once ComDAS is installed, `dascore.spool()` opens compressed files directly without needing to know how the data was compressed.
12
+ - **Choose your compression level.** Pick a codec and set how much detail to keep, from near-lossless to aggressive compression.
13
+ - **Implement your own algorithm.** Add a new compression method by writing a codec class.
14
+
15
+ > [!NOTE]
16
+ > ComDAS is in active development. The file format and public API may change between releases.
17
+
18
+ ## Supported codecs
19
+
20
+ | Codec | Main setting | Reference |
21
+ | --- | --- | --- |
22
+ | [SVD](https://byron-selvage.github.io/ComDAS/codecs/svd.html) | `rank` or retained `energy` | [NumPy SVD](https://numpy.org/doc/1.22/reference/generated/numpy.linalg.svd.html) |
23
+ | [Wavelet](https://byron-selvage.github.io/ComDAS/codecs/wavelet.html) | `keep_fraction` or `threshold` | [PyWavelets](https://doi.org/10.21105/joss.01237); [DeVore et al. (1992)](https://doi.org/10.1109/18.119733) |
24
+
25
+ ## Installation
26
+
27
+ ComDAS requires Python 3.10 or newer.
28
+
29
+ ```bash
30
+ pip install comdas
31
+ ```
32
+
33
+ ## Documentation
34
+
35
+ Full documentation is available at [byron-selvage.github.io/ComDAS](https://byron-selvage.github.io/ComDAS/), including:
36
+
37
+ - [Quick start](https://byron-selvage.github.io/ComDAS/quickstart.html): compress a patch, save a compressed file, and read it back
38
+ - [Codecs](https://byron-selvage.github.io/ComDAS/codecs/svd.html): configuration options and examples for each codec
39
+ - [Examples](https://byron-selvage.github.io/ComDAS/examples/compression_comparison.html)
40
+ - [API reference](https://byron-selvage.github.io/ComDAS/api/index.html)
41
+
42
+ ## License
43
+
44
+ ComDAS is licensed under the [GNU Lesser General Public License](LICENSE).