[READ-ONLY] Mirror of https://github.com/jmrplens/phonometry. Standards-conformant acoustics library for Python: measurement and metrology, docs.jmrp.io/phonometry
phonometry docs calibration.md

← [Documentation index](README.md) # Calibration and dBFS phonometry can return results in physical **Sound Pressure Level (dB SPL)** or digital **decibels relative to Full Scale (dBFS)**. ## Why calibrate? The theory A digital recording only knows *numbers*: a full-scale sine wave is ±1.0 regardless of whether it was a whisper or a jet engine. To report physical sound pressure levels the chain microphone → preamplifier → ADC must be characterized by a single number, the **sensitivity factor** S, that converts digital units into pascals: $$ p(t) = S \ x(t) \qquad S = \frac{p_\text{ref} \cdot 10^{L_\text{cal}/20}}{\tilde{x}_\text{ref}} $$ where $L_\text{cal}$ is the calibrator's level (typically 94 dB, i.e. 1 Pa), $p_\text{ref} = 20\ \mu\text{Pa}$ and $\tilde{x}_\text{ref}$ is the RMS of the recorded calibration tone in digital units. `calculate_sensitivity()` is exactly that equation. The factor is valid as long as nothing in the chain changes — touch the gain knob and you must recalibrate. <picture><source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/jmrplens/phonometry/main/.github/images/diagram_calibration_setup_dark.svg"><img src="https://raw.githubusercontent.com/jmrplens/phonometry/main/.github/images/diagram_calibration_setup.svg" alt="Calibration chain: sound calibrator coupled on the microphone, preamplifier, ADC and calculate_sensitivity producing pascals per digital unit" width="92%"></picture> ## Physical Calibration (Sound Level Meter) ```mermaid flowchart LR A["Calibrator tone\n94 dB @ 1 kHz\n(IEC 60942)"] --> B["Recording\nref_signal"] B --> C["calculate_sensitivity()"] C --> D["calibration_factor\n(digital units → Pa)"] D --> E["octavefilter / leq / laeq / ln_levels"] F["Measurement\nrecording"] --> E E --> G["Levels in dB SPL\n(re 20 µPa)"] ``` To get accurate SPL measurements from a digital recording, you must first calculate the sensitivity of your measurement chain using a reference tone (e.g., 94 dB @ 1 kHz). ```python from…