Ir al contenido

emission.free_field_qualification

La referencia de la API se publica en inglés en los dos idiomas: se genera a partir de los docstrings del código, que son su texto original.

Qualification of an anechoic or hemi-anechoic room by the inverse square law: ISO 26101:2017, with ISO 3745:2012 Annex A as Amendment 1:2017 rewrote it.

A free field is judged by how the level falls away from a small source. Along each straight microphone traverse the measured level at the distance from the mathematical origin of the traverse is compared with the inverse square law

and the deviation at every point is

where has been corrected for the stability of the source with the monitor microphone, (Formula (1)). The room is qualified out to the largest distance from the origin at which every deviation, on every traverse and at every frequency, stays inside the limits of Table A.1 (the same table in ISO 26101 Annex A and in the amended ISO 3745 Annex A): , and dB in an anechoic room for the one-third octave bands up to 630 Hz, from 800 Hz to 5 000 Hz and from 6 300 Hz up, and , and dB in a hemi-anechoic one.

The fit of b. Formula (2) leaves the source strength free: it “is adjusted to optimize the fit of the measured sound pressure levels into the tolerance range, to maximize the qualified distance from the test sound source”. Note 1 offers the mean of as a starting value for an iterative search (Formula (3)); no source prints the search. This module does not iterate, because the problem it poses has an exact answer. Write , so that . The points out to a distance fit inside for some exactly when the spread of their is at most , and the spread over the points nearer than can only grow with . So, for one traverse and one frequency, the qualified distance is the distance of the last point of the longest run from the origin whose spread stays within , and every in over that run qualifies it. Of those the module takes the midpoint, , the one that leaves the same margin to both limits and so the smallest largest deviation. A qualified distance cannot be extended by any other , and no search can find a longer one.

The mathematical origin. ISO 26101:2017 5.1.3.2 and the amended ISO 3745 A.3.3 require every traverse to share one mathematical origin, and that origin to lie within the physical volume the test source occupies; the 2012 annex had instead fitted a collinear acoustic-centre offset per traverse. Given a fixed origin, the distances follow from the measured positions. Given the box the source occupies, the origin is searched inside it for the largest radius of A.2.4, the smallest qualified distance over every traverse and every frequency, since that is the distance Formula (2) asks to maximize and A.2.4 defines from the origin. A qualified distance ends either where a deviation leaves Table A.1, which the room decides, or at the last point measured, which the measurement decides; moving the origin inside the box moves the distance to that last point by as much as the origin moves, which says nothing about the room. So the search ranks origins by that smallest distance with every run that reaches its last point counted at the distance of that point from the centre of the box, the same for every origin: radii then differ only where the room ends a run, and radii within the 1 mm to which the search resolves the origin count as equal. Ties are broken by how much of the Table A.1 band the curves fill on average (the mean over every traverse and frequency of the half spread of as a share of its limit), then by the nearer point to the centre of the box; the mean, rather than the worst band, keeps one band from dragging the origin to the edge of the source at the others’ expense when nothing else separates two origins. In an exact inverse-square field every run reaches its last point, the curves are flattest seen from the point the field diverges from, and the search returns that point. The radius reported is always the distance from the origin returned. The search is a regular lattice of five points per axis followed by a compass search that halves its step down to 1 mm; it is deterministic, stays inside the box by construction and never returns a worse origin than the best lattice point.

What the verdict judges. check_free_field holds the qualification to the amended ISO 3745 Annex A and to the clauses of ISO 26101 it defers to: the deviations of A.2.2 and the radius of A.2.4; the frequencies of A.2.3 (100 Hz to 10 000 Hz, one-third octave bands below 125 Hz and above 4 000 Hz and octave mid-band frequencies between); five to eight traverses (A.3.3), towards the five targets a) to e) of A.3.3 and in the working area, within the angular limits of the source directionality in a hemi-anechoic room; at least 10 points on each traverse and 50 in total within the radius, equally spaced at each frequency, and spaced at most a tenth of a wavelength below 250 Hz and 100 mm above (A.4.3); the spatial resolution of ISO 26101 A.4.3 and the traverse length of ISO 26101 5.1.4.3, which A.2.4 cites; the 6 dB above background of ISO 26101 5.1.2.2 c); the directionality of the test source (ISO 26101 Annex B, verify_source_directionality); and, in a hemi-anechoic room, the reflecting plane of A.2.5. A requirement whose data were not given is listed in FreeFieldCheck.not_judged, and the verdict does not pass until it is judged.

Two readings are this module’s, since no source settles them. The spacing rules of A.4.3 name a frequency below which a tenth of a wavelength applies and above which a fixed length does (250 Hz and 100 mm in the amended ISO 3745, 1 kHz and 25 mm in ISO 26101), and neither says which holds at the edge itself; the one-third octave band that contains the edge frequency is held to the stricter of the two. And “equally spaced” comes with no tolerance: the points within the radius are equally spaced when, walking out from the first, every next point of the grid lies within a tenth of the median gap of where one step would put it. Points between two of them are the additional measurements the last paragraph of A.4.3 recommends near a peak deviation, and do not break the grid.

Auto-generated from the source docstrings by scripts/generate_api_docs.py (make api-docs). Do not edit by hand.

check_free_field(
results: InverseSquareLawResult | Sequence[InverseSquareLawResult],
*,
bandwidth: Literal['discrete-frequency', 'broadband'],
source_directionality: SourceDirectionalityResult | Sequence[SourceDirectionalityResult | None] | None = None,
measurement_radius_m: float | None = None,
reflecting_plane_absorption_coefficient: float | None = None,
reflecting_plane_margin_m: float | None = None,
paths_in_working_area: bool | np.bool_ | None = None,
speed_of_sound: float = 343.0,
) -> FreeFieldCheck

Is this room anechoic or hemi-anechoic enough for ISO 3745? (Annex A as amended).

Judges the inverse-square-law analysis of one or more test sources (inverse_square_law_deviations) against the amended ISO 3745:2012 Annex A and the ISO 26101:2017 clauses it defers to (see the module notes). The radius of A.2.4 is the smallest qualified distance over every traverse and every evaluated frequency; the per-band requirements are judged within it. When the full range fails, the widest contiguous range that meets every requirement is reported as the reduced range A.2.3 allows, “in conformity” but not “in full conformity”.

Parameters

Name Description
results One InverseSquareLawResult per test source, their frequencies disjoint, all for the same room.
bandwidth "discrete-frequency" (the default of A.4.1, tones or a narrow-band analysis) or "broadband" (noise in one-third octave bands, sufficient only for sources that radiate broadband noise).
source_directionality The verify_source_directionality result of each test source (one, or a sequence aligned with results); None leaves ISO 26101 Annex B unjudged.
measurement_radius_m The radius of the measurement surface to be used, in metres; the room must be qualified at least that far.
reflecting_plane_absorption_coefficient The largest sound absorption coefficient of the reflecting plane over the frequency range (A.2.5), hemi-anechoic only.
reflecting_plane_margin_m How far the reflecting plane extends beyond the projection of the measurement surface, in metres (A.2.5), hemi-anechoic only.
paths_in_working_area Whether the traverse paths lie in the working area of the room, the part normally used for measurements (A.3.3); a declaration, since the positions cannot tell. None leaves it unjudged. The targets of A.3.3 a) to e) are read from MicrophoneTraverse.targets.
speed_of_sound Speed of sound, in m/s, for the wavelengths of A.4.3, ISO 26101 5.1.4.3 and A.2.5 (default 343).

Returns: FreeFieldCheck.

Raises

Exception When
ValueError for results of different rooms, a frequency given to two sources, directionality results that do not align with results, an unknown bandwidth, an absorption coefficient outside 0 to 1, or a margin that is not finite.
TypeError for a working-area declaration that is not True, False or None (a NumPy truth value is one), or a bandwidth that is not a text.
directionality_positions(
room: Literal['anechoic', 'hemi-anechoic'],
*,
radius: float = 1.5,
) -> NDArray[np.float64]

Microphone positions of the directionality test (ISO 26101 B.3.2).

The angle of elevation is counted from the vertical above the source (90 deg is the reflecting plane), the azimuth from the x axis. The rows run = 80, 60, 40 and 20 deg (then 100, 120, 140 and 160 deg in an anechoic room), and within each = 0 to 315 deg in steps of 45 deg: 32 positions in a hemi-anechoic room, 64 in an anechoic one (Figure B.1).

Parameters

Name Description
room "anechoic" or "hemi-anechoic".
radius The radius, in metres; 1.5 m in B.3.2.

Returns: (32, 3) or (64, 3) coordinates, in metres.

Raises

Exception When
TypeError if radius is not a single number, or room is not a text.
directionality_tolerance(
frequencies: float | np.floating[Any] | np.integer[Any],
*,
room: Literal['anechoic', 'hemi-anechoic'],
) -> float
directionality_tolerance(
frequencies: Sequence[float] | Sequence[np.floating[Any]] | Sequence[np.integer[Any]] | NDArray[np.bool_ | np.integer[Any] | np.floating[Any]],
*,
room: Literal['anechoic', 'hemi-anechoic'],
) -> NDArray[np.float64]
directionality_tolerance(
frequencies: NumericArrayLike,
*,
room: Literal['anechoic', 'hemi-anechoic'],
) -> float | NDArray[np.float64]

Allowable deviation of the test source directionality (ISO 26101 Table B.1).

Parameters

Name Description
frequencies One-third octave mid-band frequencies, in hertz.
room "anechoic" or "hemi-anechoic".

Returns: The half-width of the tolerance band, in dB, per frequency. A float for a number, an array for a sequence or an array, a zero-dimensional one included.

Raises

Exception When
ValueError for an unknown room, a non-positive frequency or frequencies that are not one value or a 1-D array.
TypeError if room is not a text, or frequencies holds a text or a value that is not a real number.
FreeFieldCheck(
*,
bandwidth: Literal['discrete-frequency', 'broadband'],
results: tuple[InverseSquareLawResult, ...],
source_directionality: tuple[SourceDirectionalityResult | None, ...],
measurement_radius_m: float | None,
reflecting_plane_absorption_coefficient: float | None,
reflecting_plane_margin_m: float | None,
paths_in_working_area: bool | None,
speed_of_sound: float,
)

Whether a room qualifies as anechoic or hemi-anechoic for ISO 3745.

The verdict of the amended ISO 3745:2012 Annex A over the frequencies evaluated, with the ISO 26101:2017 clauses it defers to. Every per-band array is aligned with frequencies (ascending) and judged within max_qualified_radius_m.

Every verdict, the radius and the reduced range are read from the analyses and the declarations the check holds, against the figures the two standards print, so they are not fields: a check cannot be built to qualify a room its traverses do not qualify. The reading is done once, when the check is built.

Attributes

Name Description
bandwidth "discrete-frequency" or "broadband" (A.4.1): a room qualified with broadband noise is qualified only for sources that radiate broadband noise.
results The inverse-square-law analysis of each test source.
source_directionality The verify_source_directionality result of each test source, aligned with results, None for a source whose directionality was not judged.
measurement_radius_m The measurement radius to be used, if given.
reflecting_plane_absorption_coefficient The largest sound absorption coefficient of the reflecting plane (A.2.5), or None; always None in an anechoic room.
reflecting_plane_margin_m How far the reflecting plane extends beyond the projection of the measurement surface (A.2.5), in metres, or None; always None in an anechoic room.
paths_in_working_area Whether the traverse paths lie in the working area of the room (A.3.3), as declared, or None.
speed_of_sound Speed of sound, in m/s, for the wavelengths of A.4.3, ISO 26101 5.1.4.3 and A.2.5.

property

Levels at least 6 dB above the background at every point, per band.

ISO 26101 5.1.2.2 c); None when a traverse came without background.

property

Per band, whether every judged per-band requirement is met.

Returns: One boolean per evaluated frequency.

property

The distance to which each frequency is qualified on every traverse, in metres.

property

The radius qualified over conforming_range_hz, in metres, or nan.

property

The widest contiguous range over which every judged requirement is met.

In the A.2.3 sense, (low, high) in hertz, or None; with not_judged empty it is the reduced range A.2.3 lets a report state “in conformity”.

property

The test source within Table B.1 in the band.

None without a directionality result for its source.

property

Whether the qualification holds for tonal sources too (A.4.1).

Returns: True for a discrete-frequency qualification.

property

The points of every traverse within the radius equally spaced at the frequency, per band.

A.4.3 and ISO 26101 5.1.4.3; points added between two of them near a peak deviation are allowed (see the module notes for the tolerance).

property

Every evaluated frequency, ascending, in hertz.

property

Whether every frequency A.2.3 requires from 100 Hz to 10 000 Hz was evaluated.

property

Spacing at most a tenth of a wavelength below 1 kHz and 25 mm above, per band.

ISO 26101 A.4.3, cited by A.2.4; the band that contains 1 kHz is held to the stricter of the two.

property

Traverse starting at most, and running at least, a quarter wavelength at the lowest frequency, per band.

ISO 26101 5.1.4.3.

property

The A.2.4 radius over every evaluated frequency, in metres.

property

The requirements without data, by name.

property

Whether the room is qualified in full conformity with ISO 3745.

Every requirement judged and met at every evaluated frequency, the whole of 100 Hz to 10 000 Hz evaluated (A.2.3), and the measurement radius, if given, within the qualified one.

Returns: True for a room in full conformity.

property

In a hemi-anechoic room, every traverse within 20 deg to 80 deg from the vertical.

The directionality test’s angles (A.3.3); None in an anechoic room, where A.3.3 sets no such limit.

property

Every source has traverses towards each of the five targets of A.3.3 a) to e).

None when a source names no target on any traverse.

FreeFieldCheck.plot(
ax: Axes | None = None,
*,
language: Literal['en', 'es'] = 'en',
**kwargs: Any,
) -> Axes

Draw the qualified distance per frequency against the radius judged.

Parameters

Name Description
ax Existing axes, or None to create a figure.
language Label language, "en" (default) or "es".
kwargs Forwarded to the radius bars.

Returns: The axes.

property

At least 10 points on each traverse and 50 in total within the radius (A.4.3), per band.

property

A.2.5 in a hemi-anechoic room, None when not judged or in an anechoic room.

property

"anechoic" or "hemi-anechoic", the room of the analyses.

property

Spacing at most a tenth of a wavelength below 250 Hz and 100 mm above, per band.

Amended ISO 3745 A.4.3; the band that contains 250 Hz is held to the stricter of the two.

property

Five to eight traverses for every source (A.3.3).

property

The traverse paths lie in the working area of the room (A.3.3), as declared.

None when not declared.

inverse_square_law_deviations(
traverses: Sequence[MicrophoneTraverse],
*,
frequencies: NumericArrayLike,
room: Literal['anechoic', 'hemi-anechoic'],
origin_m: NumericArrayLike | None = None,
source_box_m: NumericArrayLike | None = None,
) -> InverseSquareLawResult

Deviations from the inverse square law along the traverses of one source.

Applies Formula (1) with the monitor microphone, then Formulae (2) and (4) with the source strength that maximizes the qualified distance under the Table A.1 limits of room (see the module notes: the midpoint of the admissible interval, an exact rather than an iterative answer), and reports the starting value of Formula (3) beside it.

One call covers one test source: ISO 26101 5.1.2.2 allows two or more to span the frequency range, each with its own mathematical origin, and check_free_field takes one result per source.

Parameters

Name Description
traverses The straight traverses, all measured at frequencies.
frequencies The test frequencies (tones or one-third octave mid-bands), in hertz, one per level column.
room "anechoic" or "hemi-anechoic", which selects the Table A.1 limits.
origin_m The mathematical origin of every traverse, (x, y, z) in metres; None with no source_box_m takes the room frame’s origin.
source_box_m The box the test source physically occupies, as ((x_min, y_min, z_min), (x_max, y_max, z_max)) in metres; the origin is then searched inside it (ISO 26101 5.1.3.2, ISO 3745 A.3.3). A zero extent on an axis holds the origin on that coordinate.

Returns: InverseSquareLawResult.

Raises

Exception When
ValueError if both origin_m and source_box_m are given, a traverse’s level columns do not match the frequencies, a traverse has no level at a frequency, or a point coincides with the origin.
TypeError if room is not a text, or frequencies, origin_m or source_box_m holds a text or a value that is not a real number.
inverse_square_law_tolerance(
frequencies: float | np.floating[Any] | np.integer[Any],
*,
room: Literal['anechoic', 'hemi-anechoic'],
) -> float
inverse_square_law_tolerance(
frequencies: Sequence[float] | Sequence[np.floating[Any]] | Sequence[np.integer[Any]] | NDArray[np.bool_ | np.integer[Any] | np.floating[Any]],
*,
room: Literal['anechoic', 'hemi-anechoic'],
) -> NDArray[np.float64]
inverse_square_law_tolerance(
frequencies: NumericArrayLike,
*,
room: Literal['anechoic', 'hemi-anechoic'],
) -> float | NDArray[np.float64]

Allowable deviation from the inverse square law per band (Table A.1).

ISO 26101:2017 Annex A and ISO 3745:2012/Amd.1:2017 A.2.2 print the same table. A frequency is read in the one-third octave band that contains it, so a tone at 794 Hz is held to the 800 Hz row.

Parameters

Name Description
frequencies Test frequencies or band mid-frequencies, in hertz.
room "anechoic" or "hemi-anechoic".

Returns: The half-width of the tolerance band, in dB, per frequency. A float for a number, an array for a sequence or an array, a zero-dimensional one included.

Raises

Exception When
ValueError for an unknown room, a non-positive frequency or frequencies that are not one value or a 1-D array.
TypeError if room is not a text, or frequencies holds a text or a value that is not a real number.
InverseSquareLawResult(
frequencies: NDArray[np.float64],
room: Literal['anechoic', 'hemi-anechoic'],
origin_m: NDArray[np.float64],
origin_fitted: bool,
source_box_m: NDArray[np.float64] | None,
traverse_names: tuple[str, ...],
traverse_targets: tuple[tuple[Literal['dihedral corner', 'trihedral corner', 'boundary center', 'closest boundary', 'unique features'], ...], ...],
positions_m: tuple[NDArray[np.float64], ...],
distances: tuple[NDArray[np.float64], ...],
levels: tuple[NDArray[np.float64], ...],
background_margin_db: tuple[NDArray[np.float64] | None, ...],
source_stability_db: tuple[NDArray[np.float64], ...],
source_strength_db: NDArray[np.float64],
initial_source_strength_db: NDArray[np.float64],
deviations_db: tuple[NDArray[np.float64], ...],
traverse_radius_m: NDArray[np.float64],
band_radius_m: NDArray[np.float64],
)

Deviations from the inverse square law of one test source (ISO 26101 5.1.5).

Attributes

Name Description
frequencies The test frequencies, in hertz, as given.
room "anechoic" or "hemi-anechoic".
origin_m The mathematical origin of the traverses, (x, y, z) in metres.
origin_fitted True when the origin was searched inside source_box_m.
source_box_m The box the test source occupies, (2, 3) rows of lower and upper corner, or None for a fixed origin.
traverse_names The label of each traverse as given, "" when none was.
traverse_targets What each traverse was selected towards (A.3.3 a) to e)), as given. Each one of "dihedral corner", "trihedral corner", "boundary center", "closest boundary" or "unique features".
positions_m The measurement points of each traverse, (N, 3).
distances The distance of each point from the origin, in metres.
levels of each traverse after the stability correction of Formula (1), (N, NF), nan where not measured.
background_margin_db less the background at each point, (N, NF), or None for a traverse without background.
source_stability_db The largest excursion of the monitor microphone from its reading at point 0, per frequency, or nan without a monitor.
source_strength_db of Formula (2) per traverse and frequency, (NT, NF): the midpoint of the admissible interval over the points within band_radius_m (over the traverse’s own qualified run when its first point lies beyond that radius).
initial_source_strength_db The starting value of Formula (3), the mean of over every point, (NT, NF).
deviations_db of Formula (4) at every point, (N, NF) per traverse.
traverse_radius_m The qualified distance of each traverse at each frequency, (NT, NF), in metres.
band_radius_m The distance to which each frequency is qualified on every traverse at once, (NF,), in metres.

InverseSquareLawResult.largest_deviation_db

Section titled “InverseSquareLawResult.largest_deviation_db”

property

The largest within each band’s radius.

Returns: One value per frequency, in dB.

InverseSquareLawResult.max_qualified_radius_m

Section titled “InverseSquareLawResult.max_qualified_radius_m”

property

The largest radius every traverse meets at every frequency (A.2.4).

Returns: The smallest of band_radius_m, in metres.

InverseSquareLawResult.plot(
ax: Axes | None = None,
*,
frequency_hz: float | None = None,
language: Literal['en', 'es'] = 'en',
**kwargs: Any,
) -> Axes

Draw the deviations along every traverse at one frequency.

Parameters

Name Description
ax Existing axes, or None to create a figure.
frequency_hz The test frequency to draw; None draws the one qualified to the shortest distance.
language Label language, "en" (default) or "es".
kwargs Forwarded to the deviation curves.

Returns: The axes.

Raises

Exception When
TypeError if frequency_hz is not one real number.

property

The Table A.1 limit of each frequency, in dB, read from the room.

Returns: inverse_square_law_tolerance of frequencies in room.

MicrophoneTraverse(
*,
positions_m: NumericArrayLike,
levels: NumericArrayLike,
monitor_levels: NumericArrayLike | None = None,
background_levels: NumericArrayLike | None = None,
name: str = '',
targets: Literal['dihedral corner', 'trihedral corner', 'boundary center', 'closest boundary', 'unique features'] | Sequence[Literal['dihedral corner', 'trihedral corner', 'boundary center', 'closest boundary', 'unique features']] = (),
)

One straight microphone traverse of ISO 26101:2017 5.1.3.2.

Attributes

Name Description
positions_m The measurement points, one row per point, as (x, y, z) coordinates in metres in the room frame: z points up and, in a hemi-anechoic room, the reflecting plane is z = 0. The mathematical origin of the traverse is given to inverse_square_law_deviations in the same frame.
levels The measured sound pressure level at each point, one row per point and one column per test frequency, in dB. A nan marks a point not measured at that frequency, which is how a spacing that changes with frequency is written (ISO 3745 A.4.3 asks for equally spaced points at each frequency). Every other level is finite.
monitor_levels The monitor microphone level recorded with each point, same shape; the first row is the level for the initial point 0, which every point is corrected to. It is finite wherever a level was measured and in the first row of every frequency measured. None applies no stability correction.
background_levels The background level at each point, same shape, or one row for the whole traverse, finite wherever a level was measured; None leaves the 6 dB requirement of ISO 26101 5.1.2.2 c) unjudged.
name A label for the traverse (the path it follows: a dihedral corner, the nearest wall, a door).
targets What the path is selected towards, among the five of the amended ISO 3745 A.3.3 a) to e): "dihedral corner", "trihedral corner", "boundary center" (the centre of the most uniform boundary surface), "closest boundary" and "unique features" (a door, a window, a ventilation opening). One path may serve more than one target, as A.3.3 NOTE 1 allows for c) and d); an empty tuple names none. Each one of "dihedral corner", "trihedral corner", "boundary center", "closest boundary" or "unique features".

classmethod

MicrophoneTraverse.along(
direction: NumericArrayLike,
distances: NumericArrayLike,
levels: NumericArrayLike,
*,
start_m: NumericArrayLike = (0.0, 0.0, 0.0),
monitor_levels: NumericArrayLike | None = None,
background_levels: NumericArrayLike | None = None,
name: str = '',
targets: Sequence[Literal['dihedral corner', 'trihedral corner', 'boundary center', 'closest boundary', 'unique features']] = (),
) -> MicrophoneTraverse

A traverse laid out along a straight line from start_m.

Parameters

Name Description
direction The direction of the path, any non-zero 3-vector.
distances The distance of each point from start_m along the path, in metres.
levels One row per point, one column per frequency, in dB.
start_m The point the distances are counted from, in metres; the room frame’s origin by default.
monitor_levels As for the class.
background_levels As for the class.
name As for the class.
targets As for the class. Each one of "dihedral corner", "trihedral corner", "boundary center", "closest boundary" or "unique features".

Returns: The traverse.

Raises

Exception When
ValueError for a direction that is zero or not finite.
TypeError if background_levels, direction, distances, levels, monitor_levels or start_m holds a text or a value that is not a real number.
qualification_frequencies(
low_hz: float = 100.0,
*,
high_hz: float = 10000.0,
) -> NDArray[np.float64]

The frequencies ISO 3745:2012/Amd.1:2017 A.2.3 evaluates over a range.

Below 125 Hz and above 4 000 Hz every one-third octave band, between them the octave mid-band frequencies 125, 250, 500, 1 000, 2 000 and 4 000 Hz. The default range is the least A.2.3 allows, 100 Hz to 10 000 Hz: eleven frequencies.

Parameters

Name Description
low_hz Lowest band of the range, in hertz (read in its band).
high_hz Highest band of the range, in hertz.

Returns: The nominal frequencies to evaluate, ascending, in hertz.

Raises

Exception When
ValueError if the range is empty.
TypeError if high_hz or low_hz is not a single number.
SourceDirectionalityResult(
frequencies: NDArray[np.float64],
room: Literal['anechoic', 'hemi-anechoic'],
mean_level: NDArray[np.float64],
max_positive_deviation_db: NDArray[np.float64],
max_negative_deviation_db: NDArray[np.float64],
)

Whether a test source is uniform enough to qualify a room (ISO 26101 B.4).

Attributes

Name Description
frequencies The one-third octave mid-band frequencies, in hertz.
room The room type the source is to qualify. One of "anechoic" or "hemi-anechoic".
mean_level The arithmetic mean of the decibel levels per band.
max_positive_deviation_db The largest level above the mean.
max_negative_deviation_db The largest level below the mean, a negative number.

property

Whether the directionality is within Table B.1 in every band.

Returns: True when every band is within its limit.

SourceDirectionalityResult.plot(
ax: Axes | None = None,
*,
language: Literal['en', 'es'] = 'en',
**kwargs: Any,
) -> Axes

Draw the extreme deviations per band against Table B.1.

Parameters

Name Description
ax Existing axes, or None to create a figure.
language Label language, "en" (default) or "es".
kwargs Forwarded to the deviation bars.

Returns: The axes.

property

The Table B.1 limit per band, in dB, read from the room.

Returns: directionality_tolerance of frequencies in room.

SourceDirectionalityResult.within_tolerance

Section titled “SourceDirectionalityResult.within_tolerance”

property

Per band, whether both extreme deviations are within Table B.1.

Returns: One boolean per band.

verify_source_directionality(
levels: NumericArrayLike,
*,
frequencies: NumericArrayLike,
room: Literal['anechoic', 'hemi-anechoic'],
) -> SourceDirectionalityResult

May this source qualify an anechoic or hemi-anechoic room? (ISO 26101 Annex B).

The one-third octave band levels are measured at the 32 positions of a hemisphere or the 64 of a sphere of radius 1.5 m (directionality_positions). Per band, the arithmetic mean of the decibel levels and the largest positive and negative deviations from it are computed (B.3.2); the source is suitable when every deviation is within Table B.1 (B.4). The amended ISO 3745 A.3.1 lets the measurement be made in the room being qualified.

Parameters

Name Description
levels One row per position (32 hemi-anechoic, 64 anechoic), one column per band, in dB; a 1-D array is one band.
frequencies The one-third octave mid-band frequencies, in hertz.
room "anechoic" or "hemi-anechoic".

Returns: SourceDirectionalityResult.

Raises

Exception When
ValueError for the wrong number of positions, levels that are not finite, or bands that do not match.
TypeError if room is not a text, or frequencies or levels holds a text or a value that is not a real number.