sofar 1.1.4__tar.gz → 1.2.1__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 (123) hide show
  1. sofar-1.2.1/CONTRIBUTING.rst +90 -0
  2. {sofar-1.1.4 → sofar-1.2.1}/HISTORY.rst +13 -1
  3. {sofar-1.1.4 → sofar-1.2.1}/LICENSE +4 -1
  4. {sofar-1.1.4 → sofar-1.2.1}/MANIFEST.in +7 -2
  5. sofar-1.2.1/PKG-INFO +136 -0
  6. sofar-1.2.1/README.md +61 -0
  7. sofar-1.2.1/docs/Makefile +20 -0
  8. sofar-1.2.1/docs/api_reference.rst +20 -0
  9. sofar-1.2.1/docs/conf.py +167 -0
  10. sofar-1.2.1/docs/contributing.rst +1 -0
  11. sofar-1.2.1/docs/history.rst +1 -0
  12. sofar-1.2.1/docs/index.rst +4 -0
  13. sofar-1.2.1/docs/make.bat +36 -0
  14. sofar-1.2.1/docs/readme.rst +1 -0
  15. sofar-1.2.1/docs/resources/conventions.py +162 -0
  16. sofar-1.2.1/docs/resources/working_with_sofa_HRIR_lateral.png +0 -0
  17. sofar-1.2.1/docs/resources/working_with_sofa_source_horizontal.png +0 -0
  18. sofar-1.2.1/docs/resources/working_with_sofa_source_lateral.png +0 -0
  19. sofar-1.2.1/docs/sofar.rst +82 -0
  20. sofar-1.2.1/pyproject.toml +154 -0
  21. sofar-1.2.1/setup.cfg +4 -0
  22. {sofar-1.1.4 → sofar-1.2.1}/sofar/__init__.py +5 -4
  23. {sofar-1.1.4 → sofar-1.2.1}/sofar/io.py +31 -27
  24. {sofar-1.1.4 → sofar-1.2.1}/sofar/sofa.py +93 -52
  25. sofar-1.2.1/sofar/sofa_conventions/conventions/AnnotatedEmitterAudio_0.2.csv +46 -0
  26. sofar-1.2.1/sofar/sofa_conventions/conventions/AnnotatedEmitterAudio_0.2.json +353 -0
  27. sofar-1.2.1/sofar/sofa_conventions/conventions/AnnotatedReceiverAudio_0.2.csv +46 -0
  28. sofar-1.2.1/sofar/sofa_conventions/conventions/AnnotatedReceiverAudio_0.2.json +353 -0
  29. sofar-1.2.1/sofar/sofa_conventions/conventions/deprecated/AnnotatedEmitterAudio_0.1.csv +46 -0
  30. sofar-1.2.1/sofar/sofa_conventions/conventions/deprecated/AnnotatedEmitterAudio_0.1.json +351 -0
  31. sofar-1.2.1/sofar/sofa_conventions/conventions/deprecated/AnnotatedReceiverAudio_0.1.csv +46 -0
  32. sofar-1.2.1/sofar/sofa_conventions/conventions/deprecated/AnnotatedReceiverAudio_0.1.json +351 -0
  33. sofar-1.2.1/sofar/sofa_conventions/conventions/deprecated/SingleTrackedAudio_0.1.csv +47 -0
  34. sofar-1.2.1/sofar/sofa_conventions/conventions/deprecated/SingleTrackedAudio_0.1.json +366 -0
  35. sofar-1.2.1/sofar/sofa_conventions/conventions/deprecated/SingleTrackedAudio_0.2.csv +51 -0
  36. sofar-1.2.1/sofar/sofa_conventions/conventions/deprecated/SingleTrackedAudio_0.2.json +397 -0
  37. {sofar-1.1.4 → sofar-1.2.1}/sofar/sofa_conventions/rules/deprecations.json +2 -1
  38. {sofar-1.1.4 → sofar-1.2.1}/sofar/sofa_conventions/rules/rules.json +21 -2
  39. {sofar-1.1.4 → sofar-1.2.1}/sofar/sofa_conventions/rules/upgrade.json +36 -0
  40. sofar-1.2.1/sofar/sofa_conventions/write_upgrade_rules.py +139 -0
  41. sofar-1.2.1/sofar/sofa_conventions/write_verification_data.py +313 -0
  42. sofar-1.2.1/sofar/sofa_conventions/write_verification_rules.py +356 -0
  43. sofar-1.2.1/sofar/sofastream.py +301 -0
  44. {sofar-1.1.4 → sofar-1.2.1}/sofar/update_conventions.py +125 -100
  45. {sofar-1.1.4 → sofar-1.2.1}/sofar/utils.py +5 -4
  46. sofar-1.2.1/sofar.egg-info/PKG-INFO +136 -0
  47. {sofar-1.1.4 → sofar-1.2.1}/sofar.egg-info/SOURCES.txt +33 -5
  48. sofar-1.2.1/sofar.egg-info/requires.txt +30 -0
  49. sofar-1.2.1/sofar.egg-info/top_level.txt +5 -0
  50. sofar-1.2.1/tests/conftest.py +27 -0
  51. {sofar-1.1.4 → sofar-1.2.1}/tests/test_deprecations.py +2 -2
  52. {sofar-1.1.4 → sofar-1.2.1}/tests/test_io.py +27 -22
  53. {sofar-1.1.4 → sofar-1.2.1}/tests/test_sofa.py +30 -31
  54. {sofar-1.1.4 → sofar-1.2.1}/tests/test_sofa_upgrade_conventions.py +11 -2
  55. {sofar-1.1.4 → sofar-1.2.1}/tests/test_sofa_verify.py +41 -40
  56. sofar-1.2.1/tests/test_sofastream.py +127 -0
  57. {sofar-1.1.4 → sofar-1.2.1}/tests/test_utils.py +23 -14
  58. sofar-1.1.4/AUTHORS.rst +0 -15
  59. sofar-1.1.4/CONTRIBUTING.rst +0 -210
  60. sofar-1.1.4/PKG-INFO +0 -91
  61. sofar-1.1.4/README.rst +0 -59
  62. sofar-1.1.4/setup.cfg +0 -26
  63. sofar-1.1.4/setup.py +0 -73
  64. sofar-1.1.4/sofar.egg-info/PKG-INFO +0 -91
  65. sofar-1.1.4/sofar.egg-info/not-zip-safe +0 -1
  66. sofar-1.1.4/sofar.egg-info/requires.txt +0 -5
  67. sofar-1.1.4/sofar.egg-info/top_level.txt +0 -2
  68. {sofar-1.1.4 → sofar-1.2.1}/sofar/sofa_conventions/VERSION +0 -0
  69. {sofar-1.1.4 → sofar-1.2.1}/sofar/sofa_conventions/conventions/FreeFieldDirectivityTF_1.1.csv +0 -0
  70. {sofar-1.1.4 → sofar-1.2.1}/sofar/sofa_conventions/conventions/FreeFieldDirectivityTF_1.1.json +0 -0
  71. {sofar-1.1.4 → sofar-1.2.1}/sofar/sofa_conventions/conventions/FreeFieldHRIR_1.0.csv +0 -0
  72. {sofar-1.1.4 → sofar-1.2.1}/sofar/sofa_conventions/conventions/FreeFieldHRIR_1.0.json +0 -0
  73. {sofar-1.1.4 → sofar-1.2.1}/sofar/sofa_conventions/conventions/FreeFieldHRTF_1.0.csv +0 -0
  74. {sofar-1.1.4 → sofar-1.2.1}/sofar/sofa_conventions/conventions/FreeFieldHRTF_1.0.json +0 -0
  75. {sofar-1.1.4 → sofar-1.2.1}/sofar/sofa_conventions/conventions/GeneralFIR-E_2.0.csv +0 -0
  76. {sofar-1.1.4 → sofar-1.2.1}/sofar/sofa_conventions/conventions/GeneralFIR-E_2.0.json +0 -0
  77. {sofar-1.1.4 → sofar-1.2.1}/sofar/sofa_conventions/conventions/GeneralFIR_1.0.csv +0 -0
  78. {sofar-1.1.4 → sofar-1.2.1}/sofar/sofa_conventions/conventions/GeneralFIR_1.0.json +0 -0
  79. {sofar-1.1.4 → sofar-1.2.1}/sofar/sofa_conventions/conventions/GeneralSOS_1.0.csv +0 -0
  80. {sofar-1.1.4 → sofar-1.2.1}/sofar/sofa_conventions/conventions/GeneralSOS_1.0.json +0 -0
  81. {sofar-1.1.4 → sofar-1.2.1}/sofar/sofa_conventions/conventions/GeneralTF-E_1.0.csv +0 -0
  82. {sofar-1.1.4 → sofar-1.2.1}/sofar/sofa_conventions/conventions/GeneralTF-E_1.0.json +0 -0
  83. {sofar-1.1.4 → sofar-1.2.1}/sofar/sofa_conventions/conventions/GeneralTF_1.0.csv +0 -0
  84. {sofar-1.1.4 → sofar-1.2.1}/sofar/sofa_conventions/conventions/GeneralTF_1.0.json +0 -0
  85. {sofar-1.1.4 → sofar-1.2.1}/sofar/sofa_conventions/conventions/GeneralTF_2.0.csv +0 -0
  86. {sofar-1.1.4 → sofar-1.2.1}/sofar/sofa_conventions/conventions/GeneralTF_2.0.json +0 -0
  87. {sofar-1.1.4 → sofar-1.2.1}/sofar/sofa_conventions/conventions/SimpleFreeFieldHRIR_1.0.csv +0 -0
  88. {sofar-1.1.4 → sofar-1.2.1}/sofar/sofa_conventions/conventions/SimpleFreeFieldHRIR_1.0.json +0 -0
  89. {sofar-1.1.4 → sofar-1.2.1}/sofar/sofa_conventions/conventions/SimpleFreeFieldHRSOS_1.0.csv +0 -0
  90. {sofar-1.1.4 → sofar-1.2.1}/sofar/sofa_conventions/conventions/SimpleFreeFieldHRSOS_1.0.json +0 -0
  91. {sofar-1.1.4 → sofar-1.2.1}/sofar/sofa_conventions/conventions/SimpleFreeFieldHRTF_1.0.csv +0 -0
  92. {sofar-1.1.4 → sofar-1.2.1}/sofar/sofa_conventions/conventions/SimpleFreeFieldHRTF_1.0.json +0 -0
  93. {sofar-1.1.4 → sofar-1.2.1}/sofar/sofa_conventions/conventions/SimpleFreeFieldSOS_1.0.csv +0 -0
  94. {sofar-1.1.4 → sofar-1.2.1}/sofar/sofa_conventions/conventions/SimpleFreeFieldSOS_1.0.json +0 -0
  95. {sofar-1.1.4 → sofar-1.2.1}/sofar/sofa_conventions/conventions/SimpleHeadphoneIR_1.0.csv +0 -0
  96. {sofar-1.1.4 → sofar-1.2.1}/sofar/sofa_conventions/conventions/SimpleHeadphoneIR_1.0.json +0 -0
  97. {sofar-1.1.4 → sofar-1.2.1}/sofar/sofa_conventions/conventions/SingleRoomMIMOSRIR_1.0.csv +0 -0
  98. {sofar-1.1.4 → sofar-1.2.1}/sofar/sofa_conventions/conventions/SingleRoomMIMOSRIR_1.0.json +0 -0
  99. {sofar-1.1.4 → sofar-1.2.1}/sofar/sofa_conventions/conventions/SingleRoomSRIR_1.0.csv +0 -0
  100. {sofar-1.1.4 → sofar-1.2.1}/sofar/sofa_conventions/conventions/SingleRoomSRIR_1.0.json +0 -0
  101. {sofar-1.1.4 → sofar-1.2.1}/sofar/sofa_conventions/conventions/deprecated/FreeFieldDirectivityTF_1.0.csv +0 -0
  102. {sofar-1.1.4 → sofar-1.2.1}/sofar/sofa_conventions/conventions/deprecated/FreeFieldDirectivityTF_1.0.json +0 -0
  103. {sofar-1.1.4 → sofar-1.2.1}/sofar/sofa_conventions/conventions/deprecated/GeneralFIRE_1.0.csv +0 -0
  104. {sofar-1.1.4 → sofar-1.2.1}/sofar/sofa_conventions/conventions/deprecated/GeneralFIRE_1.0.json +0 -0
  105. {sofar-1.1.4 → sofar-1.2.1}/sofar/sofa_conventions/conventions/deprecated/MultiSpeakerBRIR_0.3.csv +0 -0
  106. {sofar-1.1.4 → sofar-1.2.1}/sofar/sofa_conventions/conventions/deprecated/MultiSpeakerBRIR_0.3.json +0 -0
  107. {sofar-1.1.4 → sofar-1.2.1}/sofar/sofa_conventions/conventions/deprecated/SimpleFreeFieldHRIR_0.4.csv +0 -0
  108. {sofar-1.1.4 → sofar-1.2.1}/sofar/sofa_conventions/conventions/deprecated/SimpleFreeFieldHRIR_0.4.json +0 -0
  109. {sofar-1.1.4 → sofar-1.2.1}/sofar/sofa_conventions/conventions/deprecated/SimpleFreeFieldTF_0.4.csv +0 -0
  110. {sofar-1.1.4 → sofar-1.2.1}/sofar/sofa_conventions/conventions/deprecated/SimpleFreeFieldTF_0.4.json +0 -0
  111. {sofar-1.1.4 → sofar-1.2.1}/sofar/sofa_conventions/conventions/deprecated/SimpleFreeFieldTF_1.0.csv +0 -0
  112. {sofar-1.1.4 → sofar-1.2.1}/sofar/sofa_conventions/conventions/deprecated/SimpleFreeFieldTF_1.0.json +0 -0
  113. {sofar-1.1.4 → sofar-1.2.1}/sofar/sofa_conventions/conventions/deprecated/SimpleHeadphoneIR_0.1.csv +0 -0
  114. {sofar-1.1.4 → sofar-1.2.1}/sofar/sofa_conventions/conventions/deprecated/SimpleHeadphoneIR_0.1.json +0 -0
  115. {sofar-1.1.4 → sofar-1.2.1}/sofar/sofa_conventions/conventions/deprecated/SimpleHeadphoneIR_0.2.csv +0 -0
  116. {sofar-1.1.4 → sofar-1.2.1}/sofar/sofa_conventions/conventions/deprecated/SimpleHeadphoneIR_0.2.json +0 -0
  117. {sofar-1.1.4 → sofar-1.2.1}/sofar/sofa_conventions/conventions/deprecated/SingleRoomDRIR_0.2.csv +0 -0
  118. {sofar-1.1.4 → sofar-1.2.1}/sofar/sofa_conventions/conventions/deprecated/SingleRoomDRIR_0.2.json +0 -0
  119. {sofar-1.1.4 → sofar-1.2.1}/sofar/sofa_conventions/conventions/deprecated/SingleRoomDRIR_0.3.csv +0 -0
  120. {sofar-1.1.4 → sofar-1.2.1}/sofar/sofa_conventions/conventions/deprecated/SingleRoomDRIR_0.3.json +0 -0
  121. {sofar-1.1.4 → sofar-1.2.1}/sofar/sofa_conventions/rules/unit_aliases.json +0 -0
  122. {sofar-1.1.4 → sofar-1.2.1}/sofar.egg-info/dependency_links.txt +0 -0
  123. {sofar-1.1.4 → sofar-1.2.1}/tests/__init__.py +0 -0
@@ -0,0 +1,90 @@
1
+ .. highlight:: shell
2
+
3
+ ============
4
+ Contributing
5
+ ============
6
+
7
+ Contributions are welcome, and they are greatly appreciated! Every little bit
8
+ helps, and credit will always be given. The following helps you to start
9
+ contributing specifically to sofar. Please also consider the
10
+ `general contributing guidelines`_ for example regarding the style
11
+ of code and documentation and some helpful hints.
12
+
13
+ Types of Contributions
14
+ ----------------------
15
+
16
+ Report Bugs or Suggest Features
17
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18
+
19
+ The best place for this is https://github.com/pyfar/sofar/issues.
20
+
21
+ Fix Bugs or Implement Features
22
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
23
+
24
+ Look through https://github.com/pyfar/sofar/issues for bugs or feature request
25
+ and contact us or comment if you are interested in implementing.
26
+
27
+ Write Documentation
28
+ ~~~~~~~~~~~~~~~~~~~
29
+
30
+ sofar could always use more documentation, whether as part of the
31
+ official sofar docs, in docstrings, or even on the web in blog posts,
32
+ articles, and such.
33
+
34
+ Get Started!
35
+ ------------
36
+
37
+ Ready to contribute? Here's how to set up `sofar` for local development using the command-line interface. Note that several alternative user interfaces exist, e.g., the Git GUI, `GitHub Desktop <https://desktop.github.com/>`_, extensions in `Visual Studio Code <https://code.visualstudio.com/>`_ ...
38
+
39
+ 1. `Fork <https://docs.github.com/en/get-started/quickstart/fork-a-repo/>`_ the `sofar` repo on GitHub.
40
+ 2. Clone your fork locally and cd into the sofar directory::
41
+
42
+ $ git clone --recursive https://github.com/YOUR_USERNAME/sofar.git
43
+ $ cd sofar
44
+
45
+ 3. Note that some graphical Git interfaces can not do the recursive clone. If the folder sofar/sofa_conventions is empty try::
46
+
47
+ $ git submodule update --init
48
+
49
+ 4. Install your local copy into a virtualenv. Assuming you have Anaconda or Miniconda installed, this is how you set up your fork for local development::
50
+
51
+ $ conda create --name sofar python
52
+ $ conda activate sofar
53
+ $ pip install -e ".[dev]"
54
+
55
+ 5. Create a branch for local development. Indicate the intention of your branch in its respective name (i.e. `feature/branch-name` or `bugfix/branch-name`)::
56
+
57
+ $ git checkout -b name-of-your-bugfix-or-feature
58
+
59
+ Now you can make your changes locally.
60
+
61
+ 6. When you're done making changes, check that your changes pass ruff and the
62
+ tests::
63
+
64
+ $ ruff check
65
+ $ pytest
66
+
67
+ ruff must pass without any warnings for `./sofar` and `./tests` using the default or a stricter configuration. Ruff ignores a couple of PEP Errors (see `./pyproject.toml`). If necessary, adjust your linting configuration in your IDE accordingly.
68
+
69
+ 7. Commit your changes and push your branch to GitHub::
70
+
71
+ $ git add .
72
+ $ git commit -m "Your detailed description of your changes."
73
+ $ git push origin name-of-your-bugfix-or-feature
74
+
75
+ 8. Submit a pull request on the develop branch through the GitHub website.
76
+
77
+
78
+ Submodules
79
+ ~~~~~~~~~~
80
+
81
+ To update the submodule containing the conventions and verification rules run
82
+
83
+ .. code-block:: bash
84
+
85
+ $ git submodule update --init --recursive
86
+ $ git submodule update --recursive --remote
87
+
88
+ and then commit the changes
89
+
90
+ .. _general contributing guidelines: https://pyfar-gallery.readthedocs.io/en/latest/contribute/index.html
@@ -1,6 +1,18 @@
1
+ =======
1
2
  History
2
3
  =======
3
4
 
5
+ 1.2.1 (2024-12-12)
6
+ ------------------
7
+ * Deployment: Move from setup.py to pyproject.toml (PR #114, #115)
8
+
9
+ 1.2.0 (2024-08-29)
10
+ ------------------
11
+ * Feature: Introduce `SofaStream` class for reading parts of large Sofa files without reading the entire file (PR #90, 97)
12
+ * Documentation: Add improved landing page for documentation on readthedocs.io and harmonize documentation (PR #80, 87, 88, 89, 92, 95, 96, 98, 101, 103, 105, 106, 107, 109)
13
+ * Enhancement: When manually updating the conventions with `sofar.update_conventions`, the conventions are first downloaded to a temporary folder and compared to the existing conventions without overriding them (they were directly overridden before). The user is then informed about the changes and can continue or abort updating the conventions (PR #94)
14
+ * Enhancement: Do not write `__Encoding` field for string variables, because it could cause issues with the Matlab SOFAtoolbox (PR #110)
15
+
4
16
  1.1.4 (2024-06-15)
5
17
  ------------------
6
18
  * Update for numpy 2.0 (PR #100)
@@ -81,4 +93,4 @@ History
81
93
 
82
94
  0.1.0 (2021-10-29)
83
95
  ------------------
84
- * First release on PyPI
96
+ * First release on PyPI
@@ -1,4 +1,6 @@
1
- Copyright (c) [2021] [The pyfar developers]
1
+ MIT License
2
+
3
+ Copyright (c) 2021, The pyfar developers
2
4
 
3
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
4
6
  of this software and associated documentation files (the "Software"), to deal
@@ -17,3 +19,4 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
19
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
20
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19
21
  SOFTWARE.
22
+
@@ -1,8 +1,7 @@
1
- include AUTHORS.rst
2
1
  include CONTRIBUTING.rst
3
2
  include HISTORY.rst
4
3
  include LICENSE
5
- include README.rst
4
+ include README.md
6
5
 
7
6
  include sofar/sofa_conventions/VERSION
8
7
  recursive-include sofar/sofa_conventions/conventions *.csv
@@ -10,3 +9,9 @@ recursive-include sofar/sofa_conventions/conventions *.json
10
9
  recursive-include sofar/sofa_conventions/conventions/deprecated *.csv
11
10
  recursive-include sofar/sofa_conventions/conventions/deprecated *.json
12
11
  recursive-include sofar/sofa_conventions/rules *.json
12
+
13
+ recursive-include tests *
14
+ recursive-exclude * __pycache__
15
+ recursive-exclude * *.py[co]
16
+
17
+ recursive-include docs *.rst conf.py Makefile make.bat *.jpg *.png *.gif
sofar-1.2.1/PKG-INFO ADDED
@@ -0,0 +1,136 @@
1
+ Metadata-Version: 2.1
2
+ Name: sofar
3
+ Version: 1.2.1
4
+ Summary: Maybe the most complete python package for SOFA files so far.
5
+ Author-email: The pyfar developers <info@pyfar.org>
6
+ License: MIT License
7
+
8
+ Copyright (c) 2021, The pyfar developers
9
+
10
+ Permission is hereby granted, free of charge, to any person obtaining a copy
11
+ of this software and associated documentation files (the "Software"), to deal
12
+ in the Software without restriction, including without limitation the rights
13
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
+ copies of the Software, and to permit persons to whom the Software is
15
+ furnished to do so, subject to the following conditions:
16
+
17
+ The above copyright notice and this permission notice shall be included in all
18
+ copies or substantial portions of the Software.
19
+
20
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26
+ SOFTWARE.
27
+
28
+
29
+ Project-URL: Tracker, https://github.com/pyfar/sofar/issues
30
+ Project-URL: Documentation, https://sofar.readthedocs.io/
31
+ Project-URL: Download, https://pypi.org/project/sofar/
32
+ Project-URL: Homepage, https://pyfar.org/
33
+ Project-URL: Source, https://github.com/pyfar/sofar
34
+ Project-URL: Changelog, https://github.com/pyfar/sofar/blob/main/HISTORY.rst
35
+ Keywords: acoustics,pyfar
36
+ Classifier: Development Status :: 4 - Beta
37
+ Classifier: Intended Audience :: Science/Research
38
+ Classifier: License :: OSI Approved :: MIT License
39
+ Classifier: Natural Language :: English
40
+ Classifier: Programming Language :: Python :: 3
41
+ Classifier: Programming Language :: Python :: 3.8
42
+ Classifier: Programming Language :: Python :: 3.9
43
+ Classifier: Programming Language :: Python :: 3.10
44
+ Classifier: Programming Language :: Python :: 3.11
45
+ Classifier: Programming Language :: Python :: 3.12
46
+ Requires-Python: >=3.8
47
+ Description-Content-Type: text/markdown
48
+ License-File: LICENSE
49
+ Requires-Dist: netCDF4
50
+ Requires-Dist: numpy>=1.14.0
51
+ Requires-Dist: beautifulsoup4
52
+ Requires-Dist: requests
53
+ Provides-Extra: deploy
54
+ Requires-Dist: twine; extra == "deploy"
55
+ Requires-Dist: wheel; extra == "deploy"
56
+ Requires-Dist: build; extra == "deploy"
57
+ Requires-Dist: setuptools; extra == "deploy"
58
+ Requires-Dist: bump-my-version; extra == "deploy"
59
+ Provides-Extra: tests
60
+ Requires-Dist: pytest; extra == "tests"
61
+ Requires-Dist: pytest-cov; extra == "tests"
62
+ Requires-Dist: watchdog; extra == "tests"
63
+ Requires-Dist: ruff==0.8.2; extra == "tests"
64
+ Requires-Dist: coverage; extra == "tests"
65
+ Provides-Extra: docs
66
+ Requires-Dist: sphinx; extra == "docs"
67
+ Requires-Dist: autodocsumm>=0.2.14; extra == "docs"
68
+ Requires-Dist: pydata-sphinx-theme; extra == "docs"
69
+ Requires-Dist: sphinx_mdinclude; extra == "docs"
70
+ Requires-Dist: sphinx-design; extra == "docs"
71
+ Requires-Dist: sphinx-favicon; extra == "docs"
72
+ Requires-Dist: sphinx-reredirects; extra == "docs"
73
+ Provides-Extra: dev
74
+ Requires-Dist: sofar[deploy,docs,tests]; extra == "dev"
75
+
76
+ <h1 align="center">
77
+ <img src="https://github.com/pyfar/gallery/raw/main/docs/resources/logos/pyfar_logos_fixed_size_sofar.png" width="300">
78
+ </h1><br>
79
+
80
+ [![PyPI version](https://badge.fury.io/py/sofar.svg)](https://badge.fury.io/py/sofar)
81
+ [![Documentation Status](https://readthedocs.org/projects/sofar/badge/?version=latest)](https://sofar.readthedocs.io/en/latest/?badge=latest)
82
+ [![CircleCI](https://circleci.com/gh/pyfar/sofar.svg?style=shield)](https://circleci.com/gh/pyfar/sofar)
83
+ [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/pyfar/gallery/main?labpath=docs/gallery/interactive/sofar_introduction.ipynb)
84
+
85
+ Sofar is maybe the most complete Python package for the SOFA file format so
86
+ far. SOFA files store spatially distributed acoustic data such as impulse
87
+ responses or transfer functions. They are defined by the AES69-2022 standard
88
+ (see references). These are the key features of sofar
89
+
90
+ - Read, edit, and write SOFA files
91
+ - Add custom attributes to SOFA files
92
+ - Full Verification of the content of a SOFA files against AES69-2022
93
+ - Upgrade data that uses outdated SOFA conventions
94
+ - Open license allows unrestricted use
95
+ - sofar is tested using continuous integration on
96
+ - Uses a complete definition of the AES69-2022 standard (see references) maintained at [sofa_conventions](https://github.com/pyfar/sofa_conventions)
97
+
98
+ Getting Started
99
+ ===============
100
+
101
+ The [sofar and SOFA notebook](https://pyfar-gallery.readthedocs.io/en/latest/gallery/interactive/sofar_introduction.html)
102
+ gives an overview of the most important sofar functionality and is a good starting point. For processing and visualizing data
103
+ inside SOFA files, we recommend the [pyfar package](https://pyfar.readthedocs.io) that can read SOFA files through
104
+ `pyfar.io.read_sofa` and the in-depth examples contained in the
105
+ [pyfar example gallery](https://pyfar-gallery.readthedocs.io/en/latest/examples_gallery.html). Check out
106
+ [read the docs](https://sofar.readthedocs.io) for a complete documentation of sofar. A more detailed introduction to the SOFA
107
+ file format is given by Majdak et. al. 2022 (see references below). All information is also bundled at [pyfar.org](https://pyfar.org).
108
+
109
+ Installation
110
+ ============
111
+
112
+ Use pip to install sofar
113
+
114
+ pip install sofar
115
+
116
+
117
+ (Requires Python >= 3.8)
118
+
119
+ If the installation fails, please check out the [help section](https://pyfar-gallery.readthedocs.io/en/latest/help).
120
+
121
+ Contributing
122
+ ============
123
+
124
+ Refer to the [contribution guidelines](https://sofar.readthedocs.io/en/stable/contributing.html) for more information.
125
+
126
+ References
127
+ ==========
128
+
129
+ AES69-2022: *AES standard for file exchange - Spatial acoustic data file
130
+ format*, Audio Engineering Society, Inc., New York, NY, USA.
131
+ (https://www.aes.org/publications/standards/search.cfm?docID=99)
132
+
133
+ P. Majdak, F. Zotter, F. Brinkmann, J. De Muynke, M. Mihocic, and M.
134
+ Noisternig, "Spatially Oriented Format for Acoustics 2.1: Introduction and
135
+ Recent Advances", *J. Audio Eng. Soc.*, vol. 70, no. 7/8, pp. 565-584,
136
+ Jul. 2022. DOI: https://doi.org/10.17743/jaes.2022.0026
sofar-1.2.1/README.md ADDED
@@ -0,0 +1,61 @@
1
+ <h1 align="center">
2
+ <img src="https://github.com/pyfar/gallery/raw/main/docs/resources/logos/pyfar_logos_fixed_size_sofar.png" width="300">
3
+ </h1><br>
4
+
5
+ [![PyPI version](https://badge.fury.io/py/sofar.svg)](https://badge.fury.io/py/sofar)
6
+ [![Documentation Status](https://readthedocs.org/projects/sofar/badge/?version=latest)](https://sofar.readthedocs.io/en/latest/?badge=latest)
7
+ [![CircleCI](https://circleci.com/gh/pyfar/sofar.svg?style=shield)](https://circleci.com/gh/pyfar/sofar)
8
+ [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/pyfar/gallery/main?labpath=docs/gallery/interactive/sofar_introduction.ipynb)
9
+
10
+ Sofar is maybe the most complete Python package for the SOFA file format so
11
+ far. SOFA files store spatially distributed acoustic data such as impulse
12
+ responses or transfer functions. They are defined by the AES69-2022 standard
13
+ (see references). These are the key features of sofar
14
+
15
+ - Read, edit, and write SOFA files
16
+ - Add custom attributes to SOFA files
17
+ - Full Verification of the content of a SOFA files against AES69-2022
18
+ - Upgrade data that uses outdated SOFA conventions
19
+ - Open license allows unrestricted use
20
+ - sofar is tested using continuous integration on
21
+ - Uses a complete definition of the AES69-2022 standard (see references) maintained at [sofa_conventions](https://github.com/pyfar/sofa_conventions)
22
+
23
+ Getting Started
24
+ ===============
25
+
26
+ The [sofar and SOFA notebook](https://pyfar-gallery.readthedocs.io/en/latest/gallery/interactive/sofar_introduction.html)
27
+ gives an overview of the most important sofar functionality and is a good starting point. For processing and visualizing data
28
+ inside SOFA files, we recommend the [pyfar package](https://pyfar.readthedocs.io) that can read SOFA files through
29
+ `pyfar.io.read_sofa` and the in-depth examples contained in the
30
+ [pyfar example gallery](https://pyfar-gallery.readthedocs.io/en/latest/examples_gallery.html). Check out
31
+ [read the docs](https://sofar.readthedocs.io) for a complete documentation of sofar. A more detailed introduction to the SOFA
32
+ file format is given by Majdak et. al. 2022 (see references below). All information is also bundled at [pyfar.org](https://pyfar.org).
33
+
34
+ Installation
35
+ ============
36
+
37
+ Use pip to install sofar
38
+
39
+ pip install sofar
40
+
41
+
42
+ (Requires Python >= 3.8)
43
+
44
+ If the installation fails, please check out the [help section](https://pyfar-gallery.readthedocs.io/en/latest/help).
45
+
46
+ Contributing
47
+ ============
48
+
49
+ Refer to the [contribution guidelines](https://sofar.readthedocs.io/en/stable/contributing.html) for more information.
50
+
51
+ References
52
+ ==========
53
+
54
+ AES69-2022: *AES standard for file exchange - Spatial acoustic data file
55
+ format*, Audio Engineering Society, Inc., New York, NY, USA.
56
+ (https://www.aes.org/publications/standards/search.cfm?docID=99)
57
+
58
+ P. Majdak, F. Zotter, F. Brinkmann, J. De Muynke, M. Mihocic, and M.
59
+ Noisternig, "Spatially Oriented Format for Acoustics 2.1: Introduction and
60
+ Recent Advances", *J. Audio Eng. Soc.*, vol. 70, no. 7/8, pp. 565-584,
61
+ Jul. 2022. DOI: https://doi.org/10.17743/jaes.2022.0026
@@ -0,0 +1,20 @@
1
+ # Minimal makefile for Sphinx documentation
2
+ #
3
+
4
+ # You can set these variables from the command line.
5
+ SPHINXOPTS =
6
+ SPHINXBUILD = python -msphinx
7
+ SPHINXPROJ = sofar
8
+ SOURCEDIR = .
9
+ BUILDDIR = _build
10
+
11
+ # Put it first so that "make" without argument is like "make help".
12
+ help:
13
+ @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14
+
15
+ .PHONY: help Makefile
16
+
17
+ # Catch-all target: route all unknown targets to Sphinx using the new
18
+ # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19
+ %: Makefile
20
+ @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
@@ -0,0 +1,20 @@
1
+ .. _api_reference:
2
+
3
+ API Reference
4
+ =============
5
+
6
+ This section documents sofar objects and functions. Sofar contains functions
7
+ for reading, writing and comparing SOFA files, functions to handle SOFA
8
+ conventions, and two classes to handle data from SOFA files. The
9
+ :py:class:`~sofar.Sofa` class is used to read and write entire SOFA files. To
10
+ open a SOFA file without reading the entire file into memory,
11
+ :py:class:`~sofar.SofaStream` enables partially reading data.
12
+
13
+ For examples on how to use sofar refer to the
14
+ :ref:`sofar and SOFA <gallery:/gallery/interactive/sofar_introduction.ipynb>`
15
+ notebook and the documentation below.
16
+
17
+ .. automodule:: sofar
18
+ :members:
19
+ :undoc-members:
20
+ :show-inheritance:
@@ -0,0 +1,167 @@
1
+ # Configuration file for the Sphinx documentation builder.
2
+ #
3
+ # For the full list of built-in configuration values, see the documentation:
4
+ # https://www.sphinx-doc.org/en/master/usage/configuration.html
5
+
6
+ # -- Project information -----------------------------------------------------
7
+ # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
8
+
9
+ import os
10
+ import sys
11
+ import urllib3
12
+ import shutil
13
+ sys.path.insert(0, os.path.abspath('..'))
14
+
15
+ import sofar
16
+ import resources.conventions
17
+
18
+ # -- General configuration ---------------------------------------------------
19
+ # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
20
+
21
+ extensions = [
22
+ 'sphinx.ext.autodoc',
23
+ 'sphinx.ext.viewcode',
24
+ 'sphinx.ext.napoleon',
25
+ 'sphinx.ext.autosummary',
26
+ 'sphinx.ext.imgmath',
27
+ 'sphinx.ext.mathjax',
28
+ 'sphinx.ext.intersphinx',
29
+ 'autodocsumm',
30
+ 'sphinx_design',
31
+ 'sphinx_favicon',
32
+ 'sphinx_reredirects',
33
+ 'sphinx_mdinclude',
34
+ ]
35
+
36
+ # show tocs for classes and functions of modules using the autodocsumm
37
+ # package
38
+ autodoc_default_options = {'autosummary': True}
39
+
40
+ # show the code of plots that follows the command .. plot:: based on the
41
+ # package matplotlib.sphinxext.plot_directive
42
+ plot_include_source = True
43
+
44
+ # Add any paths that contain templates here, relative to this directory.
45
+ templates_path = ['_templates']
46
+
47
+ # The suffix(es) of source filenames.
48
+ # You can specify multiple suffix as a list of string:
49
+ source_suffix = {
50
+ '.rst': 'restructuredtext',
51
+ '.md': 'markdown',
52
+ }
53
+
54
+
55
+ # The master toctree document.
56
+ master_doc = 'index'
57
+
58
+ # General information about the project.
59
+ project = 'sofar'
60
+ copyright = '2020, The pyfar developers'
61
+ author = 'The pyfar developers'
62
+
63
+ # The version info for the project you're documenting, acts as replacement
64
+ # for |version| and |release|, also used in various other places throughout
65
+ # the built documents.
66
+ #
67
+ # The short X.Y version.
68
+ version = sofar.__version__
69
+ # The full version, including alpha/beta/rc tags.
70
+ release = sofar.__version__
71
+
72
+ # This is also used if you do content translation via gettext catalogs.
73
+ # Usually you set "language" from the command line for these cases.
74
+ language = 'en'
75
+
76
+ # List of patterns, relative to source directory, that match files and
77
+ # directories to ignore when looking for source files.
78
+ # This patterns also effect to html_static_path and html_extra_path
79
+ exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
80
+
81
+ # The name of the Pygments (syntax highlighting) style to use (Not defining
82
+ # uses the default style of the html_theme).
83
+ # pygments_style = 'sphinx'
84
+
85
+ # If true, '()' will be appended to :func: etc. cross-reference text.
86
+ add_function_parentheses = False
87
+
88
+ # If true, `todo` and `todoList` produce output, else they produce nothing.
89
+ todo_include_todos = False
90
+
91
+ # default language for highlighting in source code
92
+ highlight_language = "python3"
93
+
94
+ # intersphinx mapping
95
+ intersphinx_mapping = {
96
+ 'numpy': ('https://numpy.org/doc/stable/', None),
97
+ 'gallery': ('https://pyfar-gallery.readthedocs.io/en/latest/', None),
98
+ }
99
+
100
+ # -- Options for HTML output -------------------------------------------------
101
+ # https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
102
+
103
+ html_theme = 'pydata_sphinx_theme'
104
+ html_static_path = ['_static']
105
+ html_css_files = ['css/custom.css']
106
+ html_logo = 'resources/logos/pyfar_logos_fixed_size_sofar.png'
107
+ html_title = "sofar"
108
+ html_favicon = '_static/favicon.ico'
109
+
110
+ # -- HTML theme options
111
+ # https://pydata-sphinx-theme.readthedocs.io/en/stable/user_guide/layout.html
112
+ html_sidebars = {
113
+ "sofar": []
114
+ }
115
+
116
+ html_theme_options = {
117
+ "navbar_start": ["navbar-logo"],
118
+ "navbar_end": ["navbar-icon-links", "theme-switcher"],
119
+ "navbar_align": "content",
120
+ "header_links_before_dropdown": 8,
121
+ "icon_links": [
122
+ {
123
+ "name": "GitHub",
124
+ "url": "https://github.com/pyfar",
125
+ "icon": "fa-brands fa-square-github",
126
+ "type": "fontawesome",
127
+ },
128
+ ],
129
+ # Configure secondary (right) side bar
130
+ "show_toc_level": 3, # Show all subsections of notebooks
131
+ "secondary_sidebar_items": ["page-toc"], # Omit 'show source' link that that shows notebook in json format
132
+ "navigation_with_keys": True,
133
+ # Configure navigation depth for section navigation
134
+ "navigation_depth": 1,
135
+ }
136
+
137
+ html_context = {
138
+ "default_mode": "light"
139
+ }
140
+
141
+ # redirect index to pyfar.html
142
+ redirects = {
143
+ "index": f"{project}.html"
144
+ }
145
+
146
+ # -- download navbar and style files from gallery -----------------------------
147
+ branch = 'main'
148
+ link = f'https://github.com/pyfar/gallery/raw/{branch}/docs/'
149
+ folders_in = [
150
+ '_static/css/custom.css',
151
+ '_static/favicon.ico',
152
+ '_static/header.rst',
153
+ 'resources/logos/pyfar_logos_fixed_size_sofar.png',
154
+ ]
155
+ c = urllib3.PoolManager()
156
+ for file in folders_in:
157
+ url = link + file
158
+ filename = file
159
+ os.makedirs(os.path.dirname(filename), exist_ok=True)
160
+ with c.request('GET', url, preload_content=False) as res, open(filename, 'wb') as out_file:
161
+ shutil.copyfileobj(res, out_file)
162
+
163
+ # replace sofar hard link to internal link
164
+ with open("_static/header.rst", "rt") as fin:
165
+ with open("header.rst", "wt") as fout:
166
+ for line in fin:
167
+ fout.write(line.replace(f'https://{project}.readthedocs.io', project))
@@ -0,0 +1 @@
1
+ .. include:: ../CONTRIBUTING.rst
@@ -0,0 +1 @@
1
+ .. include:: ../HISTORY.rst
@@ -0,0 +1,4 @@
1
+ sofar
2
+ =====
3
+
4
+ .. include:: header.rst
@@ -0,0 +1,36 @@
1
+ @ECHO OFF
2
+
3
+ pushd %~dp0
4
+
5
+ REM Command file for Sphinx documentation
6
+
7
+ if "%SPHINXBUILD%" == "" (
8
+ set SPHINXBUILD=python -msphinx
9
+ )
10
+ set SOURCEDIR=.
11
+ set BUILDDIR=_build
12
+ set SPHINXPROJ=sofar
13
+
14
+ if "%1" == "" goto help
15
+
16
+ %SPHINXBUILD% >NUL 2>NUL
17
+ if errorlevel 9009 (
18
+ echo.
19
+ echo.The Sphinx module was not found. Make sure you have Sphinx installed,
20
+ echo.then set the SPHINXBUILD environment variable to point to the full
21
+ echo.path of the 'sphinx-build' executable. Alternatively you may add the
22
+ echo.Sphinx directory to PATH.
23
+ echo.
24
+ echo.If you don't have Sphinx installed, grab it from
25
+ echo.http://sphinx-doc.org/
26
+ exit /b 1
27
+ )
28
+
29
+ %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
30
+ goto end
31
+
32
+ :help
33
+ %SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
34
+
35
+ :end
36
+ popd
@@ -0,0 +1 @@
1
+ .. mdinclude:: ../README.md