Skip to content

Release v4.0.0

Choose a tag to compare

@jmrplens jmrplens released this 17 Nov 11:43
39f1973

4.0.0 is the release where phonometry says what it is: a library of acoustics
in which every method is implemented from the text of its governing standard
and checked in CI against that standard's own tables and worked examples, with
a public API reorganised so that a name says what it is, in what unit, and
where it lives. It breaks on purpose and keeps no compatibility shims. Almost
every change fails at the import or at the call, and
Upgrading from 3.3 to 4.0
is the map, including the few places where the obvious fix is the wrong one;
each breaking item below points to its section there. Every rename returns
what its predecessor returned, and the numbers that did move are listed under
Changed and Fixed. phonometry 4.0.0 needs Python 3.12 or later (3.3.0 needed
3.13) and NumPy 2.0.2 or later.

The latest 4.x release is the supported one: 3.x and the 4.0.0rc1
pre-release get no further fixes. After 4.0.0, a name a release renames
keeps working, with a DeprecationWarning that names its replacement, until
the next major release.

Highlights

  • One address per name. The root publishes the 21 domain packages and four
    other names; everything else is imported from the package that owns it.
  • A name carries its unit, and a condition is written by name. Units sit
    in the names (temperature_c, static_pressure_kpa, thickness_m,
    duration_s), and every condition with a default and every flag is
    keyword-only.
  • Answers are records and verdicts are objects. No tuple of different
    quantities to unpack, and a verdict says passes and refuses to be a
    bool.
  • A choice means one thing. Every fixed option is a Literal, matched as
    it is written, checked on every path and, in a record, when the record is
    built; a type checker and the running code accept the same spellings.
  • Measurement audio is an input like any other. io.read returns a
    calibrated Signal that the filters, levels and estimators take as it is.
  • Simulations run on a GPU, on another machine and straight into a video,
    and an elastic solver joins the acoustic one.
  • Many more standards, in building and room acoustics, sound power,
    calibration, vibration, environmental noise, noise control and hearing.
  • Published catalogues of materials, read cell by cell from the books, and
    catalogues of your own from JSON or a spreadsheet.

Breaking changes

Imports and packages

  • Imports move down one level. The root exports the 21 subpackages,
    Signal, ReportMetadata, PhonometryWarning and __version__: write
    from phonometry import signals, then signals.leq. See the one
    rule
    .
  • Domains were regrouped. phonometry.environmental is
    phonometry.environment; metrology split into filters, signals and
    metrology; STI, STIPA, SII and STOI moved from hearing to the new
    phonometry.speech; sea_water_sound_speed and characteristic_impedance
    moved to fluids, and underwater.depth_to_pressure is
    fluids.depth_to_gauge_pressure_mpa, with the same number. See one
    address
    .
  • Module paths changed, and the old ones do not import. Most packages
    regrouped or renamed their modules (building.measurement,
    materials.absorbers, room.acoustics, ...); a 3.3.0 module path raises
    ImportError and a pickle whose classes moved does not load. The module
    moves do not change where a name is read from its package. See modules
    that split
    .
  • A module is never hidden behind a function of its own name, and every
    public module lists what it publishes; the constants and type aliases a
    module kept for itself are private or published elsewhere (room.NC_*,
    metrology.REFERENCE_VALUES). See modules and functions.

Names

  • A parameter that names a quantity carries its unit. temperature_c,
    relative_humidity_percent, static_pressure_kpa, thickness_m,
    distances_m, phase_rad, absorption_db_per_km, speed_kt, and
    constants such as REFERENCE_AREA_M2. See units in names.
  • One spelling per concept. speed_of_sound, frequencies, fs,
    n_<plural>, min_ and max_, x for a time signal, reference,
    coverage, fraction=1 or 3, "free" and "diffuse",
    weighting="Z", American English (center), in_situ, acronyms in
    capitals (ANPDatabase), and a standard's designation written one way
    (band_attenuation_arp5534, weighting_bs468). A duration ends in its
    unit: materials.adrienne_window takes flat_duration_s=,
    leading_duration_s= and trailing_duration_s=,
    StationarityTestResult.segment_duration_s and
    PileStrikeResult.pulse_duration_s are in seconds, and hearing.Task
    holds duration_range_hours and duration_observations_hours. See one
    spelling
    .
  • A function is named for what it returns. combine_uncertainties is
    metrology.combined_standard_uncertainty, air_attenuation_m is
    environment.air_power_attenuation_per_m, and
    environmental.expanded_uncertainty is
    environment.environmental_expanded_uncertainty (with coverage=). See
    what it returns.
  • A level carries no unit suffix, and a name says the quantity it holds.
    sensitivity_level_db is sensitivity_level, criterion_db is
    prominence_limit_db. See no suffix and the
    quantity
    .

Where the obvious fix is the wrong one

  • Two renames take another unit or fail late. The ISO 10534-2 air
    helpers took kelvin and their successors take Celsius, and
    underwater.transmission_loss is propagation_loss, whose result
    (PropagationLossResult) has .pl where .tl was, so the old field fails
    only where it is read; the normal-mode, parabolic-equation and sonar
    results and the sonar equations' transmission_loss= follow it. The
    ISO 17497-1 materials.speed_of_sound is
    materials.speed_of_sound_iso17497 and returns the same number;
    fluids.air() is another model, 343.99 m/s at 20 °C against 343.20 m/s,
    so switch to it only on purpose. Read this section first.
  • The air is one fluid= argument. The visco-thermal absorber models
    (Johnson-Champoux-Allard, Delany-Bazley, Miki, slits, Helmholtz resonators,
    perforated plates, layered_absorber), ground_effect,
    barrier_insertion_loss, atmospheric_parabolic_equation and the building
    panel functions take a fluids.Fluid instead of speed_of_sound=,
    air_density=, viscosity=, prandtl_number=, heat_capacity_ratio= and
    atmospheric_pressure=. The default, materials.ABSORBER_AIR, gives
    3.3.0's numbers. See one fluid=.

Calls

  • Conditions, flags and frequency axes are written by name. A
    temperature, humidity, pressure, speed of sound, density, ground factor or
    calibration factor with a default, every boolean flag, a frequency axis
    beside its values and the fields of the records you build and pass in are
    keyword-only. See written by name.
  • Signal-processing functions take their defining argument by name.
    linkwitz_riley(..., *, frequency), parametric_eq(..., *, sections),
    zoom_fft(..., *, f_min, f_max), lifter(..., *, cutoff),
    time_synchronous_average(..., *, period_s) and
    resample_signal(..., *, fs_new); fs may be left out for a Signal.
    See written by name.
  • The longest signatures take their options in records, so a 3.3.0
    keyword is not renamed but gone: octave_filter(x, fs, calibration_factor=k)
    raises TypeError. octave_filter and OctaveFilterBank take
    design=FilterDesign(filter_type=, ripple=, attenuation=, resample=),
    calibration=LevelCalibration(factor=, dbfs=),
    response_plot=ResponsePlot(show=, file=) and, on the bank,
    block_processing=BlockProcessing(stateful=, steady_ic=).
    microphone_characteristics takes MicrophoneDirectivity,
    MicrophoneNoise, MicrophoneOverload and MicrophoneElectrical, and a
    noise weighting that was a free label is "A" or "468" (ITU-R BS.468-4):
    "CCIR" or any other text raises ValueError. loudspeaker_characteristics
    takes LoudspeakerDirectivity and LoudspeakerRatings,
    sound_power_pressure its room as RoomEnvironment, and
    predicted_receiver_level PropagationGeometry, GroundFactors,
    AtmosphericConditions and DirectivityCorrection. aircraft.event_level
    and noise_contour take AerodromeAtmosphere and FlightSegmentState, and
    the rotorcraft ones RotorcraftAtmosphere, RotorcraftGround,
    RotorcraftTrackState and FlightConditionInterpolation. See the option
    records
    and the environment.
  • An FDTD run is one record, written by name. fdtd_simulation takes
    one FDTDRun(*, c, dx, duration_s, sources, ...), its probes and
    snapshots in recording=FDTDRecording(...) and its sides and absorbing
    layer in boundaries=FDTDBoundaries(sides=, absorbing_layer_cells=), where
    3.3.0 took fdtd_simulation(c, dx, duration, *, sources, probes=, boundaries=, absorbing_layer_cells=, snapshot_every=).
    FDTD2D names its absorbing layer as the runs do, absorbing_layer_cells=,
    absorbing_sides= and absorbing_layer_reflection= where it took
    sponge_width=, sponge_sides= and sponge_reflection=, and
    FDTD2D.run(n_steps, *, snapshot_every=, snapshot_decimation=) takes by
    name what run(steps, record_every, decimate) took by position. See one
    spelling
    .
  • The FDTD engines take every argument by name, as the runs do.
    simulation.FDTD2D(*, c, dx, rho=1.2, ...) and
    simulation.ElasticFDTD2D(*, c_p, c_s, dx, rho, ...): FDTD2D(343.0, 0.01, shape=(200, 300)) is now FDTD2D(c=343.0, dx=0.01, shape=(200, 300)), and a call that gives them by position raises TypeError. A speed
    and a spacing written in the wrong order built an engine:
    FDTD2D(0.01, 343.0, shape=...) stepped cells 343 m wide with a time step
    of about four hours. ElasticFDTD2D.from_regions(shape, dx, ...) keeps its
    order, and refuses a shape and a spacing given the other way round with a
    TypeError naming shape. See written by name.
  • Every .plot() takes the axes first. See plots.

Results and verdicts

  • The verifiers return records, not dictionaries.
    verify_filter_class(bank).overall_class, and the same for
    verify_weighting_class and verify_aircraft_noise_system, which moved to
    aircraft. See verdicts are objects.
  • A verdict says passes, refuses a truth value, and comes from a verb.
    if verdict: raises TypeError; rigid_mass_calibration_check is
    verify_rigid_mass_calibration. See passes.
  • A verdict reads its limit, its flags and its regime from what it holds,
    so a result built by hand takes only the measured values. See
    limits, flags and
    regimes.
  • The filter bank returns a result. octave_filter and
    OctaveFilterBank.filter return an OctaveFilterResult, which holds its
    band centres and band waveforms as tuples,
    OctaveFilterBank.spectrogram an OctaveSpectrogramResult, and the bank's
    freq and num_bands are frequencies and n_bands. See the filter
    bank
    .
  • Other answers that were tuples are records. nominal_frequencies,
    coherence, decay_curve, sound_pressure_level_history,
    background_corrected_level, epnl_from_pnlt and others; none unpacks.
    See records.
  • A multi-panel .plot() returns a tuple of its axes. Without ax, the
    27 plots that draw several panels return a tuple of exactly their axes, the
    top panel first, where they returned a NumPy array of them, so indexing,
    unpacking and len() work and .shape, .flat and .ravel() do not;
    with ax they draw one panel and return that axes. The polar plots return
    a PolarAxes, and DiffuserPolarResponse.plot() refuses a cartesian axes
    with ValueError. See a tuple of axes.
  • A function of a number or an array returns a number for numbers and an
    array for an array, a zero-dimensional one included.
    352 public
    functions and methods follow the rule and say so in their signatures.
    room.room_constant(100.0, np.array(0.2)) returns array(25.) where it
    returned the float 25.0, and a one-element list gives a one-element
    array where the ISO 11200 corrections gave a float. The other way,
    functions that gave a zero-dimensional array, a NumPy scalar or a
    one-element array for numbers (in building, emission, vibration,
    materials, aircraft and the induction loops of electroacoustics,
    among others) give a Python float now, or a complex where the result
    is complex, with the same bits; piston_resistance, piston_reactance
    and piston_directivity give a float where they gave a numpy.float64.
    noise_control.duct_matrix and shunt_matrix give the (2, 2) matrix
    for one frequency, where they gave a (1, 2, 2) stack. See
    zero-dimensional arrays.
  • A record's fields are required. See required fields.
  • Results keep read-only copies of their arrays, and published tables refuse
    writes.
    Copy before editing. See own copies and
    read-only tables.
  • A record you build holds what its fields say. The records a caller
    builds convert what they are given: a list becomes a read-only array of
    the field's dtype, so levels * 2 doubles it instead of repeating it, a
    tuple field a tuple and a pair a pair of numbers, refused when built
    (TypeError for a number or a text, ValueError for the wrong count)
    instead of failing when read. materials.TransferMatrix holds each entry
    as a read-only complex128 array, so a scalar entry is a
    zero-dimensional array, no longer a complex and no longer hashable
    (complex(m.t11) gives the number), and hearing.Task holds its samples
    and its duration range as tuples of floats. A result that held a dict
    holds a read-only mapping, a spectral result holds the weights of its
    window as a tuple, and a record that comes back from pickle or
    copy.deepcopy holds its arrays read-only. See what its fields
    say
    .

Choices

  • A choice is matched as it is written. 198 parameters and record fields
    folded the case, stripped the spaces or mapped aliases of their own before
    they looked a choice up, so filters.WeightingFilter(48000, "a"),
    time_weighting(..., mode="FAST") and ln_levels(..., weighting="z") ran
    although a type checker refused them. Each takes only the spellings its
    Literal lists: another case, padding or an alias raises ValueError, and
    a value that is not text TypeError. The ANP lookups no longer take
    "approach", "landing", "takeoff", "departures" and the other
    aliases for an operation, and environment.detect_onsets and
    impulsive_sound_adjustment no longer fit any onset_rate_method but
    "upper_half" as least squares. Text the library reads from a file is
    still read as the file writes it. See matched as
    written
    .
  • A record refuses an unknown choice when it is built, and every choice is
    checked on every path.
    The records a caller builds, among them
    filters.FilterDesign, noise_control.DesignCriterion and hearing.Task,
    check their choices when they are built, where they stored any value and
    failed later or not at all. A choice read on one path only
    (environment.ground_effect(model=) without a flow resistivity,
    signals.time_delay(weighting=) outside "gcc", the fan_type= of
    noise_control.fan_sound_power with the VDI 2081 model, and the others
    the guide lists) is refused whatever else is given, and each key of a
    mapping and each item of a sequence is checked one by one. See a record
    refuses a choice
    .

Errors and removed names

  • A wrong type raises TypeError instead of ValueError, a text that
    reads as a number and a bytearray read as the codes of its characters
    included, and an array or a one-element list where one
    number belongs is a TypeError that names the parameter. A complex value
    where a real one belongs, a NumPy complex scalar included, which the
    checks read as its real part, is a TypeError too, and so is a value that
    is not text where a choice belongs. A choice beside numbers (the
    termination of materials.layered_absorber and
    diffuse_field_absorption, the initial_state of
    filters.time_weighting, the coefficients of materials.delany_bazley,
    the speech_spectrum of speech.speech_intelligibility_index and the
    others the guide lists) refuses a text in any form but a str:
    layered_absorber(termination=["400", "400"]) closed the stack with an
    impedance of 400 Pa s/m and delany_bazley(coefficients=b"12345678")
    took the codes of the characters, where both are a TypeError now. Code
    that caught ValueError for any bad input catches
    (TypeError, ValueError). See errors.
  • A count is a whole number and a sample rate a float. A fractional
    count is a ValueError and a flag a TypeError, where 3.3.0 truncated it
    or read True as 1 (n_points=100.6 drew 100 points,
    OctaveFilterBank(order=2.5) and room.mls_signal(10.5) ran); a band
    fraction that names octaves or thirds only, 1 or 3, as the fraction of
    emission.sound_intensity does, refuses 1.0 with a TypeError. The
    sample rates that run at any value are typed float, where a type checker
    read an int. See rates and counts.
  • Every warning is shown at the line of your code that made the call, and
    a filter by module no longer reaches it.
    33 warnings reached by a second
    route were shown at a line of the library, so the same call in a later
    notebook cell said nothing; every warning now skips the package's own
    frames, and the fourteen published warnings that were written in private
    modules name the package that exports them. A filter written as
    module="phonometry" reaches none of them: filter by
    category=phonometry.PhonometryWarning or by topic. See the line of your
    code
    .
  • Some names exist nowhere any more. Each has its replacement in the
    names that are gone
    .

Added

Signals and files

  • phonometry.io reads and writes measurement audio. io.read returns a
    Signal (samples, rate, calibration, channels, the EBU Tech 3285 bext
    record) from any linear WAV, RF64 or BW64, and FLAC, AIFF, Ogg and MP3 with
    [audio]; info, read_blocks, write, convert and a calibration
    sidecar come with it.
  • A Signal goes wherever an array went. The filters, weightings, levels,
    spectral, correlation, envelope and cepstrum estimators and the
    psychoacoustic models read its rate and calibration, and a transform of a
    pressure record returns a Signal.
  • io.Signal.pipe(func, *args, **kwargs) writes a chain of steps in the
    order it runs
    , as the pipe of pandas does:
    sig.pick(0).pipe(filters.weighting_filter, weighting="A").crop(10.0, 30.0).pipe(signals.leq).
    A type checker reads the arguments and the result from func itself.
  • Any matplotlib animation writes to WebM, MP4 or GIF through ffmpeg, on a
    GPU encoder when one works.
    io.write_video takes the container from the
    suffix and tries NVENC, Quick Sync, VAAPI and VideoToolbox first, each on
    one black frame of the video's size, then the CPU; a GIF is written with a
    palette of up to 256 colours. io.VideoOptions holds the settings, its
    vaapi_device naming the GPU VAAPI encodes on when it is not
    /dev/dri/renderD128, the first one. The file appears only when ffmpeg has
    finished it, and a write that fails says why, with the path and the
    encoder (io.FFmpegNotFoundError, io.VideoEncoderError).

Filters and weightings

  • Filter banks by IEC 61260-2:2016 and IEC 61260-3:2016.
    filters.verify_time_invariance (the swept test) and
    filters.verify_filter_periodic (periodic tests).
  • Weighting class against IEC 651:1979. verify_weighting_class(..., edition="1979") grades A, B and C against Table V, Type 0 included.
  • time_weighting of a Signal returns a TimeWeightedEnvelope, with a
    .plot() of the level trace.

Calibration and metrology

  • Reciprocity calibration (IEC 61094-2:2009, IEC 61094-3:2016). Coupler and
    free-field primary calibration of laboratory standard microphones.
  • Comparison calibration (IEC 61094-5:2016, IEC 61094-8:2012). Magnitude
    and phase, impedance and jig corrections, the 6.5 diameter correction, jig
    and coupler validation by 6.7, and the Annex B time window.
  • Sound level meters: free-field corrections on a calibrator, coupler or
    actuator (IEC 62585:2012), the random-incidence response (IEC 61183:1994)
    and the periodic tests of IEC 61672-3:2013, with a verdict.
  • Sound calibrators (IEC 60942:2017), graded by the IEC TC 29 conformance
    rule of metrology.verify_conformance.
  • ISO 1683:2015 reference values as metrology.REFERENCE_VALUES, read by
    every level.

Simulation

  • The FDTD engines step on an NVIDIA GPU through CuPy, or on PyTorch, and
    every result records where it ran.
    simulation.Compute, passed as
    compute=, set by a with simulation.use(...) block or by
    PHONOMETRY_COMPUTE, runs FDTD2D, ElasticFDTD2D and both simulation
    functions on NumPy, CuPy or torch in float64 or float32, and .provenance
    says where: the device, the dtype, the phonometry, NumPy and array library
    versions. The NumPy path did not move. On CuPy in float64 the fields came
    out bit-identical to NumPy's on an NVIDIA GeForce RTX 4060 with CuPy 14.2.0,
    the energy within 1.79e-16; torch on a CPU stays within 9e-16 in float64 and
    2e-06 in float32, and NumPy in float32 within 3e-06 of float64, over grids of
    up to 64 by 48 cells, up to 120 steps.
  • A simulation runs on another machine over SSH. Compute(host=...) or
    PHONOMETRY_COMPUTE=cupy@nas sends a whole run to a node named in
    hosts.toml, as data and never as code, and returns the same result.
  • An FDTD run writes straight to a video, here or on a node.
    simulation.write_fdtd_animation and write_elastic_fdtd_animation draw
    each frame as it is computed, 960 by 540 pixels by default and at least
    479 by 245 pixels; a run whose last frame comes at ten seconds or later has
    a wider floor, which its error names. simulation.AnimationFrame holds how
    a frame is drawn, its colour limit refusing a flag, and ffmpeg and ssh are
    found by one rule on every system.
  • An elastic P-SV solver. ElasticFDTD2D and elastic_fdtd_simulation on
    the Virieux staggered grid, with Material (STEEL, ALUMINUM,
    CONCRETE, WATER, AIR), explosive and force sources, fluid-solid
    interfaces and scholte_speed.
  • Plane waves, impedance tubes and the far field. FDTD2D.add_plane_wave
    and PlaneWaveSource, per-cell damping maps, and far_field_from_contour.
  • fdtd_simulation can keep every d-th cell of its snapshots
    (FDTDRecording(snapshot_decimation=)), as FDTD2D.run could, and
    pip install "phonometry[torch]" installs the torch backend.

Fluids and solids

  • phonometry.fluids, the medium sound travels through. fluids.air()
    computes humid air by IEC 61094-2:2009 Annex F; sea_water(),
    sea_water_density(), ideal_gas(), the absolute pressure at a depth and
    a Medwin sound-speed model join it.
  • phonometry.solids. Beam, plate and bulk longitudinal speeds, their
    inverses and the thickness-coincidence product.

Materials

  • Biot poroelastic layers (Allard and Atalla) in layered_absorber, and the
    limp-frame model with check_limp_frame.
  • Metadiffusers (Jimenez, Cox, Romero-Garcia and Groby, 2017).
    MetadiffuserWell and metadiffuser_polar_response.
  • Suspended ceilings in a reverberation room (EN 16487:2014).
  • Impedance tubes of any section in the ASTM E2611 branch, and a square
    section in both branches.
  • Porous-material estimates from what a table prints: porosity and flow
    resistivity from bulk density, characteristic lengths.

Published catalogues

  • Catalogues of materials read from the books. Solids, fluids and gases,
    porous materials, absorption, scattering and diffusion, transmission loss,
    impact insulation, duct walls, resilient layers and ground surfaces, each
    row naming its table and saying what its source claims for each cell.
  • Catalogues of your own. io.read_catalogue reads JSON or a spreadsheet
    saved as CSV into the same row classes, every *_named lookup takes
    catalogue=, and io.catalogue_schema returns a JSON Schema for editors.

Building acoustics

  • ISO 10140-1:2021 Annexes G, H, J and K. Linings, floor coverings, sealed
    joints and rain noise in the laboratory, with the Figure H.4 and J.7 forms.
  • ISO 16032 (from the ISO/DIS 16032:2023 draft). Service-equipment noise in
    buildings, with its on-site checks.
  • ISO 15186-3:2002, insulation by intensity down to 50 Hz, and the
    ISO 16283 low-frequency procedure
    for rooms under 25 m³.
  • Heavy and soft impact sources (ISO 16283-2 Annex A, ISO 10140-5 Annex F,
    JIS A 1418-2, ISO 717-2 Annex D).
  • The detailed ISO 12354-1/-2:2017 model, band by band and path by path,
    with the EN 12354-5:2009 Annex D and F tables.
  • Prediction from material data: resilient layers, floating floors and
    linings, ceiling plenum flanking (ISO 140-9, ASTM E1414, ASTM E413), wall
    ties, orthotropic panels and the plateau method.
  • The Spanish building code CTE DB-HR: its A-weighted indices and
    requirements.

Room acoustics

  • ISO 3382-1 completed. Sound strength G, lateral energy (J_LF, L_J), IACC,
    stage support, the reverberation-time uncertainty and the printed tables.
  • Workrooms: ISO 14257:2001 (spatial sound distribution) and
    ISO 11690-3:1998
    (choosing a prediction method).
  • Room modes and crowd noise (Long), and steady_state_spl with an
    absorption area, a per-band directivity or the reverberant field alone.

Sound power and emission

  • ISO 3743-1 and ISO 3743-2 (small sources in a hard-walled or a special
    reverberation room) and ISO 3747:2010 (in situ, against a reference
    source).
  • ISO 26101:2017 room qualification and ISO 6926:2016 reference sources,
    with ISO 3745 Annex A as amended in 2017.
  • ISO 8297 (a whole plant), IEC 61063 (a steam turbine), ISO 9295
    (the 16 kHz octave) and ISO 5136 (a fan in its duct).
  • The sound energy level L_J of a burst (ISO 3744, ISO 3746, ISO 3741) and
    the emission level at a work station (ISO 11201, ISO 11202, ISO 11204).
  • ISO 9614-1 at discrete points, its F1 indicator, the ISO 9614-3 fiche,
    and the IEC 61043 grading of intensity probes.
  • ISO 3746 survey positions beside three reflecting planes, which raised
    NotImplementedError.

Noise control

  • Enclosures and cabins as built (ISO 11546-1/-2:1995, ISO 11957:1996).
  • Silencers and screens: ISO 7235, ISO 11691 and ISO 5135 in the
    laboratory, ISO 11820:1996 in situ, ISO 11821:1997 removable screens.
  • Control-valve noise: IEC 60534-8-3 (gas, with low-noise trims and
    expanders) and IEC 60534-8-4 (liquid).
  • HVAC duct-borne noise from fan to room (Long, ASHRAE, AHRI 885), with
    the VDI 2081 Parts 1 and 2 models beside the ASHRAE ones.
  • Room-to-room transmission, enclosure design and duct modes with flow
    (Norton and Karczub), and SilencerChain for a silencer built by hand.

Environmental noise

  • Road noise barriers: EN 1793-1, -2 and -3 ratings, EN 1793-5:2016
    reflection in situ, and the railway spectrum of EN 16272-3-1.
  • Railway rolling stock (ISO 3095:2013) on a track judged by EN 15610 and
    EN 15461.
  • CNOSSOS-EU road and railway source emission (Directive 2002/49/EC
    Annex II), checked against the Commission's workbooks.
  • Soundscape (ISO/TS 12913-2, ISO/TS 12913-3), road surfaces by
    statistical pass-by (ISO 11819-1) and distant blasts (ISO 13474).
  • Wind turbines at a dwelling (IEC TS 61400-11-2:2024), with the
    amplitude-modulation rating.
  • Outdoor sound software (ISO 17534-1, ISO/TR 17534-3) and barriers
    measured in situ (ISO 10847:1997).
  • The Spanish noise regulation RD 1367/2007: corrected levels, limits and
    the Article 25 assessment, with a fiche.

Aircraft

  • ECAC Doc 29 Vol. 2 Appendix B flight profiles from a published ANP
    procedure (approach_profile, departure_profile), and Appendix D NPD
    curves
    for the airport's own air.
  • Rotorcraft hover and idle sources derived from the ground hover ring
    (NORAH2 Table 3).

Vibration

  • Vibration in buildings by the DIN family: DIN 45669-1/-2 (the meter and
    its mounting), DIN 45672-1/-2 (railways), DIN 4150-1, -2 and -3, and the
    E DIN 4150-2:2023 and E DIN 45672-3:2023 drafts.
  • Vibration meters (ISO 8041-1, ISO 8041-2), seats (ISO 10326-1:2016) and
    building frequencies (ISO 4866 Annex D).
  • Machines: ISO 20816-1, ISO 20816-9 and ISO 10816-3 zones and limits, and
    bearing, gear and blade fault frequencies.
  • Structures: mobility by impact hammer (ISO 7626-5:2019), the ISO 10846
    band average, driving-point method and adequacy checks, and experimental
    SEA.

Hearing and speech

  • Audiometric test methods (ISO 8253-1, ISO 8253-2) and supra-aural
    earphone reference levels (ISO 389-1).
  • Hearing protectors (ISO 4869-1, -2, -3 and -6): real-ear attenuation,
    HML and SNR, earmuffs on a fixture, active noise reduction.
  • STI adjusted to other speech and noise levels (IEC 60268-16 Annex M),
    and the critical-band, equally-contributing and octave-band SII procedures
    of ANSI S3.5-1997.
  • The ERB_N bandwidth and the Cam scale (Glasberg and Moore 1990) in
    psychoacoustics: erb_bandwidth, cam_from_frequency and
    frequency_from_cam.
  • The four decision criteria of ECMA-418-2 are published.
    psychoacoustics.AUDIBILITY_THRESHOLD_SONE_HMS (0.01 sone_HMS, clause
    5.1.9), PROMINENT_TONALITY_TU_HMS (0.4 tu_HMS, clause 6.3),
    PROMINENT_ROUGHNESS_ASPER (0.2 asper, clause 7.2) and
    PROMINENT_FLUCTUATION_STRENGTH_VACIL_HMS (0.2 vacil_HMS, clause 9.2),
    each held to its printed page. No function applies them.
    EcmaLoudness.basis_loudness_vs_time holds the total basis loudness of
    Formula 26 in sone_HMS that the audibility criterion reads, block by block
    at the times of loudness_vs_time, and
    EcmaLoudness.last_evaluated_block the last block that holds the signal
    (l_end of Formula 40). The fluctuation criterion was
    PROMINENT_FLUCTUATION_STRENGTH_VACIL in 3.3.0; see modules and
    functions
    .

Electroacoustics and broadcast

  • Headphones and earphones (IEC 60268-7:2010) with the programme signal of
    IEC 60268-1:1985.
  • Induction loops (IEC 60118-4, IEC 62489-1) and gain before feedback.
  • The ITU-R BS.468-4 quasi-peak meter: broadcast.quasi_peak_meter and
    verify_quasi_peak_dynamics.

Underwater

  • Gaussian beams, eigenrays and sloping bottoms, and ray_trace returns
    travel times, arc lengths and bounce counts.
  • Weston's shallow-water regimes, marine-mammal weighting and exposure
    criteria
    (Southall 2019, NMFS 2018 and 2024), and the detection
    threshold, array gain and detection range of the sonar equation.

Results and figures

  • Results read well in a notebook, as a table of their fields, and the
    wheel runs in Pyodide.
  • Every domain draws its set-ups. 23 plot_* helpers draw a measurement
    or model geometry (impedance tube, barrier, plate, double wall, silencer,
    QRD and more), each with ax= and language=.

Changed

  • A filter bank's class reads every requirement of its edition.
    verify_filter_class grades the effective bandwidth and summation of
    IEC 61260-1:2014 (or 4.5.3 and 4.9 of IEC 61260:1995) beside the Table 1
    mask, each band at the input rate. See the filter class.
  • The ISO 9053-2 thermal correction defaults to the air of IEC 61094-2, not
    to the five values of Annex A.3; the printed Annex A.3 results stand.
  • A room under 25 m³ measured without the ISO 16283 low-frequency procedure
    warns
    with building.LowFrequencyWarning.
  • Silencer results carry their plane-wave limit
    (ReactiveSilencerResult.plane_wave_limit) and warn with
    noise_control.PlaneWaveWarning when the analysis runs past it, so a
    3.3.0 call can warn now.
  • Every warning has a topic of its own, a PhonometryWarning subclass that
    is still a UserWarning, so existing filters keep working.
  • Records refuse at construction a NaN, a per-band column of the wrong
    length and a field of the wrong kind, instead of drawing it wrong later.
    aircraft.RotorcraftGround refuses, when it is built, a flow resistivity
    that is neither a class letter nor numbers (b"G", None, a complex
    value), where it stored any of them as given and left it to the event that
    read it.
  • The types say what a call takes and what it returns. pyright's
    --verifytypes reads every public name as known, and every NumPy type the
    package annotates names its dtype. Every fixed choice is a Literal, a
    collection of choices and a mapping keyed by one included, the published
    tables are keyed by their vocabulary, and help() names the values each
    choice takes; a parameter whose body converts its argument takes any
    array-like, and one that takes numbers refuses a text; a count and a flag
    take the NumPy scalar their check takes, and a mapping of band values
    integer keys; a function of a number or an array, a filter object and a
    plot of one panel or several are overloaded on what decides their return;
    a record a caller builds declares the constructor a type checker reads; a
    choice beside numbers refuses a text to a type checker as at run time; and
    a misspelt root name is a type error. Nothing that ran stops running for
    this, but a variable annotated ArrayLike, or a memoryview, handed where
    numbers go is now a type error: annotate what it holds, or pass
    np.asarray(view). See a text before the call runs.
  • Faster where it was slow. import phonometry loads lazily (about 4 ms),
    a minute of 44.1 kHz audio is weighted in about 18 ms instead of 377 ms, and
    a large FDTD run no longer holds its snapshots twice. A weighting design
    now costs a few hundred milliseconds the first time for each curve, rate
    and mode in a process, where 3.3.0 took a few milliseconds; it is cached,
    and high_accuracy=False stays instant.
  • Installs on Python 3.12, with floors measured in CI on each Python it
    supports: on 3.12 NumPy 2.0.2, SciPy 1.14.0, numba 0.60.0 and torch 2.3.0,
    on 3.13 and 3.14 the first releases with a wheel for them, and matplotlib
    3.10.7, reportlab 4.3.0, svglib 0.9.1 and soundfile 0.12.0 everywhere. The
    torch floor on Python 3.13, 2.5.0, has a wheel for Linux on x86-64 only;
    macOS on ARM, Windows on x86-64 and Linux on ARM take torch 2.6.0, the
    oldest release with a wheel there.
  • The conformance claim counts normative designations and further
    sources.
    The README, the badge, the conformance report and the
    documentation say that the checks run across 111 domains, against 230
    normative designations and 121 further published sources, read from
    docs/conformance.json, where they counted groups of citations as
    standards.
  • The documentation lives at https://docs.jmrp.io/phonometry/, organised by
    topic in English and Spanish, and every address the site published before
    redirects to where the page is now. The docs/ markdown mirror follows the
    same topic layout, so its 3.3.0 file paths are gone, and the llms.txt
    shards are served by the site under topic names. The errata register cites
    each defect by edition, PDF page and printed folio. Every install line a
    reader with 3.x may follow says to upgrade with pip install -U phonometry,
    with the extras they use. A new Environments section says how
    to install and run phonometry with pip and uv, conda, Jupyter,
    JupyterLite and Pyodide, Docker and a type checker. The API reference
    shows the tables its docstrings hold as tables, help() of every domain
    opens with what it holds, and no docstring writes a hyphen or a double
    hyphen as a dash.
  • The bundled EASA ANP tables carry EASA's terms and no condition of
    ours
    , quoted in aircraft/data/anp/PROVENANCE.md beside the
    acknowledgement, where they were said to be redistributed for
    non-commercial use. The PyOctaveBand transition package moves to 2.2.1,
    still pinned below phonometry 4, and declares and carries the MIT licence.
  • A weighting design gives the same bytes on every platform. It takes
    its transcendentals, the BS.468-4 poles and the second-order sections from
    the package's own arithmetic instead of the C library, LAPACK and the
    BLAS, so macOS, Windows, Linux on ARM and musl design the Linux bytes. On
    Linux six of the 133 designs CI checks move by their last bits (A and C at
    44.1 and 88.2 kHz, D at 88.2 kHz, G at 1.5 kHz), the nineteen BS.468-4
    designs by at most 0.0072 dB of response and the AU weighting at 100 and
    200 Hz by up to two units in the last place;
    electroacoustics.weighting_bs468 moves by at most 4e-14 dB. A design
    costs about 270 ms where it cost about 200.
  • A sample rate need not be a whole number.
    vibration.evaluate_train_passage, signals.resample_signal handed a
    Signal and the EN 15610 Method B bank run at a fractional rate, where
    they refused one, and the functions that hand their rate to a filter
    (electroacoustics.weighted_thd, environment.sound_pressure_level_history,
    broadcast.quasi_peak_meter and the others) hand it on as it is, where
    they rounded it.
  • English text writes the decimal point, a value restated from a
    standard that prints a comma included, and Spanish keeps the comma: the
    warnings and messages that quote a number, the catalogue rows written in
    English, the reference of IEC 61672-1 Table B.1 above 8 kHz and the
    ISO 17534-1 quantile symbols q_{0.1} and q_{0.9} change their text. No
    value changes.
  • A missing extra names the conda command beside pip's, a domain offers
    only what it publishes, and a record's table shows its units.
    Each
    install hint ends with both commands; dir() and tab completion of each
    of the 21 domains list its __all__ alone; and a record's notebook table
    shows the unit of every field that has one.
  • Since 4.0.0rc1. vibration.blade_pass_frequencies returns a
    BladePassResult that holds the lobe patterns of a ducted fan apart from
    its lines, as signed speeds of rotation, where rc1 listed them as lines at
    those speeds; the ± 50 % of ISO 4866 D.2 is
    vibration.EMPIRICAL_FREQUENCY_ERROR, not EMPIRICAL_FREQUENCY_TOLERANCE;
    ElasticFDTD2D.from_regions takes the engine's options by name;
    noise_control.cascade multiplies matrices alone; a record that holds a
    read-only mapping pickles and deep-copies, and every record comes back
    from pickle or copy.deepcopy holding its arrays read-only; and a
    Signal or a SignalOrigin pickled under rc1 no longer unpickles, since
    their module is phonometry._internal.signal. See the lobe
    patterns
    .

Removed

  • The aliases deprecated in 3.1 and 3.2: octavefilter,
    getansifrequencies, normalizedfreq, calculate_sensitivity, the
    ISO 12999-1 coverage_factor and expanded_uncertainty, ExposureWarning,
    the keywords sample_rate, humidity and room_volume, and the flat
    module paths such as phonometry.levels.
  • Duplicate and superseded functions: partial_exposure,
    combine_uncertainties, satisfies_lower_requirement,
    strong_coupling_satisfied, tonal_seeking_survey,
    filter_class_compliance and the rest of the names that are
    gone
    .
  • BandUncertainty.to_arrays(), the public type aliases and the private
    phonometry._plotting re-export; filters.compliance no longer answers
    for the weighting transcriptions by their old private names, which
    filters.weighting_compliance holds.

Fixed

  • The default filter banks are class 1 of IEC 61260-1:2014. Alias images
    sat 68.9 dB down in the octave bank and the decimated summation broke 5.16;
    band levels move by up to 0.07 dB.
  • A and C weightings meet IEC 61672-1 class 1 at every rate from 8 kHz.
    In 3.3.0 the default weighting lost up to 16 dB at the Table 3 rows within
    a tenth of the Nyquist frequency: A and C at fs = 16 kHz met no class at
    the 8 kHz row, and A at 32 kHz met class 2, while verify_weighting_class
    reported class 1, because it graded the designed sections and not the path
    a signal takes. The filter is now designed at the input rate, AU verifies
    too, and weighted levels move in the top octaves: at 48 kHz by about 0.1 dB
    at 10 kHz, 0.4 dB at 16 kHz and 0.9 dB at 20 kHz. stateful=True ran the
    plain bilinear design in 3.3.0 and runs the accurate one now, so stateful
    output changes, and a stateful G weighting reads 0 dB at its 10 Hz
    reference.
  • The ITU-R BS.468-4 curve comes from the printed network, not from an
    interpolated Table 1, which was 0.61 dB off near 11 kHz.
  • SAE ARP 5534 band attenuation uses the ARP's own saturation vapour
    pressure
    , so ECAC Doc 29 Table D-3c reproduces to the last digit.
  • A value exactly on a printed limit is judged by its decimal value, the
    same on every machine; NC and RC ratings round half to even.
  • room.open_plan_metrics returns NaN for a distraction or privacy
    distance the STI never reaches
    , where 3.3.0 returned a distance of the
    order of 1e16 m.
  • The ISO 3382 fiche takes the single-number reverberation time over 400 Hz
    to 1250 Hz
    for a third-octave analysis, as Clause 9.1 prints.
  • ISO 3746 survey positions over one reflecting plane are those of
    ISO 3746 Table B.1, whatever tones says.
  • The ray solvers reflect exactly at a boundary, and ray_trace takes the
    gradient of the segment a ray is entering.
  • extended_tube_chamber models the straight section over L - L_a - L_b,
    reproducing Bies Figure 8.20.
  • installed_dynamic_stiffness no longer reads a missing gas term as zero
    below 100 kPa·s/m².
  • A temperature at or below absolute zero is refused across the tree.
  • The impulsive-sound analysis refuses a multichannel signal instead of
    reading it as one channel twice as long.
  • The ISO 10846 fiche reads its headline at the lowest valid line.
  • An ISO 9612 instrument that Table C.5 does not list raises ValueError,
    not a KeyError from a table lookup.
  • Plots accept matplotlib's short aliases and label=, write the Spanish
    decimal comma on every axis, keep their legend off a second scale, draw a
    band with no reading as no bar, stay visible on a dark theme, and close
    the figure they opened when they raise.
  • Fiches keep their size under any savefig setting, refuse a table that
    does not fit one page, write the Spanish decimal comma in band columns, and
    the IEC 61400-11 tonality fiche shows the spectrum under its critical band
    on every svglib the report extra admits.
  • emission.grade_from_local_correction grades a method A.2 correction
    by Condition (A.6) of ISO 11202:2010
    when given largest_dimension_m=:
    a correction above 3.34 dB, 2.82 dB or 2.41 dB, by the largest dimension
    of the source, is grade 3, where it came out grade 2.
  • ISO 9295 keeps its digits where a reflection or an absorption rounds to
    one.
    materials.standing_wave_normalized_impedance lost up to 4e-6 of
    its result at large standing-wave ratios and gave inf + nan j past about
    1e16, and emission.room_constant_from_reverberation_time lost every
    digit once its exponent passed about 37.
  • A half-octave band is labelled with three significant digits, as
    Annex E.2 of IEC 61260-1 asks: the bands at 595.7 Hz and 841.4 Hz read
    596 and 841, not 600 and 840, and a band finer than 1/36 octave
    takes the digits that keep its labels apart. Centres, edges and levels do
    not move.
  • A filter bank on its default span says nothing at 44.1 kHz. The span
    is trimmed to the bands the rate holds, the ones the bank kept before;
    limits the caller gives still warn and name the bands left out, and a
    rate that holds no band at all raises ValueError.
  • A documented refusal comes before any warning, so under
    python -W error a call raises its refusal and not the advisory before
    it.
  • An FDTD run refuses by name what it cannot step: a run longer than
    its record can hold, a time step that rounds to zero or to infinity, and a
    time or a waveform sample that is not one real number. A Decimal or a
    Fraction steps as the float it reads as, and a ContourProbe built
    through its class samples.
  • A writer puts its file at the name only once it is whole. io.write,
    io.convert, every .report(), the response plot of a filter bank and
    the video writers write beside the target and rename over it, keeping the
    old file's permission bits, so a write stopped half way leaves the file
    that was there. .report() takes a pathlib.Path, and a path object of
    another library reaches the file it names. See once it is
    whole
    .
  • Two threads importing two domains no longer deadlock, and with
    [perf] every package imports where numba can write no cache.
  • Missing matplotlib, an overflowing record and a saturating tangent are
    handled.
    Seventeen plots and fiches that raised a bare
    ModuleNotFoundError give the install hint; signals.envelope_spectrum
    returns the same result past the floating-point range on every SciPy
    without a NumPy warning; the tangents of the layered absorber, the slits,
    the couplers, Maekawa's barrier and the Biot and capillary models
    saturate quietly on Windows too; and a WAV reads from a file system that
    cannot be memory-mapped, such as JupyterLite's.

Security

  • A reader refuses a name that holds no regular file. io.read,
    io.info, io.read_blocks, io.convert and
    aircraft.load_anp_database refuse a named pipe, a device, a socket or a
    directory with a ValueError naming the file, before they open it, where a
    pipe no one wrote to kept the call waiting and a link to /dev/zero was
    read without end. The ANP reader reads a table of at most 32 MiB and
    refuses a cell that holds no finite number, or a count that is no whole
    number, with its table, line and column. A message that names a file
    writes its control characters and its marks that reorder text as escapes.
    See a reader refuses a name.
  • A remote run starts your own ssh, and nothing crosses as code. ssh runs
    with no terminal and no agent, X11 or port forwarding, the run travels as
    data and is checked again on the node, every byte the node sends is checked
    before it is read, its text reaches you with its control characters and
    marks that reorder text escaped, and a warning class the node names is
    imported only from phonometry's own modules. ffmpeg and ssh run by their
    full path, with every argument checked before they start.
  • Releases go out by trusted publishing, each file with a Sigstore
    attestation, and the GitHub Release carries the checksum file
    phonometry-<version>.sha256 and a CycloneDX SBOM, every one of its four
    files with build provenance. The release publishes only from a commit on
    which Python CI succeeded and refuses a wheel or an sdist that does not
    declare the MIT licence or carry its text. PyOctaveBand stays on the 3.x
    line.
  • A release rebuilds from its tag to the same bytes on Linux and macOS
    with scripts/build_release.py, which the release checks by building twice
    and by rebuilding the tag on macOS after it publishes; the sdist of
    4.0.0rc1 carried the build time and the builder's user, and its wheel the
    builder's umask.
  • SECURITY.md says what is supported, how to report a vulnerability in
    private and how to verify and rebuild a release
    , and zizmor audits every
    workflow in CI.

For contributors

  • One written style guide. docs/contributing/ gives every rule an
    identifier and names the check that enforces it; AGENTS.md sends coding
    agents there first.
  • Guards close classes of defect: em dashes and a spaced double hyphen,
    breakable digit groups, units in parameter names, mutable published
    tables, float equality and figure legibility, each a scripts/check_*.py
    or a test that CI runs.
  • Ruff formats and lints, a bare mypy checks src, scripts,
    stub/src, tests/static_typing and the conformance scripts against the
    oracle tables they read, and the development requirements are pinned.
  • CI tests the dependency floors, the GPU parity record, notebooks in
    Pyodide and the MPS backend
    , builds the release twice on Linux and once
    more on macOS on every pull request, and builds the site on every pull
    request that touches it.
  • The documentation clips live in the phonometry-assets repository.
  • The test suite runs from a source archive, skipping with a reason the
    tests that ask git about the repository, and fails on a warning a test
    did not ask for
    .

The same notes are in the changelog.