acoular 25.4__py3-none-any.whl → 25.10__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 +2 -4
- acoular/aiaa/aiaa.py +10 -10
- acoular/base.py +12 -34
- acoular/calib.py +20 -19
- acoular/configuration.py +3 -3
- acoular/demo/__init__.py +6 -1
- acoular/demo/acoular_demo.py +34 -10
- acoular/deprecation.py +10 -1
- acoular/environments.py +107 -117
- acoular/fastFuncs.py +16 -10
- acoular/fbeamform.py +300 -402
- acoular/fprocess.py +7 -33
- acoular/grids.py +228 -134
- acoular/h5cache.py +10 -4
- acoular/h5files.py +106 -9
- acoular/internal.py +4 -0
- acoular/microphones.py +22 -10
- acoular/process.py +7 -53
- acoular/sdinput.py +8 -5
- acoular/signals.py +29 -27
- acoular/sources.py +205 -335
- acoular/spectra.py +33 -43
- acoular/tbeamform.py +220 -199
- acoular/tools/helpers.py +52 -33
- acoular/tools/metrics.py +5 -10
- acoular/tprocess.py +1392 -647
- acoular/traitsviews.py +1 -3
- acoular/trajectory.py +5 -5
- acoular/version.py +4 -3
- {acoular-25.4.dist-info → acoular-25.10.dist-info}/METADATA +8 -4
- acoular-25.10.dist-info/RECORD +56 -0
- acoular-25.4.dist-info/RECORD +0 -56
- {acoular-25.4.dist-info → acoular-25.10.dist-info}/WHEEL +0 -0
- {acoular-25.4.dist-info → acoular-25.10.dist-info}/licenses/AUTHORS.rst +0 -0
- {acoular-25.4.dist-info → acoular-25.10.dist-info}/licenses/LICENSE +0 -0
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
|
|
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
|
|
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
|
@@ -27,18 +27,17 @@ Examples
|
|
|
27
27
|
|
|
28
28
|
import contextlib
|
|
29
29
|
|
|
30
|
-
|
|
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
|
-
|
|
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'})
|
|
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
|
-
@
|
|
119
|
-
def
|
|
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,9 +170,11 @@ 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
|
-
@
|
|
176
|
-
def _import_mpos(self):
|
|
177
|
-
"""
|
|
173
|
+
@observe('file')
|
|
174
|
+
def _import_mpos(self, event): # noqa ARG002
|
|
175
|
+
"""
|
|
176
|
+
Import the microphone positions from .h5 file.
|
|
177
|
+
|
|
178
178
|
Called when :attr:`basename` changes.
|
|
179
179
|
"""
|
|
180
180
|
file = _get_h5file_class()
|
acoular/base.py
CHANGED
|
@@ -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
|
|
|
@@ -16,7 +22,6 @@ to be used directly, but to be subclassed by classes that implement the actual s
|
|
|
16
22
|
InOut
|
|
17
23
|
TimeOut
|
|
18
24
|
SpectraOut
|
|
19
|
-
TimeInOut
|
|
20
25
|
"""
|
|
21
26
|
|
|
22
27
|
from abc import abstractmethod
|
|
@@ -33,11 +38,9 @@ from traits.api import (
|
|
|
33
38
|
)
|
|
34
39
|
|
|
35
40
|
# acoular imports
|
|
36
|
-
from .deprecation import deprecated_alias
|
|
37
41
|
from .internal import digest
|
|
38
42
|
|
|
39
43
|
|
|
40
|
-
@deprecated_alias({'numchannels': 'num_channels', 'numsamples': 'num_samples'})
|
|
41
44
|
class Generator(ABCHasStrictTraits):
|
|
42
45
|
"""Interface for any generating signal processing block.
|
|
43
46
|
|
|
@@ -157,10 +160,9 @@ class SpectraGenerator(Generator):
|
|
|
157
160
|
"""
|
|
158
161
|
|
|
159
162
|
|
|
160
|
-
@deprecated_alias({'numchannels': 'num_channels', 'numsamples': 'num_samples'}, read_only=True)
|
|
161
163
|
class TimeOut(SamplesGenerator):
|
|
162
|
-
"""
|
|
163
|
-
:attr:`source`
|
|
164
|
+
"""
|
|
165
|
+
Abstract base class receiving from a :attr:`source` and returning time domain signals.
|
|
164
166
|
|
|
165
167
|
It provides a base class that can be used to create signal processing blocks that receive data
|
|
166
168
|
from any generating :attr:`source` and generates a time signal output via the generator
|
|
@@ -205,10 +207,9 @@ class TimeOut(SamplesGenerator):
|
|
|
205
207
|
"""
|
|
206
208
|
|
|
207
209
|
|
|
208
|
-
@deprecated_alias({'numchannels': 'num_channels', 'numsamples': 'num_samples', 'numfreqs': 'num_freqs'}, read_only=True)
|
|
209
210
|
class SpectraOut(SpectraGenerator):
|
|
210
|
-
"""
|
|
211
|
-
:attr:`source`
|
|
211
|
+
"""
|
|
212
|
+
Abstract base class receiving from a :attr:`source` and returning frequency domain signals.
|
|
212
213
|
|
|
213
214
|
It provides a base class that can be used to create signal processing blocks that receive data
|
|
214
215
|
from any generating :attr:`source` domain and generates a frequency domain output via the
|
|
@@ -260,10 +261,9 @@ class SpectraOut(SpectraGenerator):
|
|
|
260
261
|
"""
|
|
261
262
|
|
|
262
263
|
|
|
263
|
-
@deprecated_alias({'numchannels': 'num_channels', 'numsamples': 'num_samples'}, read_only=True)
|
|
264
264
|
class InOut(SamplesGenerator, SpectraGenerator):
|
|
265
|
-
"""
|
|
266
|
-
:attr:`source`
|
|
265
|
+
"""
|
|
266
|
+
Abstract base class receiving from a :attr:`source` and returning signals in the same domain.
|
|
267
267
|
|
|
268
268
|
It provides a base class that can be used to create signal processing blocks that receive data
|
|
269
269
|
from any generating :attr:`source` and generates an output via the generator :meth:`result` in
|
|
@@ -308,25 +308,3 @@ class InOut(SamplesGenerator, SpectraGenerator):
|
|
|
308
308
|
numpy.ndarray
|
|
309
309
|
Two-dimensional output data block of shape (num, ...)
|
|
310
310
|
"""
|
|
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
|
@@ -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
|
-
|
|
16
|
-
from traits.api import CArray, CInt, File, List, Property, Union, cached_property,
|
|
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 .
|
|
25
|
+
from .base import InOut, SamplesGenerator, SpectraGenerator
|
|
24
26
|
from .internal import digest
|
|
25
27
|
|
|
26
28
|
|
|
27
|
-
@deprecated_alias({'from_file': 'file'})
|
|
28
29
|
class Calib(InOut):
|
|
29
30
|
"""Processing block for handling calibration data in `*.xml` or NumPy format.
|
|
30
31
|
|
|
@@ -72,7 +73,6 @@ class Calib(InOut):
|
|
|
72
73
|
0.07458428+0.49657939j 1.772696 +3.92233098j 3.19543248+0.17988554j
|
|
73
74
|
0.3379041 -3.93342331j 0.93949242+2.5328611j 2.97352574+0.j ]]
|
|
74
75
|
|
|
75
|
-
Deprecated and will be removed in Acoular 25.10:
|
|
76
76
|
This class serves as interface to load calibration data for the used
|
|
77
77
|
microphone array. The calibration factors are stored as [Pa/unit].
|
|
78
78
|
"""
|
|
@@ -100,8 +100,9 @@ class Calib(InOut):
|
|
|
100
100
|
# Internal identifier
|
|
101
101
|
digest = Property(depends_on=['source.digest', 'data'])
|
|
102
102
|
|
|
103
|
-
@
|
|
104
|
-
def
|
|
103
|
+
@observe('data')
|
|
104
|
+
def _update_num_mics(self, event): # noqa ARG002
|
|
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
|
|
|
107
108
|
@cached_property
|
|
@@ -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
|
-
@
|
|
119
|
-
def
|
|
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,
|
|
140
|
+
while isinstance(tobj, InOut):
|
|
140
141
|
tobj = tobj.source
|
|
141
|
-
if isinstance(tobj,
|
|
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,
|
|
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]
|
acoular/configuration.py
CHANGED
|
@@ -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
|
-
|
|
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 '
|
|
@@ -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
|
-
|
|
71
|
+
Examples
|
|
72
72
|
--------
|
|
73
73
|
For using Acoular with h5py package and overwrite existing cache:
|
|
74
74
|
|
acoular/demo/__init__.py
CHANGED
acoular/demo/acoular_demo.py
CHANGED
|
@@ -33,28 +33,52 @@ Source Location RMS
|
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
def create_three_sources(mg, h5savefile='three_sources.h5'):
|
|
36
|
-
"""
|
|
37
|
-
|
|
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
|
-
|
|
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
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
pa = ac.Mixer(source=
|
|
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.
|
|
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
|
-
"""
|
|
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
|