acoular 25.3__tar.gz → 25.4__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.3 → acoular-25.4}/PKG-INFO +1 -1
  2. {acoular-25.3 → acoular-25.4}/acoular/aiaa/aiaa.py +6 -3
  3. {acoular-25.3 → acoular-25.4}/acoular/calib.py +2 -2
  4. {acoular-25.3 → acoular-25.4}/acoular/deprecation.py +4 -1
  5. {acoular-25.3 → acoular-25.4}/acoular/environments.py +1 -1
  6. {acoular-25.3 → acoular-25.4}/acoular/fbeamform.py +5 -3
  7. {acoular-25.3 → acoular-25.4}/acoular/grids.py +1 -1
  8. {acoular-25.3 → acoular-25.4}/acoular/microphones.py +2 -1
  9. {acoular-25.3 → acoular-25.4}/acoular/sources.py +1 -1
  10. {acoular-25.3 → acoular-25.4}/acoular/spectra.py +14 -15
  11. {acoular-25.3 → acoular-25.4}/acoular/tools/utils.py +1 -2
  12. {acoular-25.3 → acoular-25.4}/acoular/tprocess.py +1 -1
  13. {acoular-25.3 → acoular-25.4}/acoular/version.py +2 -2
  14. {acoular-25.3 → acoular-25.4}/.gitignore +0 -0
  15. {acoular-25.3 → acoular-25.4}/AUTHORS.rst +0 -0
  16. {acoular-25.3 → acoular-25.4}/LICENSE +0 -0
  17. {acoular-25.3 → acoular-25.4}/README.md +0 -0
  18. {acoular-25.3 → acoular-25.4}/acoular/__init__.py +0 -0
  19. {acoular-25.3 → acoular-25.4}/acoular/aiaa/__init__.py +0 -0
  20. {acoular-25.3 → acoular-25.4}/acoular/base.py +0 -0
  21. {acoular-25.3 → acoular-25.4}/acoular/configuration.py +0 -0
  22. {acoular-25.3 → acoular-25.4}/acoular/demo/__init__.py +0 -0
  23. {acoular-25.3 → acoular-25.4}/acoular/demo/acoular_demo.py +0 -0
  24. {acoular-25.3 → acoular-25.4}/acoular/fastFuncs.py +0 -0
  25. {acoular-25.3 → acoular-25.4}/acoular/fprocess.py +0 -0
  26. {acoular-25.3 → acoular-25.4}/acoular/h5cache.py +0 -0
  27. {acoular-25.3 → acoular-25.4}/acoular/h5files.py +0 -0
  28. {acoular-25.3 → acoular-25.4}/acoular/internal.py +0 -0
  29. {acoular-25.3 → acoular-25.4}/acoular/process.py +0 -0
  30. {acoular-25.3 → acoular-25.4}/acoular/sdinput.py +0 -0
  31. {acoular-25.3 → acoular-25.4}/acoular/signals.py +0 -0
  32. {acoular-25.3 → acoular-25.4}/acoular/tbeamform.py +0 -0
  33. {acoular-25.3 → acoular-25.4}/acoular/tfastfuncs.py +0 -0
  34. {acoular-25.3 → acoular-25.4}/acoular/tools/__init__.py +0 -0
  35. {acoular-25.3 → acoular-25.4}/acoular/tools/helpers.py +0 -0
  36. {acoular-25.3 → acoular-25.4}/acoular/tools/metrics.py +0 -0
  37. {acoular-25.3 → acoular-25.4}/acoular/traitsviews.py +0 -0
  38. {acoular-25.3 → acoular-25.4}/acoular/trajectory.py +0 -0
  39. {acoular-25.3 → acoular-25.4}/acoular/xml/HW90D240_f10.xml +0 -0
  40. {acoular-25.3 → acoular-25.4}/acoular/xml/W90_D105_f10.xml +0 -0
  41. {acoular-25.3 → acoular-25.4}/acoular/xml/acousticam_2c.xml +0 -0
  42. {acoular-25.3 → acoular-25.4}/acoular/xml/acousticam_4c.xml +0 -0
  43. {acoular-25.3 → acoular-25.4}/acoular/xml/array38.xml +0 -0
  44. {acoular-25.3 → acoular-25.4}/acoular/xml/array92x.xml +0 -0
  45. {acoular-25.3 → acoular-25.4}/acoular/xml/array_56.xml +0 -0
  46. {acoular-25.3 → acoular-25.4}/acoular/xml/array_56_10_9.xml +0 -0
  47. {acoular-25.3 → acoular-25.4}/acoular/xml/array_56_bomb.xml +0 -0
  48. {acoular-25.3 → acoular-25.4}/acoular/xml/array_56_v2.xml +0 -0
  49. {acoular-25.3 → acoular-25.4}/acoular/xml/array_64.xml +0 -0
  50. {acoular-25.3 → acoular-25.4}/acoular/xml/array_84_10_9.xml +0 -0
  51. {acoular-25.3 → acoular-25.4}/acoular/xml/array_84_bomb_v3.xml +0 -0
  52. {acoular-25.3 → acoular-25.4}/acoular/xml/calib_vw_ring32.xml +0 -0
  53. {acoular-25.3 → acoular-25.4}/acoular/xml/gfai_ring32.xml +0 -0
  54. {acoular-25.3 → acoular-25.4}/acoular/xml/minidsp_uma-16.xml +0 -0
  55. {acoular-25.3 → acoular-25.4}/acoular/xml/minidsp_uma-16_mirrored.xml +0 -0
  56. {acoular-25.3 → acoular-25.4}/acoular/xml/tub_vogel64.xml +0 -0
  57. {acoular-25.3 → acoular-25.4}/pyproject.toml +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: acoular
3
- Version: 25.3
3
+ Version: 25.4
4
4
  Summary: Python library for acoustic beamforming
5
5
  Project-URL: homepage, https://acoular.org
6
6
  Project-URL: documentation, https://acoular.org
@@ -32,6 +32,7 @@ from traits.api import (
32
32
  File,
33
33
  Instance,
34
34
  Property,
35
+ Union,
35
36
  cached_property,
36
37
  on_trait_change,
37
38
  property_depends_on,
@@ -89,7 +90,7 @@ class CsmAIAABenchmark(PowerSpectraImport):
89
90
  """Class to load the CSM that is stored in AIAA Benchmark HDF5 file."""
90
91
 
91
92
  #: Full name of the .h5 file with data
92
- file = File(filter=['*.h5'], exists=True, desc='name of data file')
93
+ file = Union(None, File(filter=['*.h5'], exists=True), desc='name of data file')
93
94
 
94
95
  #: Basename of the .h5 file with data, is set automatically.
95
96
  basename = Property(
@@ -167,10 +168,12 @@ class MicAIAABenchmark(MicGeom):
167
168
  """
168
169
 
169
170
  #: Name of the .h5-file from which to read the data.
170
- file = File(filter=['*.h5'], exists=True, desc='name of the h5 file containing the microphone geometry')
171
+ file = Union(
172
+ 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')
173
- def import_mpos(self):
176
+ def _import_mpos(self):
174
177
  """Import the microphone positions from .h5 file.
175
178
  Called when :attr:`basename` changes.
176
179
  """
@@ -13,7 +13,7 @@
13
13
  import xml.dom.minidom
14
14
 
15
15
  from numpy import array, newaxis
16
- from traits.api import CArray, CInt, File, List, Property, cached_property, on_trait_change
16
+ from traits.api import CArray, CInt, File, List, Property, Union, cached_property, on_trait_change
17
17
 
18
18
  import acoular as ac
19
19
 
@@ -78,7 +78,7 @@ class Calib(InOut):
78
78
  """
79
79
 
80
80
  #: Name of the .xml file to be imported.
81
- file = File(filter=['*.xml'], exists=True, desc='name of the xml file to import')
81
+ file = Union(None, File(filter=['*.xml'], exists=True), desc='name of the xml file to import')
82
82
 
83
83
  #: Number of microphones in the calibration data,
84
84
  #: is set automatically when read from file or when data is set.
@@ -66,7 +66,10 @@ def deprecated_alias(old2new, read_only=False, removal_version=''):
66
66
  else:
67
67
  current_removal_version = ''
68
68
  # Define Trait Property type
69
- trait_type = Property(*_alias_accessor_factory(old, new, current_read_only, current_removal_version))
69
+ trait_type = Property(
70
+ *_alias_accessor_factory(old, new, current_read_only, current_removal_version),
71
+ transient=True,
72
+ )
70
73
 
71
74
  # If the new trait exists, set or update alias
72
75
  if new in cls.class_traits():
@@ -591,7 +591,7 @@ class RotatingFlow(FlowField):
591
591
  # Positive values indicate clockwise rotation of the flow.
592
592
  # This is contrary to the usual definition of the direction of rotation.
593
593
  # Deprecated! Please use the differently defined :attr:`rps` attribute instead.
594
- rpm = Property(desc='revolutions per minute of the flow; positive values for clockwise rotation')
594
+ rpm = Property(transient=True, desc='revolutions per minute of the flow; positive values for clockwise rotation')
595
595
 
596
596
  def _get_rpm(self):
597
597
  warn(
@@ -170,6 +170,7 @@ class SteeringVector(HasStrictTraits):
170
170
  'true level': lambda x: x / einsum('ij,ij->i', x, x.conj())[:, newaxis],
171
171
  'true location': lambda x: x / sqrt(einsum('ij,ij->i', x, x.conj()) * x.shape[-1])[:, newaxis],
172
172
  },
173
+ transient=True,
173
174
  desc='dictionary of frequency domain steering vector functions',
174
175
  )
175
176
 
@@ -180,6 +181,7 @@ class SteeringVector(HasStrictTraits):
180
181
  'true level': _steer_III,
181
182
  'true location': _steer_IV,
182
183
  },
184
+ transient=True,
183
185
  desc='dictionary of time domain steering vector functions',
184
186
  )
185
187
 
@@ -1149,7 +1151,7 @@ class BeamformerDamas(BeamformerBase):
1149
1151
  #: (only for backward compatibility) :class:`BeamformerBase` object
1150
1152
  #: if set, provides :attr:`freq_data`, :attr:`steer`, :attr:`r_diag`
1151
1153
  #: if not set, these have to be set explicitly.
1152
- beamformer = Property()
1154
+ beamformer = Property(transient=True)
1153
1155
 
1154
1156
  # private storage of beamformer instance
1155
1157
  _beamformer = Instance(BeamformerBase)
@@ -1366,7 +1368,7 @@ class BeamformerOrth(BeamformerBase):
1366
1368
  #: (only for backward compatibility) :class:`BeamformerEig` object
1367
1369
  #: if set, provides :attr:`freq_data`, :attr:`steer`, :attr:`r_diag`
1368
1370
  #: if not set, these have to be set explicitly.
1369
- beamformer = Property()
1371
+ beamformer = Property(transient=True)
1370
1372
 
1371
1373
  # private storage of beamformer instance
1372
1374
  _beamformer = Instance(BeamformerEig)
@@ -1555,7 +1557,7 @@ class BeamformerClean(BeamformerBase):
1555
1557
  #: (only for backward compatibility) :class:`BeamformerBase` object
1556
1558
  #: if set, provides :attr:`freq_data`, :attr:`steer`, :attr:`r_diag`
1557
1559
  #: if not set, these have to be set explicitly.
1558
- beamformer = Property()
1560
+ beamformer = Property(transient=True)
1559
1561
 
1560
1562
  # private storage of beamformer instance
1561
1563
  _beamformer = Instance(BeamformerBase)
@@ -770,7 +770,7 @@ class ImportGrid(Grid):
770
770
  """
771
771
 
772
772
  #: Name of the .xml-file from which to read the data.
773
- file = File(filter=['*.xml'], exists=True, desc='name of the xml file to import')
773
+ file = Union(None, File(filter=['*.xml'], exists=True), desc='name of the xml file to import')
774
774
 
775
775
  _gpos = CArray(dtype=float, desc='x, y, z position of all Grid Points')
776
776
 
@@ -22,6 +22,7 @@ from traits.api import (
22
22
  HasStrictTraits,
23
23
  List,
24
24
  Property,
25
+ Union,
25
26
  cached_property,
26
27
  on_trait_change,
27
28
  )
@@ -128,7 +129,7 @@ class MicGeom(HasStrictTraits):
128
129
 
129
130
  #: Path to the XML file containing microphone positions. The XML file should have elements with
130
131
  #: the tag ``pos`` and attributes ``Name``, ``x``, ``y``, and ``z``.
131
- file = File(filter=['*.xml'], exists=True, desc='name of the xml file to import')
132
+ file = Union(None, File(filter=['*.xml'], exists=True), desc='name of the xml file to import')
132
133
 
133
134
  #: Array containing the ``x, y, z`` positions of all microphones, including invalid ones, shape
134
135
  #: ``(3,`` :attr:`num_mics` ``)``. This is set automatically when :attr:`file` changes or
@@ -369,7 +369,7 @@ class TimeSamples(SamplesGenerator):
369
369
  """
370
370
 
371
371
  #: Full path to the ``.h5`` file containing time-domain data.
372
- file = File(filter=['*.h5'], exists=True, desc='name of data file')
372
+ file = Union(None, File(filter=['*.h5'], exists=True), desc='name of data file')
373
373
 
374
374
  #: Basename of the ``.h5`` file, set automatically from the :attr:`file` attribute.
375
375
  basename = Property(depends_on=['file'], desc='basename of data file')
@@ -12,7 +12,6 @@
12
12
  """
13
13
 
14
14
  from abc import abstractmethod
15
- from warnings import warn
16
15
 
17
16
  from numpy import (
18
17
  arange,
@@ -298,9 +297,10 @@ class PowerSpectra(BaseSpectra):
298
297
  return None
299
298
 
300
299
  def _set_freq_range(self, freq_range): # by setting this the user sets _freqlc and _freqhc
301
- self._index_set_last = False
302
- self._freqlc = freq_range[0]
303
- self._freqhc = freq_range[1]
300
+ if freq_range is not None:
301
+ self._index_set_last = False
302
+ self._freqlc = freq_range[0]
303
+ self._freqhc = freq_range[1]
304
304
 
305
305
  @property_depends_on(['source.sample_freq', 'block_size', '_ind_low', '_freqlc'])
306
306
  def _get_ind_low(self):
@@ -309,7 +309,7 @@ class PowerSpectra(BaseSpectra):
309
309
  if self._index_set_last:
310
310
  return min(self._ind_low, fftfreq.shape[0] - 1)
311
311
  return searchsorted(fftfreq[:-1], self._freqlc)
312
- return None
312
+ return 0
313
313
 
314
314
  @property_depends_on(['source.sample_freq', 'block_size', '_ind_high', '_freqhc'])
315
315
  def _get_ind_high(self):
@@ -631,7 +631,7 @@ class PowerSpectraImport(PowerSpectra):
631
631
 
632
632
  #: The frequencies included in the CSM in ascending order. Accepts list, array, or a single
633
633
  #: float value.
634
- frequencies = Union(CArray, Float, desc='frequencies included in the cross-spectral matrix')
634
+ frequencies = Union(None, CArray, Float, desc='frequencies included in the cross-spectral matrix')
635
635
 
636
636
  #: Number of time data channels, inferred from the shape of the CSM.
637
637
  num_channels = Property(depends_on=['digest'])
@@ -670,7 +670,7 @@ class PowerSpectraImport(PowerSpectra):
670
670
  basename = Property(depends_on=['digest'], desc='basename for cache file')
671
671
 
672
672
  # Shadow trait for storing the CSM, for internal use only.
673
- _csm = CArray()
673
+ _csm = Union(None, CArray(shape=(None, None, None)), desc='cross spectral matrix')
674
674
 
675
675
  # Checksum for the CSM to trigger digest calculation, for internal use only.
676
676
  _csmsum = Float()
@@ -689,12 +689,13 @@ class PowerSpectraImport(PowerSpectra):
689
689
  return self._csm
690
690
 
691
691
  def _set_csm(self, csm):
692
- if (len(csm.shape) != 3) or (csm.shape[1] != csm.shape[2]):
693
- msg = 'The cross spectral matrix must have the following shape: \
694
- (number of frequencies, num_channels, num_channels)!'
695
- raise ValueError(msg)
696
- self._csmsum = real(self._csm).sum() + (imag(self._csm) ** 2).sum() # to trigger new digest creation
697
- self._csm = csm
692
+ if csm is not None:
693
+ if csm.shape[1] != csm.shape[2]:
694
+ msg = 'The cross spectral matrix must have the following shape: \
695
+ (number of frequencies, num_channels, num_channels)!'
696
+ raise ValueError(msg)
697
+ self._csm = csm
698
+ self._csmsum = real(self._csm).sum() + (imag(self._csm) ** 2).sum() # to trigger new digest creation
698
699
 
699
700
  @property_depends_on(['digest'])
700
701
  def _get_eva(self):
@@ -720,6 +721,4 @@ class PowerSpectraImport(PowerSpectra):
720
721
  return array([self.frequencies])
721
722
  if isinstance(self.frequencies, ndarray):
722
723
  return self.frequencies
723
- if self.frequencies is None:
724
- warn('No frequencies defined for PowerSpectraImport object!', stacklevel=1)
725
724
  return self.frequencies
@@ -26,8 +26,7 @@ def get_file_basename(file, alternative_basename='void'):
26
26
  str
27
27
  Basename of the file.
28
28
  """
29
- basename = Path(file).stem
30
- return basename if basename else alternative_basename
29
+ return Path(file).stem if file else alternative_basename
31
30
 
32
31
 
33
32
  def find_basename(source, alternative_basename='void'):
@@ -333,7 +333,7 @@ class Trigger(TimeOut): # pragma: no cover
333
333
  # mean value of the trigger signal. E.g: the mean value is 0 and there are positive
334
334
  # extremums at 400 and negative extremums at -800. Then the estimated threshold would be
335
335
  # 0.75 * -800 = -600.
336
- threshold = Float(None)
336
+ threshold = Union(None, Float)
337
337
 
338
338
  # Maximum allowable variation of length of each revolution duration. Default is
339
339
  # 2%. A warning is thrown, if any revolution length surpasses this value:
@@ -4,5 +4,5 @@
4
4
 
5
5
  # separate file to find out about version without importing the acoular lib
6
6
  __author__ = 'Acoular Development Team'
7
- __date__ = '12 March 2025'
8
- __version__ = '25.03'
7
+ __date__ = '29 April 2025'
8
+ __version__ = '25.04'
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes