Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/jmrplens/phonometry. Standards-conformant acoustics library for Python: measurement and metrology, docs.jmrp.io/phonometry
Something went wrong. Try again.
API Reference #
All core functionality can be imported directly from the phonometry package.
| Name | Type | Description (Inputs) | Usage Snippet (Outputs) |
|---|---|---|---|
octavefilter |
function |
High-level analysis. • x: Signal array• fs: Sample rate [Hz]• fraction: 1, 3, etc. (Default: 1)• order: Filter order (Default: 6)• limits: [f_min, f_max] (Default: [12, 20000])• filter_type: 'butter', 'cheby1', 'cheby2', 'ellip', 'bessel' (Default: 'butter')• sigbands: Return time signals (Default: False)• detrend: Remove DC offset (Default: True)• calibration_factor: Sensitivity multiplier (Default: 1.0)• dbfs: Output in dBFS instead of dB SPL (Default: False)• mode: 'rms' or 'peak' (Default: 'rms')• nominal: IEC 61260-1 nominal labels (Default: False)• show: Plot response (Default: False)• plot_file: Path to save plot (Default: None)• ripple: Passband ripple [dB] (for cheby1/ellip)• attenuation: Stopband atten. [dB] (Default: 72; for cheby2/ellip — cheby2 needs >= 70 dB for class 1) |
spl, freq = octavefilter(x, fs, ...)• spl: levels [dB]• freq: frequencies [Hz]With sigbands=True:spl, freq, xb = octavefilter(x, fs, sigbands=True)• xb: List of filtered signals (one per band)Calibrated usage: spl, f = octavefilter(x, fs, calibration_factor=0.05) |
OctaveFilterBank |
class |
Efficient bank implementation. • fs: Sample rate [Hz]• fraction: 1, 3, etc.• order: Filter order• limits: [f_min, f_max] (Default: [12, 20000])• filter_type: Architecture name• show: Plot response (Default: False)• plot_file: Path to save the plot (Default: None)• calibration_factor: Sensitivity multiplier• dbfs: Use dBFS (Default: False)• stateful: Carry filter state between calls (Default: False)• steady_ic: Steady-state initial conditions (Default: False)• resample: Multirate decimation (Default: True)• ripple: Passband ripple [dB]• attenuation: Stopband attenuation [dB] (Default: 72; cheby2 needs >= 70 dB for class 1) |
bank = OctaveFilterBank(fs=48000, fraction=3, order=6, filter_type='butter')spl, f = bank.filter(x, sigbands=False, mode='rms', detrend=True, zero_phase=False)• bank: Instance of the filter bank• bank.freq / bank.freq_d / bank.freq_u / bank.sos: computed properties |
OctaveFilterBank.spectrogram |
method |
Band levels over time. • x: Signal array (1D or 2D)• window_time: Window length [s] (Default: 0.125)• overlap: Fraction in [0, 1) (Default: 0.5)• mode: 'rms' or 'peak'• zero_phase: Group-delay-free frames (Default: False) |
levels, freq, times = bank.spectrogram(x)• levels: (bands, frames) or (channels, bands, frames)• times: window centers [s] |
weighting_filter |
function |
Acoustic weighting. • x: Signal array• fs: Sample rate [Hz]• curve: 'A', 'C', 'G' (ISO 7196 infrasound) or 'Z' (Default: 'A')• high_accuracy: IEC class 1 HF accuracy via internal oversampling (Default: True) |
y = weighting_filter(x, fs, curve='A')• y: weighted signal |
WeightingFilter |
class |
Reusable weighting filter. • fs: Sample rate [Hz]• curve: 'A', 'C', 'G' or 'Z'• stateful: Block processing (Default: False)• steady_ic: Steady-state initial conditions (Default: False)• high_accuracy: Defaults to True except stateful |
wf = WeightingFilter(fs, 'A')y = wf.filter(x) |
time_weighting |
function |
Energy capture. • x: Raw signal array (squared internally; time is the last axis)• fs: Sample rate [Hz]• mode: 'fast', 'slow', or 'impulse'• initial_state: None, 'zero', 'first', scalar, or array (Default: None) |
env = time_weighting(x, fs, mode='fast')• env: energy envelope (Mean Square), same shape as x |
TimeWeighting |
class |
Stateful time weighting. • fs: Sample rate [Hz]• mode: 'fast', 'slow', 'impulse' (Default: 'fast') |
tw = TimeWeighting(fs, mode='fast')env = tw.process(block) per blocktw.reset() to start over |
leq |
function |
Equivalent level (Leq). • x: Signal array (1D or 2D)• calibration_factor: Sensitivity multiplier (Default: 1.0)• dbfs: Output in dBFS (Default: False) |
level = leq(x, calibration_factor=s)• level: Scalar (1D) or per-channel array (2D) |
laeq |
function |
A-weighted Leq (LAeq). • x: Signal array (1D or 2D)• fs: Sample rate [Hz]• calibration_factor / dbfs: as leq |
level = laeq(x, fs, calibration_factor=s)• level: Scalar (1D) or per-channel array (2D) |
ln_levels |
function |
Statistical levels (LN). • x: Signal array (1D or 2D)• fs: Sample rate [Hz]• n: Exceedance percentiles (Default: (10, 50, 90))• mode: 'fast', 'slow', 'impulse' (Default: 'fast')• weighting: 'A', 'C', 'G', 'Z' or None (Default: None)• calibration_factor / dbfs: as leq |
stats = ln_levels(x, fs, n=(10, 50, 90), weighting='A')• stats: Dict {10: L10, 50: L50, 90: L90} |
lc_peak |
function |
C-weighted peak (LCpeak). • x: Signal array (1D or 2D)• fs: Sample rate [Hz]• calibration_factor: as leq• dbfs: 0 dBFS = full-scale peak (amplitude 1.0), unlike the RMS reference of leq• oversample: HF inter-sample peak recovery (Default: 8; 1 = on-grid, under-reads up to ~1.15 dB at 48 kHz) |
peak = lc_peak(x, fs)• IEC 61672-1 §5.13; verified against Table 5 |
sel |
function |
Sound exposure level (SEL/LAE). • x: Whole-event signal (1D or 2D)• fs: Sample rate [Hz]• weighting: 'A', 'C', 'G', 'Z' or None (Default: None)• calibration_factor / dbfs: as leq |
lae = sel(x, fs, weighting='A')• Event level normalized to 1 s |
sound_exposure |
function |
A-weighted exposure E (IEC 61252). • x: Signal (1D or 2D)• fs: Sample rate [Hz]• duration_hours: exposure period represented (Default: recording length)• calibration_factor |
E = sound_exposure(x, fs, duration_hours=8)• E: Pa²·h |
lex_8h |
function |
Daily exposure LEX,8h / LEP,d. • Same params as sound_exposure |
lex = lex_8h(x, fs, duration_hours=4)• Normalized 8 h level [dB] |
loudness_zwicker |
function |
Zwicker loudness (ISO 532-1:2017). • x: Calibrated signal in Pa (1D)• fs: Sample rate [Hz]• field: 'free' or 'diffuse' (Default: 'free')• stationary: Clause 5 stationary method (Default: False)• calibration_factor: Digital units to Pa (Default: 1.0) |
res = loudness_zwicker(x, fs)• ZwickerLoudness; time-varying runs add N5/N10 and the 500 Hz N(t) trace |
loudness_zwicker_from_spectrum |
function |
Stationary loudness from band levels. • levels: 28 one-third-octave levels, 25 Hz-12.5 kHz [dB SPL]• field: 'free' or 'diffuse' (Default: 'free') |
res = loudness_zwicker_from_spectrum(levels)• res.loudness [sone], res.loudness_level [phon] |
ZwickerLoudness |
dataclass |
Loudness result. • loudness: N [sone]• loudness_level: LN [phon]• specific: N′(z), 240 bins of 0.1 Bark• n5 / n10: percentile loudness (time-varying only)• time / loudness_vs_time: 500 Hz trace |
res.loudness, res.n5• Time-varying fields are None for stationary results |
sharpness_din |
function |
Sharpness in acum (DIN 45692). • x: Signal (1D)• fs: Sample rate [Hz]• field: 'free' or 'diffuse' (Default: 'free')• method: 'din', 'aures' or 'bismarck' (Default: 'din')• calibration_factor: Digital units to Pa (Default: 1.0) |
s = sharpness_din(x, fs)• s: sharpness [acum] |
sharpness_din_from_specific |
function |
Sharpness from a specific-loudness pattern. • specific: N′(z), 240 values at 0.1 Bark (e.g. ZwickerLoudness.specific)• method: 'din', 'aures' or 'bismarck' (Default: 'din') |
s = sharpness_din_from_specific(res.specific)• s: sharpness [acum] |
equal_loudness_contour |
function |
ISO 226:2023 equal-loudness contour. • phon: Loudness level, 20-90 phon |
freqs, spl = equal_loudness_contour(40.0)• SPL at the 29 preferred frequencies |
loudness_level |
function |
Loudness level of a pure tone (phon). • spl: Tone SPL [dB]• frequency: One of the 29 Table 1 frequencies [Hz] |
phon = loudness_level(73.0, 63.0) |
hearing_threshold |
function |
Threshold of hearing (ISO 226 Table 1). • (no parameters) |
freqs, tf = hearing_threshold() |
tone_to_noise_ratio |
function |
Tone-to-noise ratio (ECMA-418-1 §11). • x: Signal (1D)• fs: Sample rate [Hz]• tone_freq: Tone to assess [Hz] (Default: highest peak)• resolution_hz: FFT bin spacing (Default: 1.0) |
r = tone_to_noise_ratio(x, fs)• ToneAssessment(frequency, ratio_db, criterion_db, prominent) |
prominence_ratio |
function |
Prominence ratio (ECMA-418-1 §12). • Same params as tone_to_noise_ratio |
r = prominence_ratio(x, fs, tone_freq=1000)• ToneAssessment(...) |
ToneAssessment |
dataclass |
Tone prominence verdict. • frequency: Assessed tone [Hz]• ratio_db: TNR or PR [dB]• criterion_db: Prominence limit at that frequency [dB]• prominent: bool |
r = tone_to_noise_ratio(x, fs)if r.prominent: ... |
sti_from_impulse_response |
function |
Full STI, indirect method (IEC 60268-16 Ed. 5). • ir: Impulse response (1D)• fs: Sample rate [Hz] (>= 22500)• snr: SNR [dB], scalar or 7 bands (Default: None)• level: 7 speech band levels [dB SPL]; enables masking + reception threshold (Default: None)• ambient: 7 noise band levels [dB SPL]; requires level |
res = sti_from_impulse_response(ir, fs, snr=25.0)• STIResult with mtf (7×14) |
stipa |
function |
STIPA direct method (Annex B). • x: Recorded STIPA signal (1D), 15-25 s• fs: Sample rate [Hz] (>= 22500)• reference: Measured source signal instead of the nominal m = 0.55 (Default: None)• level / ambient: as sti_from_impulse_response• warns ( UserWarning) if the recording is < 15 s (STI biased low) |
res = stipa(recording, fs)• STIResult with mtf (7×2) |
stipa_signal |
function |
STIPA test-signal generator (A.4/A.6.1). • fs: Sample rate [Hz] (>= 22500)• seconds: Duration [s] (Default: 18.0)• level_db: RMS level [dB SPL] (Default: None → RMS 0.1)• seed: Pink-noise seed (Default: None) |
sig = stipa_signal(48000, seconds=18.0)• 1D test signal, Ed. 5 male spectrum |
STIResult |
dataclass |
STI result. • sti: 0 to 1• mti: band indices (7,)• mtf: corrected m values (7×14 or 7×2)• band_levels: levels used or None• rating: Annex F letter 'A+'…'U' |
res = stipa(x, fs)print(res.sti, res.rating) |
sound_intensity |
function |
p-p sound intensity (IEC 61043). • p1, p2: Microphone signals [Pa], equal length• fs: Sample rate [Hz]• spacing: Microphone separation Δr [m]• rho: Air density (Default: 1.204)• c: Speed of sound (Default: 343.0)• fraction: None, 1 or 3 (Default: None)• limits: [f_min, f_max] (Default: [12, 20000])• bias_correct: undo finite-difference under-read of band/broadband totals near max_valid_frequency (Default: False) |
res = sound_intensity(p1, p2, fs, spacing=0.012, fraction=3)• IntensityResult |
IntensityResult |
dataclass |
Intensity result. • Per band (with fraction): frequency, intensity [W/m²], intensity_level, pressure_level, pressure_intensity_index, direction (±1), bias_correction• Broadband: total_* counterparts• max_valid_frequency: 0.1·c/Δr |
res.total_intensity_levelres.total_direction |
field_indicators |
function |
ISO 9614-1 Annex A field indicators. • pressure_levels: Lpi per position [dB]• normal_intensity: Signed Ini per position [W/m²] |
fi = field_indicators(lp, i_n)• FieldIndicators(f2, f3, f4) |
dynamic_capability_index |
function |
Dynamic capability Ld (ISO 9614-1 §3.12). • pressure_residual_intensity_index: δpI0 [dB]• bias_error_factor: K [dB] (Default: 10.0) |
ld = dynamic_capability_index(18.0)• Adequate when Ld > F2 (criterion 1) |
CalibrationWarning |
warning class |
Unreliable calibration recording. Emitted by calculate_sensitivity — with fs given and validate=True — when the tone is unstable (IEC 60942 limit) or too short |
warnings.simplefilter("error", CalibrationWarning) |
lden |
function |
Day-evening-night level (ISO 1996-1 §3.6.4). • lday/levening/lnight: LAeq per period [dB]• hours: Period durations (Default: (12, 4, 8)) |
l = lden(63.2, 58.1, 51.4) |
ldn |
function |
Day-night level (ISO 1996-1 §3.6.5). • lday/lnight: LAeq per period [dB]• hours: Default (15, 9) |
l = ldn(63.2, 51.4) |
composite_rating_level |
function |
Whole-day composite rating (ISO 1996-1 §6.5). • periods: list of (level_db, hours, adjustment_db) summing 24 h |
r = composite_rating_level([(63, 12, 0), (58, 4, 5), (51, 8, 10)]) |
linkwitz_riley |
function |
Audio crossover. • x: Signal array• fs: Sample rate [Hz]• freq: Crossover frequency [Hz]• order: Any even number (Default: 4) |
lo, hi = linkwitz_riley(x, fs, freq=1000, order=4)• lo: Low-pass filtered signal• hi: High-pass filtered signal |
calculate_sensitivity |
function |
SPL Calibration. • ref_signal: Calibration signal• target_spl: Level of calibrator (Default: 94.0)• ref_pressure: Reference pressure (Default: 20e-6)• narrowband: coherent Goertzel tone estimate that rejects broadband hum/noise (needs fs; Default: False) |
s = calculate_sensitivity(ref_signal, target_spl=94.0)• s: Float (multiplier for pressure) |
verify_filter_class |
function |
IEC 61260-1:2014 class check. • bank: an OctaveFilterBank• num_points: frequency grid points per band (Default: 32768) |
result = verify_filter_class(bank)• result["overall_class"]: 1, 2 or None• result["bands"]: per-band class and margins [dB] |
getansifrequencies |
function |
ANSI Frequency generator. • fraction: 1, 3, etc. (Required)• limits: [f_min, f_max] (Default: [12, 20000]) |
f_cen, f_low, f_high, labels = getansifrequencies(fraction=3)• f_cen: List of center frequencies [Hz]• f_low: List of lower edges [Hz]• f_high: List of upper edges [Hz]• labels: IEC nominal frequency labels |
normalizedfreq |
function |
Standard IEC Frequencies. • fraction: 1 or 3 |
freqs = normalizedfreq(fraction=3)• freqs: List of standard center frequencies [Hz] |
sweep_signal |
function |
ESS excitation (ISO 18233 Annex B). • fs: Sample rate [Hz]• f1: Start frequency [Hz]• f2: Stop frequency [Hz] (≤ fs/2)• seconds: Duration [s]• amplitude: Peak (Default: 1.0)• fade: Half-Hann fraction (Default: 0.01) |
s = sweep_signal(48000, 20, 20000, 3.0)• 1D exponential sine sweep |
inverse_filter |
function |
Farina inverse filter for an ESS. • Same parameters as sweep_signal |
inv = inverse_filter(48000, 20, 20000, 3.0)• Time-reversed, +6 dB/oct compensated sweep |
impulse_response |
function |
Sweep deconvolution (ISO 18233 B.5). • recorded: Recorded response (1D)• reference: Emitted sweep (1D)• fs: Sample rate [Hz]• method: 'spectral' (Default) or 'farina'• f_range: (f1, f2) for 'farina'• regularization: Tikhonov term (Default: 1e-6)• length: causal samples (Default: len(recorded))• return_full: keep distortion tail (Default: False) |
ir = impulse_response(rec, sweep, fs)• 1D impulse response |
mls_signal |
function |
Maximum-length sequence (ISO 18233 Annex A). • order: Register length N, 2-20 |
mls = mls_signal(16)• Bipolar sequence, length 2**N − 1 |
mls_impulse_response |
function |
IR from a periodic MLS. • recorded: Response spanning whole MLS periods (1D)• mls: Excitation sequence• length: IR samples (Default: 2**N − 1) |
ir = mls_impulse_response(rec, mls)• Circular cross-correlation / averaging |
decay_curve |
function |
Schroeder decay curve (ISO 3382-1 5.3.3). • ir: Impulse response (1D)• fs: Sample rate [Hz]• band: Band centre [Hz] (Default: None → broadband)• fraction: 1 or 3 (Default: 1)• zero_phase: forward-backward band filtering, halves the 125 Hz short-T bias (Default: False) |
dc = decay_curve(ir, fs) → DecayCurvetime, level = dc still unpacks (time [s], level [dB], 0 dB at t=0)dc.plot() draws the decay + EDT/T20/T30 fits |
room_parameters |
function |
Room acoustics (ISO 3382-1/2). • ir: Impulse response (1D)• fs: Sample rate [Hz]• limits: (f_min, f_max) or None (Default: (125, 4000))• fraction: 1 or 3 (Default: 1)• zero_phase: forward-backward octave filtering, halves the 125 Hz short-T T30 bias (Default: False) |
res = room_parameters(ir, fs)• RoomAcousticsResult per band |
RoomAcousticsResult |
dataclass |
Per-band room parameters. • frequency [Hz]• edt, t20, t30 [s]• c50, c80 [dB], d50, ts [s]• dynamic_range [dB]• edt_valid/t20_valid/t30_valid• curvature [%] |
res.t30, res.c80, res.t30_valid• Arrays with one entry per band |
open_plan_metrics |
function |
Open-plan office metrics (ISO 3382-3). • positions_m: Source distances [m] (≥ 4)• spl_a_speech: A-weighted speech level per position [dB]• sti_values: STI per position |
m = open_plan_metrics(r, lp, sti)• OpenPlanResult |
OpenPlanResult |
dataclass |
Open-plan single numbers. • d2s: Spatial decay rate [dB/doubling]• lp_as_4m: Speech level at 4 m [dB]• rd: Distraction distance [m]• rp: Privacy distance [m] |
m.d2s, m.rd, m.rp• nan when undefined |
airborne_insulation |
function |
Field airborne insulation (ISO 16283-1). • l1/l2: Source/receiving levels [dB], 1D or (positions, bands)• t2: Receiving-room T per band [s]• area: Partition S [m²] (for R')• volume: Receiving V [m³] (for R')• t0: Reference T0 [s] (Default: 0.5) |
ins = airborne_insulation(l1, l2, t2, area=10, volume=50)• AirborneInsulationResult |
weighted_rating |
function |
Single-number rating + C/Ctr (ISO 717-1). • values_by_band: 16 thirds or 5 octaves [dB]• bands: 'third-octave', 'octave' or None |
w = weighted_rating(R)• WeightedRatingResult (Rw, C, Ctr) |
energy_average_level |
function |
Energy-average level (ISO 16283-1 (9)). • levels: Levels [dB] to average• axis: Averaging axis (Default: -1) |
L = energy_average_level([60, 66])• 10 lg( mean(10^(Li/10)) ) |
AirborneInsulationResult |
dataclass |
Field insulation per band. • d: Level difference D [dB]• dnt: Standardized DnT [dB]• r_prime: Apparent R' [dB] or None |
res.d, res.dnt, res.r_prime |
WeightedRatingResult |
dataclass |
Weighted rating result. • rating: Rw/DnT,w … [dB], int• c: Spectrum term C, int• ctr: Spectrum term Ctr, int• unfavourable_sum: [dB]• band_centers: Measured-curve centres [Hz] or None• measured: Measured band values [dB] or None• shifted_reference: Shifted Table 3 reference [dB] or None |
w.rating, w.c, w.ctr |
impact_insulation |
function |
Field impact insulation (ISO 16283-2). • li: Impact SPL [dB], 1D or (positions, bands)• t2: Receiving-room T per band [s]• volume: Receiving V [m³] (for L'n)• t0: Reference T0 [s] (Default: 0.5) |
imp = impact_insulation(li, t2, volume=50)• ImpactInsulationResult (l_n_t, l_n) |
weighted_impact_rating |
function |
Single-number impact rating + CI (ISO 717-2). • values_by_band: 16 thirds (100-3150 Hz) or 5 octaves (125-2000 Hz) [dB]• bands: 'third-octave', 'octave' or None |
r = weighted_impact_rating(imp.l_n_t)• ImpactRatingResult (Ln,w, CI); octave rating carries the -5 dB rule |
ImpactInsulationResult |
dataclass |
Impact insulation per band. • l_n_t: Standardized L'nT [dB]• l_n: Normalized L'n [dB] or None |
imp.l_n_t, imp.l_n |
ImpactRatingResult |
dataclass |
Weighted impact rating. • rating: Ln,w/L'n,w/L'nT,w [dB], int• ci: Spectrum term CI, int• unfavourable_sum: [dB]• band_centers: Measured-curve centres [Hz] or None• measured: Measured impact levels [dB] or None• shifted_reference: Shifted impact reference [dB] or None |
r.rating, r.ci |
sound_power_pressure |
function |
Sound power from surface pressure (ISO 3744/3746). • levels_positions: (NM, NB) SPL [dB]• surface: 'hemisphere' / 'box'• radius [m] or dimensions+distance [m]• reflecting_planes: 1/2/3 (Default: 1)• background_levels: for K1• frequencies [Hz]: for LWA• reverberation_time+room_volume / absorption_area / mean_absorption_coefficient+room_surface: for K2• grade: 'engineering' (Default) / 'survey'• omc_uncertainty [dB] (Default: 0) |
res = sound_power_pressure(levels, 'hemisphere', radius=1.5, frequencies=f)• SoundPowerResult |
measurement_positions |
function |
Hemisphere mic coordinates (ISO 3744 Annex B). • surface: 'hemisphere'• radius [m]• reflecting_planes: 1/2/3• tones: Table B.1 vs B.2 (Default: True)• grade: 'engineering'/'survey' |
xyz = measurement_positions('hemisphere', radius=1.5)• (N, 3) coordinates [m] |
background_noise_correction |
function |
Background correction K1 (ISO 3744 Eq. 16). • source_levels [dB]• background_levels [dB]• grade: 'engineering'/'survey' |
k1 = background_noise_correction(src, bg)• K1 per band [dB] |
environmental_correction |
function |
Environmental correction K2 (ISO 3744 Eq. A.2). • surface_area S [m²]• absorption_area A, or reverberation_time+room_volume, or mean_absorption_coefficient+room_surface |
k2 = environmental_correction(14.1, reverberation_time=0.6, room_volume=300)• K2 [dB] |
SoundPowerResult |
dataclass |
Surface-pressure sound power. • sound_power_level [dB]• surface_pressure_level, mean_pressure_level [dB]• background_correction, environmental_correction [dB]• directivity_index [dB] (NM, NB)• surface_area [m²]• sound_power_level_a [dB]• uncertainty [dB]• grade |
res.sound_power_level, res.sound_power_level_a |
sound_power_reverberation |
function |
Reverberation-room LW, direct (ISO 3741). • levels: mean room SPL [dB] (1D or (NM, NB))• t60 [s]• volume V [m³]• surface_area S [m²]• frequencies [Hz] (required)• background_levels: for K1• temperature [°C] (Default: 23)• static_pressure [kPa] (Default: 101.325) |
rev = sound_power_reverberation(lp, t60, 200, 220, f)• ReverberationSoundPowerResult |
sound_power_comparison |
function |
Reverberation-room LW, comparison (ISO 3741). • levels, levels_ref: room SPL [dB]• lw_ref: reference-source LW [dB]• frequencies [Hz]• background_levels, background_levels_ref• temperature, static_pressure |
cmp = sound_power_comparison(lp, lp_ref, lw_ref)• ReverberationSoundPowerResult (method='comparison') |
ReverberationSoundPowerResult |
dataclass |
Reverberation-room sound power. • frequencies [Hz] (or None)• sound_power_level [dB]• mean_pressure_level [dB]• absorption_area [m²]• waterhouse_correction [dB]• background_correction, c1, c2 [dB]• speed_of_sound [m/s]• sound_power_level_a [dB]• method |
rev.sound_power_level, rev.waterhouse_correction |
sound_power_intensity |
function |
Sound power by intensity scanning (ISO 9614-2). • normal_intensity: (N_seg, N_bands) [W/m²]• areas: segment Si [m²]• normal_intensity_2: 2nd sweep (criterion 3)• pressure_levels: for FpI• pressure_residual_index: δpI0 [dB]• frequencies [Hz]• band_type: 'third' (Default)/'octave'• grade: 'engineering'/'survey'• repeatability_limit: override s |
ir = sound_power_intensity(scan1, areas, frequencies=f, band_type='octave')• SoundPowerIntensityResult |
SoundPowerIntensityResult |
dataclass |
Scanning sound power. • partial_power, partial_power_level• sound_power, sound_power_level [dB] (NaN where negative_band)• negative_band: per-band bool (True where P ≤ 0)• surface_pressure_intensity_index (FpI)• negative_partial_power_index (F+/-)• repeatability, dynamic_capability_index (Ld)• achieved_grade• surface_area, sound_power_level_a, grade |
ir.sound_power_level, ir.achieved_grade |
absorption_area |
function |
Equivalent absorption area (ISO 354 Eq. 5/7). • t60: T [s]• volume V [m³]• temperature [°C] (Default: 20)• speed_of_sound [m/s] (overrides temperature)• m: air attenuation [1/m] (Default: 0) |
A = absorption_area(t60, volume=200)• A [m²] |
absorption_coefficient |
function |
Sound absorption coefficient (ISO 354 Eq. 9). • t1, t2: empty / with-specimen T [s]• volume V [m³]• sample_area S [m²]• temperature1/temperature2 [°C]• speed_of_sound1/2, m1/m2 |
a = absorption_coefficient(t1, t2, 200, 10.8)• α_s (unclamped, may exceed 1) |
attenuation_from_alpha |
function |
ISO 9613-1 α → m (ISO 354 8.1.2.1). • alpha: attenuation [dB/m] |
m = attenuation_from_alpha(0.01)• m = α/(10 lg e) [1/m] |
SoundPowerWarning |
warning class |
ISO 3744/3746/3741/9614-2 qualification issue. Emitted when the background margin is below the criterion, K2 exceeds the validity limit, a band's power is negative, or the room fails qualification; levels are then upper bounds |
warnings.simplefilter('error', SoundPowerWarning) |
AbsorptionWarning |
warning class |
ISO 354 advisory. Emitted for a room below 150 m³, a sample area outside 10-12 m², an out-of-range temperature, or a non-physical α_s ≤ 0; the result still returns |
warnings.simplefilter('error', AbsorptionWarning) |
.plot() |
method |
One-line canonical figure on every result object (soft matplotlib dependency). Available on ZwickerLoudness, STIResult, RoomAcousticsResult, DecayCurve, WeightedRatingResult, ImpactRatingResult, SoundPowerResult, ReverberationSoundPowerResult, SoundPowerIntensityResult and IntensityResult.• ax: existing Axes, or None to build a fresh figure (Default: None)• returns the Matplotlib Axes (an array of Axes for multi-panel figures); never calls plt.show()• needs matplotlib ( pip install phonometry[plot]) |
res.plot()decay_curve(ir, fs).plot() |
Notes #
zero_phase=True(inOctaveFilterBank.filterandspectrogram) filters forward-backward (sosfiltfilt): no group delay, doubled effective attenuation, offline analysis only. Incompatible withstateful=True. The passband also narrows, lowering the measured broadband band level by ~0.2 to 0.3 dB per band (a pure in-band tone is unaffected); prefer forward filtering when the absolute band SPL must match single-pass conventions, and reserve zero-phase for when the temporal envelope matters (e.g. reverberation decay).mode='peak'includes the filter's onset transient; a tone that starts abruptly can overshoot by ~1 dB. See Calibration and dBFS.octavefilter()caches filter bank designs internally (32 entries), so repeated calls with the same parameters skip the design phase. For explicit control useOctaveFilterBank.