acoular 25.4__py3-none-any.whl → 25.7__py3-none-any.whl

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.
acoular/__init__.py CHANGED
@@ -16,7 +16,6 @@ from .base import (
16
16
  SamplesGenerator,
17
17
  SpectraGenerator,
18
18
  SpectraOut,
19
- TimeInOut,
20
19
  TimeOut,
21
20
  )
22
21
  from .calib import Calib
@@ -52,7 +51,7 @@ from .fbeamform import (
52
51
  SteeringVector,
53
52
  integrate,
54
53
  )
55
- from .fprocess import IRFFT, RFFT, AutoPowerSpectra, CrossPowerSpectra, FFTSpectra
54
+ from .fprocess import IRFFT, RFFT, AutoPowerSpectra, CrossPowerSpectra
56
55
  from .grids import (
57
56
  CircSector,
58
57
  ConvexSector,
@@ -69,7 +68,7 @@ from .grids import (
69
68
  Sector,
70
69
  )
71
70
  from .microphones import MicGeom
72
- from .process import Average, Cache, SampleSplitter, TimeAverage, TimeCache
71
+ from .process import Average, Cache, SampleSplitter
73
72
  from .sdinput import SoundDeviceSamplesGenerator
74
73
  from .signals import (
75
74
  FiltWNoiseGenerator,
@@ -117,7 +116,6 @@ from .tprocess import (
117
116
  FiltFiltOctave,
118
117
  FiltFreqWeight,
119
118
  FiltOctave,
120
- MaskedTimeInOut,
121
119
  MaskedTimeOut,
122
120
  Mixer,
123
121
  OctaveFilterBank,
acoular/aiaa/aiaa.py CHANGED
@@ -85,7 +85,7 @@ class TriggerAIAABenchmark(TimeSamplesAIAABenchmark):
85
85
  (self.num_samples, self.num_channels) = self.data.shape
86
86
 
87
87
 
88
- @deprecated_alias({'name': 'file'})
88
+ @deprecated_alias({'name': 'file'}, removal_version='25.10')
89
89
  class CsmAIAABenchmark(PowerSpectraImport):
90
90
  """Class to load the CSM that is stored in AIAA Benchmark HDF5 file."""
91
91
 
@@ -174,7 +174,9 @@ class MicAIAABenchmark(MicGeom):
174
174
 
175
175
  @on_trait_change('file')
176
176
  def _import_mpos(self):
177
- """Import the microphone positions from .h5 file.
177
+ """
178
+ Import the microphone positions from .h5 file.
179
+
178
180
  Called when :attr:`basename` changes.
179
181
  """
180
182
  file = _get_h5file_class()
acoular/base.py CHANGED
@@ -16,7 +16,6 @@ to be used directly, but to be subclassed by classes that implement the actual s
16
16
  InOut
17
17
  TimeOut
18
18
  SpectraOut
19
- TimeInOut
20
19
  """
21
20
 
22
21
  from abc import abstractmethod
@@ -37,7 +36,7 @@ from .deprecation import deprecated_alias
37
36
  from .internal import digest
38
37
 
39
38
 
40
- @deprecated_alias({'numchannels': 'num_channels', 'numsamples': 'num_samples'})
39
+ @deprecated_alias({'numchannels': 'num_channels', 'numsamples': 'num_samples'}, removal_version='25.10')
41
40
  class Generator(ABCHasStrictTraits):
42
41
  """Interface for any generating signal processing block.
43
42
 
@@ -157,10 +156,10 @@ class SpectraGenerator(Generator):
157
156
  """
158
157
 
159
158
 
160
- @deprecated_alias({'numchannels': 'num_channels', 'numsamples': 'num_samples'}, read_only=True)
159
+ @deprecated_alias({'numchannels': 'num_channels', 'numsamples': 'num_samples'}, read_only=True, removal_version='25.10')
161
160
  class TimeOut(SamplesGenerator):
162
- """Abstract base class for any signal processing block that receives data from any
163
- :attr:`source` domain and returns time domain signals.
161
+ """
162
+ Abstract base class receiving from a :attr:`source` and returning time domain signals.
164
163
 
165
164
  It provides a base class that can be used to create signal processing blocks that receive data
166
165
  from any generating :attr:`source` and generates a time signal output via the generator
@@ -205,10 +204,14 @@ class TimeOut(SamplesGenerator):
205
204
  """
206
205
 
207
206
 
208
- @deprecated_alias({'numchannels': 'num_channels', 'numsamples': 'num_samples', 'numfreqs': 'num_freqs'}, read_only=True)
207
+ @deprecated_alias(
208
+ {'numchannels': 'num_channels', 'numsamples': 'num_samples', 'numfreqs': 'num_freqs'},
209
+ read_only=True,
210
+ removal_version='25.10',
211
+ )
209
212
  class SpectraOut(SpectraGenerator):
210
- """Abstract base class for any signal processing block that receives data from any
211
- :attr:`source` domain and returns frequency domain signals.
213
+ """
214
+ Abstract base class receiving from a :attr:`source` and returning frequency domain signals.
212
215
 
213
216
  It provides a base class that can be used to create signal processing blocks that receive data
214
217
  from any generating :attr:`source` domain and generates a frequency domain output via the
@@ -260,10 +263,10 @@ class SpectraOut(SpectraGenerator):
260
263
  """
261
264
 
262
265
 
263
- @deprecated_alias({'numchannels': 'num_channels', 'numsamples': 'num_samples'}, read_only=True)
266
+ @deprecated_alias({'numchannels': 'num_channels', 'numsamples': 'num_samples'}, read_only=True, removal_version='25.10')
264
267
  class InOut(SamplesGenerator, SpectraGenerator):
265
- """Abstract base class for any signal processing block that receives data from any
266
- :attr:`source` domain and returns signals in the same domain.
268
+ """
269
+ Abstract base class receiving from a :attr:`source` and returning signals in the same domain.
267
270
 
268
271
  It provides a base class that can be used to create signal processing blocks that receive data
269
272
  from any generating :attr:`source` and generates an output via the generator :meth:`result` in
@@ -308,25 +311,3 @@ class InOut(SamplesGenerator, SpectraGenerator):
308
311
  numpy.ndarray
309
312
  Two-dimensional output data block of shape (num, ...)
310
313
  """
311
-
312
-
313
- class TimeInOut(TimeOut):
314
- """Deprecated alias for :class:`~acoular.base.TimeOut`.
315
-
316
- .. deprecated:: 24.10
317
- Using :class:`~acoular.base.TimeInOut` is deprecated and will be removed in Acoular 25.07.
318
- Use :class:`~acoular.base.TimeOut` instead.
319
- """
320
-
321
- #: Data source; :class:`~acoular.base.SamplesGenerator` or derived object.
322
- source = Instance(SamplesGenerator)
323
-
324
- def __init__(self, *args, **kwargs):
325
- super().__init__(*args, **kwargs)
326
- import warnings
327
-
328
- warnings.warn(
329
- 'TimeInOut is deprecated and will be removed in Acoular 25.07. Use TimeOut instead.',
330
- DeprecationWarning,
331
- stacklevel=2,
332
- )
acoular/calib.py CHANGED
@@ -24,7 +24,7 @@ from .deprecation import deprecated_alias
24
24
  from .internal import digest
25
25
 
26
26
 
27
- @deprecated_alias({'from_file': 'file'})
27
+ @deprecated_alias({'from_file': 'file'}, removal_version='25.10')
28
28
  class Calib(InOut):
29
29
  """Processing block for handling calibration data in `*.xml` or NumPy format.
30
30
 
@@ -72,7 +72,6 @@ class Calib(InOut):
72
72
  0.07458428+0.49657939j 1.772696 +3.92233098j 3.19543248+0.17988554j
73
73
  0.3379041 -3.93342331j 0.93949242+2.5328611j 2.97352574+0.j ]]
74
74
 
75
- Deprecated and will be removed in Acoular 25.10:
76
75
  This class serves as interface to load calibration data for the used
77
76
  microphone array. The calibration factors are stored as [Pa/unit].
78
77
  """
@@ -102,6 +101,7 @@ class Calib(InOut):
102
101
 
103
102
  @on_trait_change('data')
104
103
  def set_num_mics(self):
104
+ """Sets the number of microphones based on the shape of the data array."""
105
105
  self.num_mics = self.data.shape[0]
106
106
 
107
107
  @cached_property
acoular/configuration.py CHANGED
@@ -68,7 +68,7 @@ class Config(HasStrictTraits):
68
68
  The package used to read and write .h5 files can be specified
69
69
  by :attr:`h5library`.
70
70
 
71
- Example:
71
+ Examples
72
72
  --------
73
73
  For using Acoular with h5py package and overwrite existing cache:
74
74
 
acoular/demo/__init__.py CHANGED
@@ -11,4 +11,9 @@
11
11
  """
12
12
 
13
13
  from . import acoular_demo
14
- from .acoular_demo import create_three_sources
14
+ from .acoular_demo import (
15
+ create_three_sources,
16
+ create_three_sources_1d,
17
+ create_three_sources_2d,
18
+ create_three_sources_3d,
19
+ )
@@ -33,28 +33,52 @@ Source Location RMS
33
33
 
34
34
 
35
35
  def create_three_sources(mg, h5savefile='three_sources.h5'):
36
- """Create three noise sources and return them as Mixer."""
37
- import acoular as ac
36
+ """
37
+ Create three noise sources and return them as Mixer.
38
+
39
+ Alias for :func:`create_three_sources_2d`.
40
+ """
41
+ return create_three_sources_2d(mg, h5savefile=h5savefile)
42
+
38
43
 
39
- # set up the parameters
44
+ def _create_three_sources(mg, locs, h5savefile='', sfreq=51200, duration=1):
45
+ """Create three noise sources with custom locations and return them as Mixer."""
46
+ import acoular as ac
40
47
 
41
- sfreq = 51200
42
- duration = 1
43
48
  nsamples = duration * sfreq
44
49
 
45
50
  n1 = ac.WNoiseGenerator(sample_freq=sfreq, num_samples=nsamples, seed=1)
46
51
  n2 = ac.WNoiseGenerator(sample_freq=sfreq, num_samples=nsamples, seed=2, rms=0.7)
47
52
  n3 = ac.WNoiseGenerator(sample_freq=sfreq, num_samples=nsamples, seed=3, rms=0.5)
48
- p1 = ac.PointSource(signal=n1, mics=mg, loc=(-0.1, -0.1, -0.3))
49
- p2 = ac.PointSource(signal=n2, mics=mg, loc=(0.15, 0, -0.3))
50
- p3 = ac.PointSource(signal=n3, mics=mg, loc=(0, 0.1, -0.3))
51
- pa = ac.Mixer(source=p1, sources=[p2, p3])
53
+
54
+ noises = [n1, n2, n3]
55
+ ps = [ac.PointSource(signal=n, mics=mg, loc=loc) for n, loc in list(zip(noises, locs))]
56
+ pa = ac.Mixer(source=ps[0], sources=ps[1:])
57
+
52
58
  if h5savefile:
53
59
  wh5 = ac.WriteH5(source=pa, file=h5savefile)
54
60
  wh5.save()
55
61
  return pa
56
62
 
57
63
 
64
+ def create_three_sources_1d(mg, h5savefile='three_sources_1d.h5'):
65
+ """Create three noise sources on a 1D line and return them as Mixer."""
66
+ locs = [(-0.1, 0, -0.3), (0.15, 0, -0.3), (0, 0, -0.3)]
67
+ return _create_three_sources(mg, locs, h5savefile=h5savefile)
68
+
69
+
70
+ def create_three_sources_2d(mg, h5savefile='three_sources_2d.h5'):
71
+ """Create three noise sources in a 2D plane and return them as Mixer."""
72
+ locs = [(-0.1, -0.1, -0.3), (0.15, 0, -0.3), (0, 0.1, -0.3)]
73
+ return _create_three_sources(mg, locs, h5savefile=h5savefile)
74
+
75
+
76
+ def create_three_sources_3d(mg, h5savefile='three_sources_3d.h5'):
77
+ """Create three noise sources in 3D space and return them as Mixer."""
78
+ locs = [(-0.1, -0.1, -0.3), (0.15, 0, -0.17), (0, 0.1, -0.25)]
79
+ return _create_three_sources(mg, locs, h5savefile=h5savefile)
80
+
81
+
58
82
  def run():
59
83
  """Run the Acoular demo."""
60
84
  from pathlib import Path
@@ -87,7 +111,7 @@ def run():
87
111
  from matplotlib.pyplot import axis, colorbar, figure, imshow, plot, show
88
112
 
89
113
  # show map
90
- imshow(spl.T, origin='lower', vmin=spl.max() - 10, extent=rg.extend(), interpolation='bicubic')
114
+ imshow(spl.T, origin='lower', vmin=spl.max() - 10, extent=rg.extent, interpolation='bicubic')
91
115
  colorbar()
92
116
 
93
117
  # plot microphone geometry
acoular/deprecation.py CHANGED
@@ -1,6 +1,13 @@
1
1
  # ------------------------------------------------------------------------------
2
2
  # Copyright (c) Acoular Development Team.
3
3
  # ------------------------------------------------------------------------------
4
+ """Implements helper functions for deprecation handling.
5
+
6
+ .. autosummary::
7
+ :toctree: generated/
8
+
9
+ deprecated_alias
10
+ """
4
11
 
5
12
  from warnings import warn
6
13
 
@@ -8,7 +15,9 @@ from traits.api import Property
8
15
 
9
16
 
10
17
  def deprecated_alias(old2new, read_only=False, removal_version=''):
11
- """Decorator function for deprecating renamed class traits.
18
+ """
19
+ Decorator function for deprecating renamed class traits.
20
+
12
21
  Replaced traits should no longer be part of the class definition
13
22
  and only mentioned in this decorator's parameter list.
14
23
  The replacement trait has to be defined in the updated class and
acoular/environments.py CHANGED
@@ -557,8 +557,7 @@ class OpenJet(FlowField):
557
557
 
558
558
  class RotatingFlow(FlowField):
559
559
  """
560
- Analytical approximation of a rotating flow field with additional velocity component
561
- in z-direction.
560
+ Analytical approximation of a rotating flow field with velocity component in z-direction.
562
561
 
563
562
  This class provides an analytical model for a fluid flow field with a
564
563
  rigid-body-like rotation about the z-axis. The flow combines rotational motion
@@ -595,7 +594,8 @@ class RotatingFlow(FlowField):
595
594
 
596
595
  def _get_rpm(self):
597
596
  warn(
598
- 'Deprecated use of "rpm" trait. Please use the "rps" trait instead.',
597
+ 'Deprecated use of "rpm" trait (will be removed in version 26.01). \
598
+ Please use the "rps" trait instead.',
599
599
  DeprecationWarning,
600
600
  stacklevel=2,
601
601
  )
@@ -603,7 +603,8 @@ class RotatingFlow(FlowField):
603
603
 
604
604
  def _set_rpm(self, rpm):
605
605
  warn(
606
- 'Deprecated use of "rpm" trait. Please use the "rps" trait instead (divide rpm value by -60).',
606
+ 'Deprecated use of "rpm" trait (will be removed in version 26.01). \
607
+ Please use the "rps" trait instead (divide rpm value by -60).',
607
608
  DeprecationWarning,
608
609
  stacklevel=2,
609
610
  )
acoular/fastFuncs.py CHANGED
@@ -1,9 +1,7 @@
1
1
  # ------------------------------------------------------------------------------
2
2
  # Copyright (c) Acoular Development Team.
3
3
  # ------------------------------------------------------------------------------
4
- """Contains all the functionalities which are very expansive, regarding
5
- computational costs. All functionalities are optimized via NUMBA.
6
- """
4
+ """Contains all computationally expensive operations and accelerates them with NUMBA."""
7
5
 
8
6
  import numba as nb
9
7
  import numpy as np
@@ -27,7 +25,8 @@ FAST_OPTION = True # fastmath options
27
25
  )
28
26
  def calcCSM(csm, SpecAllMics):
29
27
  """Adds a given spectrum to the Cross-Spectral-Matrix (CSM).
30
- Here only the upper triangular matrix of the CSM is calculated. After
28
+
29
+ Here, only the upper triangular matrix of the CSM is calculated. After
31
30
  averaging over the various ensembles, the whole CSM is created via complex
32
31
  conjugation transposing. This happens outside
33
32
  (in :class:`PowerSpectra<acoular.spectra.PowerSpectra>`).
@@ -56,9 +55,11 @@ def calcCSM(csm, SpecAllMics):
56
55
 
57
56
 
58
57
  def beamformerFreq(steerVecType, boolRemovedDiagOfCSM, normFactor, inputTupleSteer, inputTupleCsm):
59
- r"""Conventional beamformer in frequency domain. Use either a predefined
60
- steering vector formulation (see Sarradj 2012) or pass your own
61
- steering vector.
58
+ r"""
59
+ Conventional beamformer in frequency domain.
60
+
61
+ Use either a predefined steering vector formulation (see Sarradj 2012) or pass your own steering
62
+ vector.
62
63
 
63
64
  Parameters
64
65
  ----------
@@ -545,8 +546,11 @@ def _freqBeamformer_EigValProb_SpecificSteerVec_CsmRemovedDiag(
545
546
 
546
547
  # %% Point - Spread - Function
547
548
  def calcPointSpreadFunction(steerVecType, distGridToArrayCenter, distGridToAllMics, waveNumber, indSource, dtype):
548
- r"""Calculates the Point-Spread-Functions. Use either a predefined steering vector
549
- formulation (see :ref:`Sarradj, 2012<Sarradj2012>`) or pass it your own steering vector.
549
+ r"""
550
+ Calculates the Point-Spread-Functions.
551
+
552
+ Use either a predefined steering vector formulation (see :ref:`Sarradj, 2012<Sarradj2012>`) or
553
+ pass it your own steering vector.
550
554
 
551
555
  Parameters
552
556
  ----------
@@ -789,7 +793,9 @@ def _psf_Formulation4AkaTrueLocation(
789
793
  fastmath=FAST_OPTION,
790
794
  )
791
795
  def damasSolverGaussSeidel(A, dirtyMap, nIterations, relax, damasSolution):
792
- """Solves the DAMAS inverse problem via modified gauss seidel.
796
+ """
797
+ Solves the DAMAS inverse problem via modified gauss seidel.
798
+
793
799
  This is the original formulation from :ref:`Brooks and Humphreys, 2006<BrooksHumphreys2006>`.
794
800
 
795
801
  Parameters
acoular/fbeamform.py CHANGED
@@ -292,7 +292,7 @@ class LazyBfResult:
292
292
  self.bf = bf
293
293
 
294
294
  def __getitem__(self, key):
295
- # 'intelligent' [] operator checks if results are available and triggers calculation
295
+ """'intelligent' [] operator, checks if results are available and triggers calculation."""
296
296
  sl = index_exp[key][0]
297
297
  if isinstance(sl, (int, integer)):
298
298
  sl = slice(sl, sl + 1)
@@ -662,18 +662,15 @@ class BeamformerBase(HasStrictTraits):
662
662
  msg,
663
663
  )
664
664
  gshape = self.steer.grid.shape
665
+ num_freqs = self.freq_data.fftfreq().shape[0]
665
666
  if num == 0 or frange is None:
666
667
  if frange is None:
667
668
  ind_low = self.freq_data.ind_low
668
669
  ind_high = self.freq_data.ind_high
669
670
  if ind_low is None:
670
671
  ind_low = 0
671
- if ind_low < 0:
672
- ind_low += self._numfreq
673
672
  if ind_high is None:
674
- ind_high = self._numfreq
675
- if ind_high < 0:
676
- ind_high += self._numfreq
673
+ ind_high = num_freqs
677
674
  irange = (ind_low, ind_high)
678
675
  num = 0
679
676
  elif len(frange) == 2:
@@ -683,10 +680,10 @@ class BeamformerBase(HasStrictTraits):
683
680
  raise TypeError(
684
681
  msg,
685
682
  )
686
- h = zeros(self._numfreq, dtype=float)
683
+ h = zeros(num_freqs, dtype=float)
687
684
  sl = slice(*irange)
688
685
  r = self.result[sl]
689
- for i in range(*irange):
686
+ for i in range(num_freqs)[sl]:
690
687
  # we do this per frequency because r might not have fancy indexing
691
688
  h[i] = r[i - sl.start].reshape(gshape)[ind].sum()
692
689
  if frange is None:
@@ -1148,14 +1145,6 @@ class BeamformerDamas(BeamformerBase):
1148
1145
  See :cite:`Brooks2006` for details.
1149
1146
  """
1150
1147
 
1151
- #: (only for backward compatibility) :class:`BeamformerBase` object
1152
- #: if set, provides :attr:`freq_data`, :attr:`steer`, :attr:`r_diag`
1153
- #: if not set, these have to be set explicitly.
1154
- beamformer = Property(transient=True)
1155
-
1156
- # private storage of beamformer instance
1157
- _beamformer = Instance(BeamformerBase)
1158
-
1159
1148
  #: The floating-number-precision of the PSFs. Default is 64 bit.
1160
1149
  psf_precision = Enum('float64', 'float32', desc='precision of PSF')
1161
1150
 
@@ -1174,32 +1163,10 @@ class BeamformerDamas(BeamformerBase):
1174
1163
  depends_on=BEAMFORMER_BASE_DIGEST_DEPENDENCIES + ['n_iter', 'damp', 'psf_precision'],
1175
1164
  )
1176
1165
 
1177
- def _get_beamformer(self):
1178
- return self._beamformer
1179
-
1180
- def _set_beamformer(self, beamformer):
1181
- msg = (
1182
- f"Deprecated use of 'beamformer' trait in class {self.__class__.__name__}. "
1183
- 'Please set :attr:`freq_data`, :attr:`steer`, :attr:`r_diag` directly. '
1184
- "Using the 'beamformer' trait will be removed in version 25.07."
1185
- )
1186
- warn(
1187
- msg,
1188
- DeprecationWarning,
1189
- stacklevel=2,
1190
- )
1191
- self._beamformer = beamformer
1192
-
1193
1166
  @cached_property
1194
1167
  def _get_digest(self):
1195
1168
  return digest(self)
1196
1169
 
1197
- @on_trait_change('_beamformer.digest')
1198
- def delegate_beamformer_traits(self):
1199
- self.freq_data = self.beamformer.freq_data
1200
- self.r_diag = self.beamformer.r_diag
1201
- self.steer = self.beamformer.steer
1202
-
1203
1170
  def _calc(self, ind):
1204
1171
  """Calculates the result for the frequencies defined by :attr:`freq_data`.
1205
1172
 
@@ -1242,7 +1209,7 @@ class BeamformerDamas(BeamformerBase):
1242
1209
  self._fr[i] = 1
1243
1210
 
1244
1211
 
1245
- @deprecated_alias({'max_iter': 'n_iter'})
1212
+ @deprecated_alias({'max_iter': 'n_iter'}, removal_version='25.10')
1246
1213
  class BeamformerDamasPlus(BeamformerDamas):
1247
1214
  """DAMAS deconvolution :cite:`Brooks2006` for solving the system of equations, instead of the
1248
1215
  original Gauss-Seidel iterations, this class employs the NNLS or linear programming solvers from
@@ -1365,14 +1332,6 @@ class BeamformerOrth(BeamformerBase):
1365
1332
  New faster implementation without explicit (:class:`BeamformerEig`).
1366
1333
  """
1367
1334
 
1368
- #: (only for backward compatibility) :class:`BeamformerEig` object
1369
- #: if set, provides :attr:`freq_data`, :attr:`steer`, :attr:`r_diag`
1370
- #: if not set, these have to be set explicitly.
1371
- beamformer = Property(transient=True)
1372
-
1373
- # private storage of beamformer instance
1374
- _beamformer = Instance(BeamformerEig)
1375
-
1376
1335
  #: List of components to consider, use this to directly set the eigenvalues
1377
1336
  #: used in the beamformer. Alternatively, set :attr:`n`.
1378
1337
  eva_list = CArray(dtype=int, value=array([-1]), desc='components')
@@ -1388,32 +1347,10 @@ class BeamformerOrth(BeamformerBase):
1388
1347
  depends_on=BEAMFORMER_BASE_DIGEST_DEPENDENCIES + ['eva_list'],
1389
1348
  )
1390
1349
 
1391
- def _get_beamformer(self):
1392
- return self._beamformer
1393
-
1394
- def _set_beamformer(self, beamformer):
1395
- msg = (
1396
- f"Deprecated use of 'beamformer' trait in class {self.__class__.__name__}. "
1397
- 'Please set :attr:`freq_data`, :attr:`steer`, :attr:`r_diag` directly. '
1398
- "Using the 'beamformer' trait will be removed in version 25.07."
1399
- )
1400
- warn(
1401
- msg,
1402
- DeprecationWarning,
1403
- stacklevel=2,
1404
- )
1405
- self._beamformer = beamformer
1406
-
1407
1350
  @cached_property
1408
1351
  def _get_digest(self):
1409
1352
  return digest(self)
1410
1353
 
1411
- @on_trait_change('_beamformer.digest')
1412
- def delegate_beamformer_traits(self):
1413
- self.freq_data = self.beamformer.freq_data
1414
- self.r_diag = self.beamformer.r_diag
1415
- self.steer = self.beamformer.steer
1416
-
1417
1354
  @on_trait_change('n')
1418
1355
  def set_eva_list(self):
1419
1356
  """Sets the list of eigenvalues to consider."""
@@ -1456,7 +1393,7 @@ class BeamformerOrth(BeamformerBase):
1456
1393
  self._fr[i] = 1
1457
1394
 
1458
1395
 
1459
- @deprecated_alias({'n': 'n_iter'})
1396
+ @deprecated_alias({'n': 'n_iter'}, removal_version='25.10')
1460
1397
  class BeamformerCleansc(BeamformerBase):
1461
1398
  """CLEAN-SC deconvolution algorithm.
1462
1399
 
@@ -1554,14 +1491,6 @@ class BeamformerClean(BeamformerBase):
1554
1491
  See :cite:`Hoegbom1974` for details.
1555
1492
  """
1556
1493
 
1557
- #: (only for backward compatibility) :class:`BeamformerBase` object
1558
- #: if set, provides :attr:`freq_data`, :attr:`steer`, :attr:`r_diag`
1559
- #: if not set, these have to be set explicitly.
1560
- beamformer = Property(transient=True)
1561
-
1562
- # private storage of beamformer instance
1563
- _beamformer = Instance(BeamformerBase)
1564
-
1565
1494
  #: The floating-number-precision of the PSFs. Default is 64 bit.
1566
1495
  psf_precision = Enum('float64', 'float32', desc='precision of PSF.')
1567
1496
 
@@ -1584,28 +1513,6 @@ class BeamformerClean(BeamformerBase):
1584
1513
  def _get_digest(self):
1585
1514
  return digest(self)
1586
1515
 
1587
- def _get_beamformer(self):
1588
- return self._beamformer
1589
-
1590
- def _set_beamformer(self, beamformer):
1591
- msg = (
1592
- f"Deprecated use of 'beamformer' trait in class {self.__class__.__name__}. "
1593
- 'Please set :attr:`freq_data`, :attr:`steer`, :attr:`r_diag` directly. '
1594
- "Using the 'beamformer' trait will be removed in version 25.07."
1595
- )
1596
- warn(
1597
- msg,
1598
- DeprecationWarning,
1599
- stacklevel=2,
1600
- )
1601
- self._beamformer = beamformer
1602
-
1603
- @on_trait_change('_beamformer.digest')
1604
- def delegate_beamformer_traits(self):
1605
- self.freq_data = self.beamformer.freq_data
1606
- self.r_diag = self.beamformer.r_diag
1607
- self.steer = self.beamformer.steer
1608
-
1609
1516
  def _calc(self, ind):
1610
1517
  """Calculates the result for the frequencies defined by :attr:`freq_data`.
1611
1518
 
@@ -1668,7 +1575,7 @@ class BeamformerClean(BeamformerBase):
1668
1575
  self._fr[i] = 1
1669
1576
 
1670
1577
 
1671
- @deprecated_alias({'max_iter': 'n_iter'})
1578
+ @deprecated_alias({'max_iter': 'n_iter'}, removal_version='25.10')
1672
1579
  class BeamformerCMF(BeamformerBase):
1673
1580
  """Covariance Matrix Fitting algorithm.
1674
1581
 
@@ -1872,10 +1779,8 @@ class BeamformerCMF(BeamformerBase):
1872
1779
  factr=10000000.0,
1873
1780
  pgtol=1e-05,
1874
1781
  epsilon=1e-08,
1875
- iprint=-1,
1876
1782
  maxfun=15000,
1877
1783
  maxiter=self.n_iter,
1878
- disp=None,
1879
1784
  callback=None,
1880
1785
  maxls=20,
1881
1786
  )
@@ -1897,7 +1802,7 @@ class BeamformerCMF(BeamformerBase):
1897
1802
  self._fr[i] = 1
1898
1803
 
1899
1804
 
1900
- @deprecated_alias({'max_iter': 'n_iter'})
1805
+ @deprecated_alias({'max_iter': 'n_iter'}, removal_version='25.10')
1901
1806
  class BeamformerSODIX(BeamformerBase):
1902
1807
  """Source directivity modeling in the cross-spectral matrix (SODIX) algorithm.
1903
1808
 
@@ -2042,10 +1947,8 @@ class BeamformerSODIX(BeamformerBase):
2042
1947
  factr=100.0,
2043
1948
  pgtol=1e-12,
2044
1949
  epsilon=1e-08,
2045
- iprint=-1,
2046
1950
  maxfun=1500000,
2047
1951
  maxiter=self.n_iter,
2048
- disp=-1,
2049
1952
  callback=None,
2050
1953
  maxls=20,
2051
1954
  )
@@ -2056,7 +1959,7 @@ class BeamformerSODIX(BeamformerBase):
2056
1959
  self._fr[i] = 1
2057
1960
 
2058
1961
 
2059
- @deprecated_alias({'max_iter': 'n_iter'})
1962
+ @deprecated_alias({'max_iter': 'n_iter'}, removal_version='25.10')
2060
1963
  class BeamformerGIB(BeamformerEig): # BeamformerEig #BeamformerBase
2061
1964
  """Beamforming GIB methods with different normalizations.
2062
1965