sofar 1.1.3__tar.gz → 1.2.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 (114) hide show
  1. sofar-1.2.0/CONTRIBUTING.rst +92 -0
  2. {sofar-1.1.3 → sofar-1.2.0}/HISTORY.rst +13 -1
  3. {sofar-1.1.3 → sofar-1.2.0}/LICENSE +4 -1
  4. {sofar-1.1.3 → sofar-1.2.0}/MANIFEST.in +7 -2
  5. {sofar-1.1.3 → sofar-1.2.0}/PKG-INFO +30 -28
  6. sofar-1.2.0/README.md +60 -0
  7. sofar-1.2.0/docs/Makefile +20 -0
  8. sofar-1.2.0/docs/api_reference.rst +20 -0
  9. sofar-1.2.0/docs/conf.py +165 -0
  10. sofar-1.2.0/docs/contributing.rst +1 -0
  11. sofar-1.2.0/docs/history.rst +1 -0
  12. sofar-1.2.0/docs/index.rst +4 -0
  13. sofar-1.2.0/docs/make.bat +36 -0
  14. sofar-1.2.0/docs/readme.rst +1 -0
  15. sofar-1.2.0/docs/resources/working_with_sofa_HRIR_lateral.png +0 -0
  16. sofar-1.2.0/docs/resources/working_with_sofa_source_horizontal.png +0 -0
  17. sofar-1.2.0/docs/resources/working_with_sofa_source_lateral.png +0 -0
  18. sofar-1.2.0/docs/sofar.rst +82 -0
  19. sofar-1.2.0/pyproject.toml +13 -0
  20. {sofar-1.1.3 → sofar-1.2.0}/setup.cfg +1 -4
  21. {sofar-1.1.3 → sofar-1.2.0}/setup.py +12 -9
  22. {sofar-1.1.3 → sofar-1.2.0}/sofar/__init__.py +4 -4
  23. {sofar-1.1.3 → sofar-1.2.0}/sofar/io.py +18 -10
  24. {sofar-1.1.3 → sofar-1.2.0}/sofar/sofa.py +53 -37
  25. sofar-1.2.0/sofar/sofa_conventions/conventions/AnnotatedEmitterAudio_0.2.csv +46 -0
  26. sofar-1.2.0/sofar/sofa_conventions/conventions/AnnotatedEmitterAudio_0.2.json +353 -0
  27. sofar-1.2.0/sofar/sofa_conventions/conventions/AnnotatedReceiverAudio_0.2.csv +46 -0
  28. sofar-1.2.0/sofar/sofa_conventions/conventions/AnnotatedReceiverAudio_0.2.json +353 -0
  29. sofar-1.2.0/sofar/sofa_conventions/conventions/deprecated/AnnotatedEmitterAudio_0.1.csv +46 -0
  30. sofar-1.2.0/sofar/sofa_conventions/conventions/deprecated/AnnotatedEmitterAudio_0.1.json +351 -0
  31. sofar-1.2.0/sofar/sofa_conventions/conventions/deprecated/AnnotatedReceiverAudio_0.1.csv +46 -0
  32. sofar-1.2.0/sofar/sofa_conventions/conventions/deprecated/AnnotatedReceiverAudio_0.1.json +351 -0
  33. sofar-1.2.0/sofar/sofa_conventions/conventions/deprecated/SingleTrackedAudio_0.1.csv +47 -0
  34. sofar-1.2.0/sofar/sofa_conventions/conventions/deprecated/SingleTrackedAudio_0.1.json +366 -0
  35. sofar-1.2.0/sofar/sofa_conventions/conventions/deprecated/SingleTrackedAudio_0.2.csv +51 -0
  36. sofar-1.2.0/sofar/sofa_conventions/conventions/deprecated/SingleTrackedAudio_0.2.json +397 -0
  37. {sofar-1.1.3 → sofar-1.2.0}/sofar/sofa_conventions/rules/deprecations.json +2 -1
  38. {sofar-1.1.3 → sofar-1.2.0}/sofar/sofa_conventions/rules/rules.json +21 -2
  39. {sofar-1.1.3 → sofar-1.2.0}/sofar/sofa_conventions/rules/upgrade.json +36 -0
  40. sofar-1.2.0/sofar/sofastream.py +296 -0
  41. {sofar-1.1.3 → sofar-1.2.0}/sofar/update_conventions.py +112 -92
  42. {sofar-1.1.3 → sofar-1.2.0}/sofar/utils.py +1 -1
  43. {sofar-1.1.3 → sofar-1.2.0}/sofar.egg-info/PKG-INFO +30 -28
  44. {sofar-1.1.3 → sofar-1.2.0}/sofar.egg-info/SOURCES.txt +29 -1
  45. sofar-1.2.0/tests/conftest.py +27 -0
  46. {sofar-1.1.3 → sofar-1.2.0}/tests/test_io.py +9 -5
  47. {sofar-1.1.3 → sofar-1.2.0}/tests/test_sofa.py +1 -1
  48. {sofar-1.1.3 → sofar-1.2.0}/tests/test_sofa_upgrade_conventions.py +10 -1
  49. {sofar-1.1.3 → sofar-1.2.0}/tests/test_sofa_verify.py +3 -3
  50. sofar-1.2.0/tests/test_sofastream.py +126 -0
  51. {sofar-1.1.3 → sofar-1.2.0}/tests/test_utils.py +18 -8
  52. sofar-1.1.3/CONTRIBUTING.rst +0 -210
  53. sofar-1.1.3/README.rst +0 -59
  54. {sofar-1.1.3 → sofar-1.2.0}/AUTHORS.rst +0 -0
  55. {sofar-1.1.3 → sofar-1.2.0}/sofar/sofa_conventions/VERSION +0 -0
  56. {sofar-1.1.3 → sofar-1.2.0}/sofar/sofa_conventions/conventions/FreeFieldDirectivityTF_1.1.csv +0 -0
  57. {sofar-1.1.3 → sofar-1.2.0}/sofar/sofa_conventions/conventions/FreeFieldDirectivityTF_1.1.json +0 -0
  58. {sofar-1.1.3 → sofar-1.2.0}/sofar/sofa_conventions/conventions/FreeFieldHRIR_1.0.csv +0 -0
  59. {sofar-1.1.3 → sofar-1.2.0}/sofar/sofa_conventions/conventions/FreeFieldHRIR_1.0.json +0 -0
  60. {sofar-1.1.3 → sofar-1.2.0}/sofar/sofa_conventions/conventions/FreeFieldHRTF_1.0.csv +0 -0
  61. {sofar-1.1.3 → sofar-1.2.0}/sofar/sofa_conventions/conventions/FreeFieldHRTF_1.0.json +0 -0
  62. {sofar-1.1.3 → sofar-1.2.0}/sofar/sofa_conventions/conventions/GeneralFIR-E_2.0.csv +0 -0
  63. {sofar-1.1.3 → sofar-1.2.0}/sofar/sofa_conventions/conventions/GeneralFIR-E_2.0.json +0 -0
  64. {sofar-1.1.3 → sofar-1.2.0}/sofar/sofa_conventions/conventions/GeneralFIR_1.0.csv +0 -0
  65. {sofar-1.1.3 → sofar-1.2.0}/sofar/sofa_conventions/conventions/GeneralFIR_1.0.json +0 -0
  66. {sofar-1.1.3 → sofar-1.2.0}/sofar/sofa_conventions/conventions/GeneralSOS_1.0.csv +0 -0
  67. {sofar-1.1.3 → sofar-1.2.0}/sofar/sofa_conventions/conventions/GeneralSOS_1.0.json +0 -0
  68. {sofar-1.1.3 → sofar-1.2.0}/sofar/sofa_conventions/conventions/GeneralTF-E_1.0.csv +0 -0
  69. {sofar-1.1.3 → sofar-1.2.0}/sofar/sofa_conventions/conventions/GeneralTF-E_1.0.json +0 -0
  70. {sofar-1.1.3 → sofar-1.2.0}/sofar/sofa_conventions/conventions/GeneralTF_1.0.csv +0 -0
  71. {sofar-1.1.3 → sofar-1.2.0}/sofar/sofa_conventions/conventions/GeneralTF_1.0.json +0 -0
  72. {sofar-1.1.3 → sofar-1.2.0}/sofar/sofa_conventions/conventions/GeneralTF_2.0.csv +0 -0
  73. {sofar-1.1.3 → sofar-1.2.0}/sofar/sofa_conventions/conventions/GeneralTF_2.0.json +0 -0
  74. {sofar-1.1.3 → sofar-1.2.0}/sofar/sofa_conventions/conventions/SimpleFreeFieldHRIR_1.0.csv +0 -0
  75. {sofar-1.1.3 → sofar-1.2.0}/sofar/sofa_conventions/conventions/SimpleFreeFieldHRIR_1.0.json +0 -0
  76. {sofar-1.1.3 → sofar-1.2.0}/sofar/sofa_conventions/conventions/SimpleFreeFieldHRSOS_1.0.csv +0 -0
  77. {sofar-1.1.3 → sofar-1.2.0}/sofar/sofa_conventions/conventions/SimpleFreeFieldHRSOS_1.0.json +0 -0
  78. {sofar-1.1.3 → sofar-1.2.0}/sofar/sofa_conventions/conventions/SimpleFreeFieldHRTF_1.0.csv +0 -0
  79. {sofar-1.1.3 → sofar-1.2.0}/sofar/sofa_conventions/conventions/SimpleFreeFieldHRTF_1.0.json +0 -0
  80. {sofar-1.1.3 → sofar-1.2.0}/sofar/sofa_conventions/conventions/SimpleFreeFieldSOS_1.0.csv +0 -0
  81. {sofar-1.1.3 → sofar-1.2.0}/sofar/sofa_conventions/conventions/SimpleFreeFieldSOS_1.0.json +0 -0
  82. {sofar-1.1.3 → sofar-1.2.0}/sofar/sofa_conventions/conventions/SimpleHeadphoneIR_1.0.csv +0 -0
  83. {sofar-1.1.3 → sofar-1.2.0}/sofar/sofa_conventions/conventions/SimpleHeadphoneIR_1.0.json +0 -0
  84. {sofar-1.1.3 → sofar-1.2.0}/sofar/sofa_conventions/conventions/SingleRoomMIMOSRIR_1.0.csv +0 -0
  85. {sofar-1.1.3 → sofar-1.2.0}/sofar/sofa_conventions/conventions/SingleRoomMIMOSRIR_1.0.json +0 -0
  86. {sofar-1.1.3 → sofar-1.2.0}/sofar/sofa_conventions/conventions/SingleRoomSRIR_1.0.csv +0 -0
  87. {sofar-1.1.3 → sofar-1.2.0}/sofar/sofa_conventions/conventions/SingleRoomSRIR_1.0.json +0 -0
  88. {sofar-1.1.3 → sofar-1.2.0}/sofar/sofa_conventions/conventions/deprecated/FreeFieldDirectivityTF_1.0.csv +0 -0
  89. {sofar-1.1.3 → sofar-1.2.0}/sofar/sofa_conventions/conventions/deprecated/FreeFieldDirectivityTF_1.0.json +0 -0
  90. {sofar-1.1.3 → sofar-1.2.0}/sofar/sofa_conventions/conventions/deprecated/GeneralFIRE_1.0.csv +0 -0
  91. {sofar-1.1.3 → sofar-1.2.0}/sofar/sofa_conventions/conventions/deprecated/GeneralFIRE_1.0.json +0 -0
  92. {sofar-1.1.3 → sofar-1.2.0}/sofar/sofa_conventions/conventions/deprecated/MultiSpeakerBRIR_0.3.csv +0 -0
  93. {sofar-1.1.3 → sofar-1.2.0}/sofar/sofa_conventions/conventions/deprecated/MultiSpeakerBRIR_0.3.json +0 -0
  94. {sofar-1.1.3 → sofar-1.2.0}/sofar/sofa_conventions/conventions/deprecated/SimpleFreeFieldHRIR_0.4.csv +0 -0
  95. {sofar-1.1.3 → sofar-1.2.0}/sofar/sofa_conventions/conventions/deprecated/SimpleFreeFieldHRIR_0.4.json +0 -0
  96. {sofar-1.1.3 → sofar-1.2.0}/sofar/sofa_conventions/conventions/deprecated/SimpleFreeFieldTF_0.4.csv +0 -0
  97. {sofar-1.1.3 → sofar-1.2.0}/sofar/sofa_conventions/conventions/deprecated/SimpleFreeFieldTF_0.4.json +0 -0
  98. {sofar-1.1.3 → sofar-1.2.0}/sofar/sofa_conventions/conventions/deprecated/SimpleFreeFieldTF_1.0.csv +0 -0
  99. {sofar-1.1.3 → sofar-1.2.0}/sofar/sofa_conventions/conventions/deprecated/SimpleFreeFieldTF_1.0.json +0 -0
  100. {sofar-1.1.3 → sofar-1.2.0}/sofar/sofa_conventions/conventions/deprecated/SimpleHeadphoneIR_0.1.csv +0 -0
  101. {sofar-1.1.3 → sofar-1.2.0}/sofar/sofa_conventions/conventions/deprecated/SimpleHeadphoneIR_0.1.json +0 -0
  102. {sofar-1.1.3 → sofar-1.2.0}/sofar/sofa_conventions/conventions/deprecated/SimpleHeadphoneIR_0.2.csv +0 -0
  103. {sofar-1.1.3 → sofar-1.2.0}/sofar/sofa_conventions/conventions/deprecated/SimpleHeadphoneIR_0.2.json +0 -0
  104. {sofar-1.1.3 → sofar-1.2.0}/sofar/sofa_conventions/conventions/deprecated/SingleRoomDRIR_0.2.csv +0 -0
  105. {sofar-1.1.3 → sofar-1.2.0}/sofar/sofa_conventions/conventions/deprecated/SingleRoomDRIR_0.2.json +0 -0
  106. {sofar-1.1.3 → sofar-1.2.0}/sofar/sofa_conventions/conventions/deprecated/SingleRoomDRIR_0.3.csv +0 -0
  107. {sofar-1.1.3 → sofar-1.2.0}/sofar/sofa_conventions/conventions/deprecated/SingleRoomDRIR_0.3.json +0 -0
  108. {sofar-1.1.3 → sofar-1.2.0}/sofar/sofa_conventions/rules/unit_aliases.json +0 -0
  109. {sofar-1.1.3 → sofar-1.2.0}/sofar.egg-info/dependency_links.txt +0 -0
  110. {sofar-1.1.3 → sofar-1.2.0}/sofar.egg-info/not-zip-safe +0 -0
  111. {sofar-1.1.3 → sofar-1.2.0}/sofar.egg-info/requires.txt +0 -0
  112. {sofar-1.1.3 → sofar-1.2.0}/sofar.egg-info/top_level.txt +0 -0
  113. {sofar-1.1.3 → sofar-1.2.0}/tests/__init__.py +0 -0
  114. {sofar-1.1.3 → sofar-1.2.0}/tests/test_deprecations.py +0 -0
@@ -0,0 +1,92 @@
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
+ $ conda install pip
54
+ $ pip install -e .
55
+ $ pip install -r requirements_dev.txt
56
+
57
+ 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`)::
58
+
59
+ $ git checkout -b name-of-your-bugfix-or-feature
60
+
61
+ Now you can make your changes locally.
62
+
63
+ 6. When you're done making changes, check that your changes pass ruff and the
64
+ tests::
65
+
66
+ $ ruff check
67
+ $ pytest
68
+
69
+ 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.
70
+
71
+ 7. Commit your changes and push your branch to GitHub::
72
+
73
+ $ git add .
74
+ $ git commit -m "Your detailed description of your changes."
75
+ $ git push origin name-of-your-bugfix-or-feature
76
+
77
+ 8. Submit a pull request on the develop branch through the GitHub website.
78
+
79
+
80
+ Submodules
81
+ ~~~~~~~~~~
82
+
83
+ To update the submodule containing the conventions and verification rules run
84
+
85
+ .. code-block:: bash
86
+
87
+ $ git submodule update --init --recursive
88
+ $ git submodule update --recursive --remote
89
+
90
+ and then commit the changes
91
+
92
+ .. _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.0 (2024-08-29)
6
+ ------------------
7
+ * Feature: Introduce `SofaStream` class for reading parts of large Sofa files without reading the entire file (PR #90, 97)
8
+ * 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)
9
+ * 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)
10
+ * Enhancement: Do not write `__Encoding` field for string variables, because it could cause issues with the Matlab SOFAtoolbox (PR #110)
11
+
12
+ 1.1.4 (2024-06-15)
13
+ ------------------
14
+ * Update for numpy 2.0 (PR #100)
15
+
4
16
  1.1.3 (2024-3-15)
5
17
  -----------------
6
18
  * Update documentation to pydata theme (PR #78)
@@ -77,4 +89,4 @@ History
77
89
 
78
90
  0.1.0 (2021-10-29)
79
91
  ------------------
80
- * First release on PyPI
92
+ * 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
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sofar
3
- Version: 1.1.3
3
+ Version: 1.2.0
4
4
  Summary: Maybe the most complete python package for SOFA files so far
5
5
  Home-page: https://pyfar.org/
6
6
  Download-URL: https://pypi.org/project/sofar/
@@ -22,6 +22,7 @@ Classifier: Programming Language :: Python :: 3.10
22
22
  Classifier: Programming Language :: Python :: 3.11
23
23
  Classifier: Programming Language :: Python :: 3.12
24
24
  Requires-Python: >=3.8
25
+ Description-Content-Type: text/markdown
25
26
  License-File: LICENSE
26
27
  License-File: AUTHORS.rst
27
28
  Requires-Dist: netCDF4
@@ -30,53 +31,54 @@ Requires-Dist: beautifulsoup4
30
31
  Requires-Dist: requests
31
32
  Requires-Dist: packaging
32
33
 
33
- ======
34
- Readme
35
- ======
34
+ <h1 align="center">
35
+ <img src="https://github.com/pyfar/gallery/raw/main/docs/resources/logos/pyfar_logos_fixed_size_sofar.png" width="300">
36
+ </h1><br>
37
+
38
+ [![PyPI version](https://badge.fury.io/py/sofar.svg)](https://badge.fury.io/py/sofar)
39
+ [![Documentation Status](https://readthedocs.org/projects/sofar/badge/?version=latest)](https://sofar.readthedocs.io/en/latest/?badge=latest)
40
+ [![CircleCI](https://circleci.com/gh/pyfar/sofar.svg?style=shield)](https://circleci.com/gh/pyfar/sofar)
36
41
 
37
42
  Sofar is maybe the most complete Python package for the SOFA file format so
38
43
  far. SOFA files store spatially distributed acoustic data such as impulse
39
44
  responses or transfer functions. They are defined by the AES69-2022 standard
40
45
  (see references). These are the key features of sofar
41
46
 
42
- * Uses a complete definition of the AES69-2022 standard (see references) maintained at `sofa_conventions`_
43
- * Read, edit, and write SOFA files
44
- * Add custom attributes to SOFA files
45
- * Full Verification of the content of a SOFA files against AES69-2022
46
- * Upgrade data that uses outdated SOFA conventions
47
- * Open license allows unrestricted use
48
- * sofar is tested using continuous integration on
47
+ - Read, edit, and write SOFA files
48
+ - Add custom attributes to SOFA files
49
+ - Full Verification of the content of a SOFA files against AES69-2022
50
+ - Upgrade data that uses outdated SOFA conventions
51
+ - Open license allows unrestricted use
52
+ - sofar is tested using continuous integration on
53
+ - Uses a complete definition of the AES69-2022 standard (see references) maintained at [sofa_conventions](https://github.com/pyfar/sofa_conventions)
54
+
55
+ Getting Started
56
+ ===============
57
+
58
+ The [sofar and SOFA notebook](https://pyfar-gallery.readthedocs.io/en/latest/gallery/interactive/sofar_introduction.html)
59
+ gives an overview of the most important sofar functionality and is a good starting point. For processing and visualizing data
60
+ inside SOFA files, we recommend the [pyfar package](https://pyfar.readthedocs.io) that can read SOFA files through
61
+ `pyfar.io.read_sofa` and the in-depth examples contained in the
62
+ [pyfar example gallery](https://pyfar-gallery.readthedocs.io/en/latest/examples_gallery.html). Check out
63
+ [read the docs](https://sofar.readthedocs.io) for a complete documentation of sofar. A more detailed introduction to the SOFA
64
+ file format is given by Majdak et. al. 2022 (see references below). All information is also bundled at [pyfar.org](https://pyfar.org).
49
65
 
50
66
  Installation
51
67
  ============
52
68
 
53
69
  Use pip to install sofar
54
70
 
55
- .. code-block:: console
71
+ pip install sofar
56
72
 
57
- $ pip install sofar
58
73
 
59
74
  (Requires Python >= 3.8)
60
75
 
61
- Getting Started
62
- ===============
63
-
64
- Check out `read the docs`_ for example use cases a quick introduction to SOFA
65
- and sofar, and the complete documentation. A more detailed introduction to SOFA
66
- is given by Majdak et. al. 2022 (see references below) Packages related to
67
- sofar are listed at `pyfar.org`_. For more information on the SOFA file format
68
- visit `sofaconventions.org`_.
76
+ If the installation fails, please check out the [help section](https://pyfar-gallery.readthedocs.io/en/latest/help).
69
77
 
70
78
  Contributing
71
79
  ============
72
80
 
73
- Refer to the `contribution guidelines`_ for more information.
74
-
75
- .. _sofa_conventions : https://github.com/pyfar/sofa_conventions
76
- .. _contribution guidelines: https://github.com/pyfar/sofar/blob/develop/CONTRIBUTING.rst
77
- .. _pyfar.org: https://pyfar.org
78
- .. _read the docs: https://sofar.readthedocs.io/en/latest
79
- .. _sofaconventions.org: https://sofaconventions.org
81
+ Refer to the [contribution guidelines](https://sofar.readthedocs.io/en/stable/contributing.html) for more information.
80
82
 
81
83
  References
82
84
  ==========
sofar-1.2.0/README.md ADDED
@@ -0,0 +1,60 @@
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
+
9
+ Sofar is maybe the most complete Python package for the SOFA file format so
10
+ far. SOFA files store spatially distributed acoustic data such as impulse
11
+ responses or transfer functions. They are defined by the AES69-2022 standard
12
+ (see references). These are the key features of sofar
13
+
14
+ - Read, edit, and write SOFA files
15
+ - Add custom attributes to SOFA files
16
+ - Full Verification of the content of a SOFA files against AES69-2022
17
+ - Upgrade data that uses outdated SOFA conventions
18
+ - Open license allows unrestricted use
19
+ - sofar is tested using continuous integration on
20
+ - Uses a complete definition of the AES69-2022 standard (see references) maintained at [sofa_conventions](https://github.com/pyfar/sofa_conventions)
21
+
22
+ Getting Started
23
+ ===============
24
+
25
+ The [sofar and SOFA notebook](https://pyfar-gallery.readthedocs.io/en/latest/gallery/interactive/sofar_introduction.html)
26
+ gives an overview of the most important sofar functionality and is a good starting point. For processing and visualizing data
27
+ inside SOFA files, we recommend the [pyfar package](https://pyfar.readthedocs.io) that can read SOFA files through
28
+ `pyfar.io.read_sofa` and the in-depth examples contained in the
29
+ [pyfar example gallery](https://pyfar-gallery.readthedocs.io/en/latest/examples_gallery.html). Check out
30
+ [read the docs](https://sofar.readthedocs.io) for a complete documentation of sofar. A more detailed introduction to the SOFA
31
+ file format is given by Majdak et. al. 2022 (see references below). All information is also bundled at [pyfar.org](https://pyfar.org).
32
+
33
+ Installation
34
+ ============
35
+
36
+ Use pip to install sofar
37
+
38
+ pip install sofar
39
+
40
+
41
+ (Requires Python >= 3.8)
42
+
43
+ If the installation fails, please check out the [help section](https://pyfar-gallery.readthedocs.io/en/latest/help).
44
+
45
+ Contributing
46
+ ============
47
+
48
+ Refer to the [contribution guidelines](https://sofar.readthedocs.io/en/stable/contributing.html) for more information.
49
+
50
+ References
51
+ ==========
52
+
53
+ AES69-2022: *AES standard for file exchange - Spatial acoustic data file
54
+ format*, Audio Engineering Society, Inc., New York, NY, USA.
55
+ (https://www.aes.org/publications/standards/search.cfm?docID=99)
56
+
57
+ P. Majdak, F. Zotter, F. Brinkmann, J. De Muynke, M. Mihocic, and M.
58
+ Noisternig, "Spatially Oriented Format for Acoustics 2.1: Introduction and
59
+ Recent Advances", *J. Audio Eng. Soc.*, vol. 70, no. 7/8, pp. 565-584,
60
+ 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,165 @@
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 # noqa
16
+ import resources.conventions # noqa: build conventions for documentation
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
+ }
134
+
135
+ html_context = {
136
+ "default_mode": "light"
137
+ }
138
+
139
+ # redirect index to pyfar.html
140
+ redirects = {
141
+ "index": f"{project}.html"
142
+ }
143
+
144
+ # -- download navbar and style files from gallery -----------------------------
145
+ branch = 'main'
146
+ link = f'https://github.com/pyfar/gallery/raw/{branch}/docs/'
147
+ folders_in = [
148
+ '_static/css/custom.css',
149
+ '_static/favicon.ico',
150
+ '_static/header.rst',
151
+ 'resources/logos/pyfar_logos_fixed_size_sofar.png',
152
+ ]
153
+ c = urllib3.PoolManager()
154
+ for file in folders_in:
155
+ url = link + file
156
+ filename = file
157
+ os.makedirs(os.path.dirname(filename), exist_ok=True)
158
+ with c.request('GET', url, preload_content=False) as res, open(filename, 'wb') as out_file:
159
+ shutil.copyfileobj(res, out_file)
160
+
161
+ # replace sofar hard link to internal link
162
+ with open("_static/header.rst", "rt") as fin:
163
+ with open("header.rst", "wt") as fout:
164
+ for line in fin:
165
+ 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
@@ -0,0 +1,82 @@
1
+ sofar
2
+ =====
3
+
4
+ .. toctree::
5
+ :maxdepth: 2
6
+ :hidden:
7
+
8
+ readme
9
+ api_reference
10
+ resources/conventions
11
+ contributing
12
+ history
13
+
14
+
15
+ Python package for handling SOFA files.
16
+
17
+ SOFA files store spatially distributed acoustic data such as head-related
18
+ transfer functions. Sofar can read, create, write, manipulate, and verify SOFA
19
+ files.
20
+
21
+ .. grid:: 1 2 2 3
22
+ :gutter: 4
23
+
24
+ .. grid-item-card::
25
+ :link: readme.html
26
+ :text-align: center
27
+
28
+ **Getting Started**
29
+ ^^^^
30
+
31
+ .. raw:: html
32
+
33
+ <i class="fa-solid fa-rocket icon-style"></i>
34
+
35
+
36
+ .. grid-item-card::
37
+ :link: api_reference
38
+ :link-type: ref
39
+ :text-align: center
40
+
41
+ **API Reference**
42
+ ^^^^
43
+
44
+ .. raw:: html
45
+
46
+ <i class="fa-solid fa-file-lines icon-style"></i>
47
+
48
+ .. grid-item-card::
49
+ :link: conventions_introduction
50
+ :link-type: ref
51
+ :text-align: center
52
+
53
+ **SOFA Conventions**
54
+ ^^^^
55
+
56
+ .. raw:: html
57
+
58
+ <i class="fa-solid fa-book-open icon-style"></i>
59
+
60
+
61
+ .. grid-item-card::
62
+ :link: contributing.html
63
+ :text-align: center
64
+
65
+ **Contributing**
66
+ ^^^^
67
+
68
+ .. raw:: html
69
+
70
+ <i class="fa-solid fa-pen icon-style"></i>
71
+
72
+ .. grid-item-card::
73
+ :link: history.html
74
+ :text-align: center
75
+
76
+ **History**
77
+ ^^^^
78
+
79
+ .. raw:: html
80
+
81
+ <i class="fa-solid fa-clock-rotate-left icon-style">
82
+ </i>
@@ -0,0 +1,13 @@
1
+ [tool.ruff]
2
+ exclude = [
3
+ ".git",
4
+ "docs",
5
+ "setup.py",
6
+ ]
7
+ line-length = 79
8
+ lint.ignore = []
9
+ lint.select = [
10
+ "E",
11
+ "F",
12
+ "W",
13
+ ]