acoular 25.7__tar.gz → 25.10__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 (57) hide show
  1. {acoular-25.7 → acoular-25.10}/PKG-INFO +6 -2
  2. {acoular-25.7 → acoular-25.10}/README.md +1 -1
  3. {acoular-25.7 → acoular-25.10}/acoular/aiaa/aiaa.py +7 -9
  4. {acoular-25.7 → acoular-25.10}/acoular/base.py +6 -9
  5. {acoular-25.7 → acoular-25.10}/acoular/calib.py +19 -18
  6. {acoular-25.7 → acoular-25.10}/acoular/configuration.py +2 -2
  7. {acoular-25.7 → acoular-25.10}/acoular/environments.py +102 -113
  8. {acoular-25.7 → acoular-25.10}/acoular/fbeamform.py +296 -301
  9. {acoular-25.7 → acoular-25.10}/acoular/fprocess.py +7 -4
  10. {acoular-25.7 → acoular-25.10}/acoular/grids.py +98 -111
  11. {acoular-25.7 → acoular-25.10}/acoular/h5cache.py +5 -1
  12. {acoular-25.7 → acoular-25.10}/acoular/h5files.py +96 -9
  13. {acoular-25.7 → acoular-25.10}/acoular/microphones.py +22 -27
  14. {acoular-25.7 → acoular-25.10}/acoular/process.py +7 -11
  15. {acoular-25.7 → acoular-25.10}/acoular/sdinput.py +0 -5
  16. {acoular-25.7 → acoular-25.10}/acoular/signals.py +29 -27
  17. {acoular-25.7 → acoular-25.10}/acoular/sources.py +189 -322
  18. {acoular-25.7 → acoular-25.10}/acoular/spectra.py +33 -44
  19. {acoular-25.7 → acoular-25.10}/acoular/tbeamform.py +217 -199
  20. {acoular-25.7 → acoular-25.10}/acoular/tools/helpers.py +25 -33
  21. {acoular-25.7 → acoular-25.10}/acoular/tools/metrics.py +5 -10
  22. {acoular-25.7 → acoular-25.10}/acoular/tprocess.py +173 -209
  23. {acoular-25.7 → acoular-25.10}/acoular/trajectory.py +5 -5
  24. {acoular-25.7 → acoular-25.10}/acoular/version.py +2 -2
  25. {acoular-25.7 → acoular-25.10}/pyproject.toml +6 -4
  26. {acoular-25.7 → acoular-25.10}/.gitignore +0 -0
  27. {acoular-25.7 → acoular-25.10}/AUTHORS.rst +0 -0
  28. {acoular-25.7 → acoular-25.10}/LICENSE +0 -0
  29. {acoular-25.7 → acoular-25.10}/acoular/__init__.py +0 -0
  30. {acoular-25.7 → acoular-25.10}/acoular/aiaa/__init__.py +0 -0
  31. {acoular-25.7 → acoular-25.10}/acoular/demo/__init__.py +0 -0
  32. {acoular-25.7 → acoular-25.10}/acoular/demo/acoular_demo.py +0 -0
  33. {acoular-25.7 → acoular-25.10}/acoular/deprecation.py +0 -0
  34. {acoular-25.7 → acoular-25.10}/acoular/fastFuncs.py +0 -0
  35. {acoular-25.7 → acoular-25.10}/acoular/internal.py +0 -0
  36. {acoular-25.7 → acoular-25.10}/acoular/tfastfuncs.py +0 -0
  37. {acoular-25.7 → acoular-25.10}/acoular/tools/__init__.py +0 -0
  38. {acoular-25.7 → acoular-25.10}/acoular/tools/utils.py +0 -0
  39. {acoular-25.7 → acoular-25.10}/acoular/traitsviews.py +0 -0
  40. {acoular-25.7 → acoular-25.10}/acoular/xml/HW90D240_f10.xml +0 -0
  41. {acoular-25.7 → acoular-25.10}/acoular/xml/W90_D105_f10.xml +0 -0
  42. {acoular-25.7 → acoular-25.10}/acoular/xml/acousticam_2c.xml +0 -0
  43. {acoular-25.7 → acoular-25.10}/acoular/xml/acousticam_4c.xml +0 -0
  44. {acoular-25.7 → acoular-25.10}/acoular/xml/array38.xml +0 -0
  45. {acoular-25.7 → acoular-25.10}/acoular/xml/array92x.xml +0 -0
  46. {acoular-25.7 → acoular-25.10}/acoular/xml/array_56.xml +0 -0
  47. {acoular-25.7 → acoular-25.10}/acoular/xml/array_56_10_9.xml +0 -0
  48. {acoular-25.7 → acoular-25.10}/acoular/xml/array_56_bomb.xml +0 -0
  49. {acoular-25.7 → acoular-25.10}/acoular/xml/array_56_v2.xml +0 -0
  50. {acoular-25.7 → acoular-25.10}/acoular/xml/array_64.xml +0 -0
  51. {acoular-25.7 → acoular-25.10}/acoular/xml/array_84_10_9.xml +0 -0
  52. {acoular-25.7 → acoular-25.10}/acoular/xml/array_84_bomb_v3.xml +0 -0
  53. {acoular-25.7 → acoular-25.10}/acoular/xml/calib_vw_ring32.xml +0 -0
  54. {acoular-25.7 → acoular-25.10}/acoular/xml/gfai_ring32.xml +0 -0
  55. {acoular-25.7 → acoular-25.10}/acoular/xml/minidsp_uma-16.xml +0 -0
  56. {acoular-25.7 → acoular-25.10}/acoular/xml/minidsp_uma-16_mirrored.xml +0 -0
  57. {acoular-25.7 → acoular-25.10}/acoular/xml/tub_vogel64.xml +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: acoular
3
- Version: 25.7
3
+ Version: 25.10
4
4
  Summary: Python library for acoustic beamforming
5
5
  Project-URL: homepage, https://acoular.org
6
6
  Project-URL: documentation, https://acoular.org
@@ -62,6 +62,7 @@ Requires-Dist: ipython; extra == 'dev'
62
62
  Requires-Dist: matplotlib; extra == 'dev'
63
63
  Requires-Dist: numpydoc; extra == 'dev'
64
64
  Requires-Dist: pickleshare; extra == 'dev'
65
+ Requires-Dist: pydata-sphinx-theme; extra == 'dev'
65
66
  Requires-Dist: pylops; extra == 'dev'
66
67
  Requires-Dist: pytest; extra == 'dev'
67
68
  Requires-Dist: pytest-cases; extra == 'dev'
@@ -75,6 +76,7 @@ Requires-Dist: ruff==0.8.1; extra == 'dev'
75
76
  Requires-Dist: setuptools; extra == 'dev'
76
77
  Requires-Dist: sounddevice; extra == 'dev'
77
78
  Requires-Dist: sphinx; extra == 'dev'
79
+ Requires-Dist: sphinx-copybutton; extra == 'dev'
78
80
  Requires-Dist: sphinx-gallery; extra == 'dev'
79
81
  Requires-Dist: sphinxcontrib-bibtex; extra == 'dev'
80
82
  Requires-Dist: traitsui; extra == 'dev'
@@ -84,9 +86,11 @@ Requires-Dist: ipython; extra == 'docs'
84
86
  Requires-Dist: matplotlib; extra == 'docs'
85
87
  Requires-Dist: numpydoc; extra == 'docs'
86
88
  Requires-Dist: pickleshare; extra == 'docs'
89
+ Requires-Dist: pydata-sphinx-theme; extra == 'docs'
87
90
  Requires-Dist: setuptools; extra == 'docs'
88
91
  Requires-Dist: sounddevice; extra == 'docs'
89
92
  Requires-Dist: sphinx; extra == 'docs'
93
+ Requires-Dist: sphinx-copybutton; extra == 'docs'
90
94
  Requires-Dist: sphinx-gallery; extra == 'docs'
91
95
  Requires-Dist: sphinxcontrib-bibtex; extra == 'docs'
92
96
  Provides-Extra: full
@@ -238,6 +242,6 @@ plt.savefig('three_sources.png', dpi=300, bbox_inches='tight')
238
242
  plt.show()
239
243
  ```
240
244
 
241
- ![result](https://github.com/acoular/acoular/blob/master/docs/source/get_started/three_source_py3_colormap.png?raw=true)
245
+ ![result](https://github.com/acoular/acoular/blob/master/docs/source/user_guide/three_source_py3_colormap.png?raw=true)
242
246
 
243
247
 
@@ -128,6 +128,6 @@ plt.savefig('three_sources.png', dpi=300, bbox_inches='tight')
128
128
  plt.show()
129
129
  ```
130
130
 
131
- ![result](https://github.com/acoular/acoular/blob/master/docs/source/get_started/three_source_py3_colormap.png?raw=true)
131
+ ![result](https://github.com/acoular/acoular/blob/master/docs/source/user_guide/three_source_py3_colormap.png?raw=true)
132
132
 
133
133
 
@@ -27,18 +27,17 @@ Examples
27
27
 
28
28
  import contextlib
29
29
 
30
- from numpy import array
30
+ import numpy as np
31
31
  from traits.api import (
32
32
  File,
33
33
  Instance,
34
34
  Property,
35
35
  Union,
36
36
  cached_property,
37
- on_trait_change,
37
+ observe,
38
38
  property_depends_on,
39
39
  )
40
40
 
41
- from acoular.deprecation import deprecated_alias
42
41
  from acoular.h5files import H5FileBase, _get_h5file_class
43
42
  from acoular.internal import digest
44
43
  from acoular.microphones import MicGeom
@@ -85,7 +84,6 @@ class TriggerAIAABenchmark(TimeSamplesAIAABenchmark):
85
84
  (self.num_samples, self.num_channels) = self.data.shape
86
85
 
87
86
 
88
- @deprecated_alias({'name': 'file'}, removal_version='25.10')
89
87
  class CsmAIAABenchmark(PowerSpectraImport):
90
88
  """Class to load the CSM that is stored in AIAA Benchmark HDF5 file."""
91
89
 
@@ -115,8 +113,8 @@ class CsmAIAABenchmark(PowerSpectraImport):
115
113
  def _get_basename(self):
116
114
  return get_file_basename(self.file)
117
115
 
118
- @on_trait_change('basename')
119
- def load_data(self):
116
+ @observe('basename')
117
+ def _load_data(self, event): # noqa ARG002
120
118
  """Open the .h5 file and set attributes."""
121
119
  if self.h5f is not None:
122
120
  with contextlib.suppress(OSError):
@@ -156,7 +154,7 @@ class CsmAIAABenchmark(PowerSpectraImport):
156
154
  ndarray
157
155
  Array of length *block_size/2+1* containing the sample frequencies.
158
156
  """
159
- return array(self.h5f.get_data_by_reference('/CsmData/binCenterFrequenciesHz')[:].flatten(), dtype=float)
157
+ return np.array(self.h5f.get_data_by_reference('/CsmData/binCenterFrequenciesHz')[:].flatten(), dtype=float)
160
158
 
161
159
 
162
160
  class MicAIAABenchmark(MicGeom):
@@ -172,8 +170,8 @@ class MicAIAABenchmark(MicGeom):
172
170
  None, File(filter=['*.h5'], exists=True), desc='name of the h5 file containing the microphone geometry'
173
171
  )
174
172
 
175
- @on_trait_change('file')
176
- def _import_mpos(self):
173
+ @observe('file')
174
+ def _import_mpos(self, event): # noqa ARG002
177
175
  """
178
176
  Import the microphone positions from .h5 file.
179
177
 
@@ -7,6 +7,12 @@ The classes in this module are abstract base classes that provide a common inter
7
7
  that generate an output via the generator :meth:`result` in block-wise manner. They are not intended
8
8
  to be used directly, but to be subclassed by classes that implement the actual signal processing.
9
9
 
10
+ .. inheritance-diagram::
11
+ acoular.base
12
+ :top-classes:
13
+ acoular.base.Generator
14
+ :parts: 1
15
+
10
16
  .. autosummary::
11
17
  :toctree: generated/
12
18
 
@@ -32,11 +38,9 @@ from traits.api import (
32
38
  )
33
39
 
34
40
  # acoular imports
35
- from .deprecation import deprecated_alias
36
41
  from .internal import digest
37
42
 
38
43
 
39
- @deprecated_alias({'numchannels': 'num_channels', 'numsamples': 'num_samples'}, removal_version='25.10')
40
44
  class Generator(ABCHasStrictTraits):
41
45
  """Interface for any generating signal processing block.
42
46
 
@@ -156,7 +160,6 @@ class SpectraGenerator(Generator):
156
160
  """
157
161
 
158
162
 
159
- @deprecated_alias({'numchannels': 'num_channels', 'numsamples': 'num_samples'}, read_only=True, removal_version='25.10')
160
163
  class TimeOut(SamplesGenerator):
161
164
  """
162
165
  Abstract base class receiving from a :attr:`source` and returning time domain signals.
@@ -204,11 +207,6 @@ class TimeOut(SamplesGenerator):
204
207
  """
205
208
 
206
209
 
207
- @deprecated_alias(
208
- {'numchannels': 'num_channels', 'numsamples': 'num_samples', 'numfreqs': 'num_freqs'},
209
- read_only=True,
210
- removal_version='25.10',
211
- )
212
210
  class SpectraOut(SpectraGenerator):
213
211
  """
214
212
  Abstract base class receiving from a :attr:`source` and returning frequency domain signals.
@@ -263,7 +261,6 @@ class SpectraOut(SpectraGenerator):
263
261
  """
264
262
 
265
263
 
266
- @deprecated_alias({'numchannels': 'num_channels', 'numsamples': 'num_samples'}, read_only=True, removal_version='25.10')
267
264
  class InOut(SamplesGenerator, SpectraGenerator):
268
265
  """
269
266
  Abstract base class receiving from a :attr:`source` and returning signals in the same domain.
@@ -3,6 +3,12 @@
3
3
  # ------------------------------------------------------------------------------
4
4
  """Implements calibration of multichannel time signals.
5
5
 
6
+ .. inheritance-diagram::
7
+ acoular.calib
8
+ :top-classes:
9
+ acoular.base.InOut
10
+ :parts: 1
11
+
6
12
  .. autosummary::
7
13
  :toctree: generated/
8
14
 
@@ -12,19 +18,14 @@
12
18
  # imports from other packages
13
19
  import xml.dom.minidom
14
20
 
15
- from numpy import array, newaxis
16
- from traits.api import CArray, CInt, File, List, Property, Union, cached_property, on_trait_change
17
-
18
- import acoular as ac
19
-
20
- from .base import InOut
21
+ import numpy as np
22
+ from traits.api import CArray, CInt, File, List, Property, Union, cached_property, observe
21
23
 
22
24
  # acoular imports
23
- from .deprecation import deprecated_alias
25
+ from .base import InOut, SamplesGenerator, SpectraGenerator
24
26
  from .internal import digest
25
27
 
26
28
 
27
- @deprecated_alias({'from_file': 'file'}, removal_version='25.10')
28
29
  class Calib(InOut):
29
30
  """Processing block for handling calibration data in `*.xml` or NumPy format.
30
31
 
@@ -99,8 +100,8 @@ class Calib(InOut):
99
100
  # Internal identifier
100
101
  digest = Property(depends_on=['source.digest', 'data'])
101
102
 
102
- @on_trait_change('data')
103
- def set_num_mics(self):
103
+ @observe('data')
104
+ def _update_num_mics(self, event): # noqa ARG002
104
105
  """Sets the number of microphones based on the shape of the data array."""
105
106
  self.num_mics = self.data.shape[0]
106
107
 
@@ -109,14 +110,14 @@ class Calib(InOut):
109
110
  if len(self.invalid_channels) == 0:
110
111
  return slice(0, None, None)
111
112
  allr = [i for i in range(self.num_mics) if i not in self.invalid_channels]
112
- return array(allr)
113
+ return np.array(allr)
113
114
 
114
115
  @cached_property
115
116
  def _get_digest(self):
116
117
  return digest(self)
117
118
 
118
- @on_trait_change('file')
119
- def import_data(self):
119
+ @observe('file')
120
+ def _import_data(self, event): # noqa ARG002
120
121
  """Loads the calibration data from `*.xml` file ."""
121
122
  doc = xml.dom.minidom.parse(self.file)
122
123
  names = []
@@ -124,7 +125,7 @@ class Calib(InOut):
124
125
  for element in doc.getElementsByTagName('pos'):
125
126
  names.append(element.getAttribute('Name'))
126
127
  data.append(float(element.getAttribute('factor')))
127
- self.data = array(data, 'd')
128
+ self.data = np.array(data, 'd')
128
129
  self.num_mics = self.data.shape[0]
129
130
 
130
131
  def __validate_data(self):
@@ -136,13 +137,13 @@ class Calib(InOut):
136
137
  msg = 'No source data available.'
137
138
  raise ValueError(msg)
138
139
  tobj = self.source
139
- while isinstance(tobj, ac.InOut):
140
+ while isinstance(tobj, InOut):
140
141
  tobj = tobj.source
141
- if isinstance(tobj, ac.SamplesGenerator) and (self.data[self.channels].shape[0] != tobj.num_channels):
142
+ if isinstance(tobj, SamplesGenerator) and (self.data[self.channels].shape[0] != tobj.num_channels):
142
143
  msg = f'calibration data shape {self.data[self.channels].shape[0]} does not match \
143
144
  source data shape {tobj.num_channels}'
144
145
  raise ValueError(msg)
145
- if isinstance(tobj, ac.SpectraGenerator) and (
146
+ if isinstance(tobj, SpectraGenerator) and (
146
147
  self.data[self.channels].shape[0] != tobj.num_channels * tobj.num_freqs
147
148
  ):
148
149
  msg = f'calibration data shape {self.data[self.channels].shape[0]} does not match \
@@ -170,4 +171,4 @@ class Calib(InOut):
170
171
  """
171
172
  self.__validate_data()
172
173
  for block in self.source.result(num):
173
- yield block * self.data[self.channels][newaxis]
174
+ yield block * self.data[self.channels][np.newaxis]
@@ -39,9 +39,9 @@ if 'numpy' in sys.modules:
39
39
  # check if it uses OpenBLAS or another library
40
40
  if 'openblas' in temp_stdout.getvalue().lower() and environ.get('OPENBLAS_NUM_THREADS') != '1':
41
41
  # it's OpenBLAS, set numba threads=1 to avoid overcommittment
42
- import numba
42
+ import numba as nb
43
43
 
44
- numba.set_num_threads(1)
44
+ nb.set_num_threads(1)
45
45
  warn(
46
46
  'We detected that Numpy is already loaded and uses OpenBLAS. Because '
47
47
  'this conflicts with Numba parallel execution, we disable parallel '