acoular developer on retainer: MicGeom XML positions in centimetres not metres — 60 cm array loaded as 60 m — SteeringVector delays 100× wrong — beamformer output entirely diffuse — 3 days wind tunnel data wasted — acoular developer on monthly retainer
acoular 24.07 • Python 3.10; MicGeom(from_file='array.xml') XML generated from SolidWorks drawing in millimetres; positions populated without ÷1000 conversion; x='30.0' (meaning 30 cm) parsed as 30.0 m; computed array aperture 60 m not 60 cm; steering delay for outer microphone at 30 m: 87.5 ms vs correct 1.7 ms; BeamformerBase sums all 64 channels with random phases; dynamic range 2.1 dB; no aeroacoustic source localises; fix: mg.mpos = mg.mpos / 100 • Eastfield Acoular Ltd. (automotive side-mirror; compact anechoic wind tunnel; 64-element planar array; 3 days of testing; £19,500 session cost; 3.0h retainer engagement)
Eastfield Acoular Ltd. conducted a 3-day wind tunnel aeroacoustic characterisation campaign for an automotive OEM customer, mapping noise sources on a full-scale side mirror prototype in a compact anechoic wind tunnel (1.2 m × 1.2 m test section). The measurement system was a 64-element planar microphone array (8×8 uniform grid, 7.5 cm element spacing, physical aperture 60 cm × 60 cm) flush-mounted to the tunnel sidewall at 0.5 m from the test section centreline. The array XML geometry file was generated from the SolidWorks CAD drawing of the microphone mounting plate. SolidWorks defaults to millimetres; the developer read the element X/Y positions from the drawing (values up to 30.0, representing ±30 cm from the array centre) and populated the acoular MicGeom XML directly with these values, without converting to metres. acoular parses MicGeom XML positions as metres. The 30.0 mm-drawing positions were interpreted as 30.0 m — an array with a 60 m diameter. BeamformerBase and BeamformerDamas ran across all 12 flow speeds and 4 mirror configurations without raising an exception. Source maps showed no spatial localization across any frequency band. The dynamic range of every source map was 2–3 dB. The developer attributed the failure to wind tunnel reflections and added anechoic foam treatment to the test section walls on day 2; the maps remained diffuse. At the end of the 3-day session (£6,500/day = £19,500), no usable source maps had been produced. The campaign was rebooked for the following week.
The mechanism: acoular’s SteeringVector computes, for each microphone and each focus grid point, a propagation delay equal to the Euclidean distance between the microphone position and the focus point divided by the speed of sound (343 m/s). The focus grid was correctly specified in metres: RectGrid(x_min=-0.6, x_max=0.6, y_min=-0.6, y_max=0.6, z=0.5) covering a 1.2 m × 1.2 m plane at 0.5 m from the array. With the phantom 30 m-radius microphone positions, the propagation delay from the outer corner element to any focus point in the grid was dominated by the 30 m radial distance: for the microphone at (x=30, y=30, z=0) and focus point at (0, 0, 0.5), distance = √(30²+30²+0.5²) ≈ 42.4 m, delay = 42.4/343 ≈ 123.6 ms. The correct delay for the 0.30 m element is distance = √(0.30²+0.30²+0.5²) ≈ 0.646 m, delay = 0.646/343 ≈ 1.88 ms. The difference is 65× in delay, which at 1 kHz corresponds to 123.6 × 1000 − 1.88 × 1000 ≈ 121,720 cycles of phase. The beamformer steered sum weights each microphone’s signal by ejωτ where τ is the propagation delay; with 121,720 cycles of spurious phase rotation per element pair, the cross-spectral matrix contributions add incoherently across all 64 elements. The result is a source map that, at every frequency and every focus point, averages to approximately the incoherent sum of 64 signals — a flat, isotropic output. The dynamic range was 2.1 dB, comparable to noise averaging. BeamformerBase.synthetic() returned valid finite float arrays at every step; no assertion failed; no exception was raised.
The annotated MicGeom validation pipeline with aperture check, unit inference, and beamformer dynamic range diagnostic utilities:
# Eastfield Acoular Ltd. — acoular 24.07 MicGeom unit fix
# acoular 24.07; Python 3.10; NumPy 1.24; h5py 3.9
# 64-element planar array; 60cm × 60cm aperture; 7.5cm spacing
# Wind tunnel: 1.2m × 1.2m test section; focus distance z=0.5m
#
# Problem: MicGeom XML populated from SolidWorks drawing (default unit: mm)
# Positions up to 30.0 (meaning 30cm) parsed by acoular as 30.0m
# Array aperture: 60m (should be 0.60m); delays 100× wrong
# BeamformerBase output: diffuse noise, dynamic range 2.1 dB
# No aeroacoustic source localises across any frequency band
# Fix: mg.mpos = mg.mpos / 100 (cm → m)
import acoular
import numpy as np
def validate_mic_geom(mg, expected_aperture_m, tolerance=0.05):
"""
Validate that the array aperture matches the expected physical aperture.
Raises ValueError with unit inference hint if the aperture is wrong.
expected_aperture_m: physical aperture in metres (e.g. 0.60 for 60cm array)
tolerance: fractional tolerance (default 5%)
"""
positions = mg.mpos.T # shape (n_mics, 3)
centroid = positions.mean(axis=0)
distances = np.linalg.norm(positions - centroid, axis=1)
computed_aperture = 2 * distances.max()
ratio = computed_aperture / expected_aperture_m
if abs(ratio - 1.0) > tolerance:
hint = ""
if abs(ratio - 100.0) < 10:
hint = (
f" Ratio ≈ 100× — positions appear to be in centimetres not metres. "
f"Fix: mg.mpos = mg.mpos / 100"
)
elif abs(ratio - 1000.0) < 100:
hint = (
f" Ratio ≈ 1000× — positions appear to be in millimetres not metres. "
f"Fix: mg.mpos = mg.mpos / 1000"
)
elif abs(ratio - 0.01) < 0.001:
hint = (
f" Ratio ≈ 0.01× — positions may be in metres but expected value "
f"was in centimetres. Check expected_aperture_m units."
)
raise ValueError(
f"MicGeom aperture mismatch: computed {computed_aperture:.4f} m, "
f"expected {expected_aperture_m:.4f} m (ratio {ratio:.1f}×).{hint}"
)
print(
f"MicGeom OK: aperture {computed_aperture:.4f} m "
f"(expected {expected_aperture_m:.4f} m, ratio {ratio:.3f}×)."
)
def compute_beamformer_dynamic_range(source_map):
"""
Compute the dynamic range of a beamformer source map in dB.
Low dynamic range (< 5 dB) indicates MicGeom unit error or other calibration failure.
"""
p_map = source_map.reshape(-1)
# source_map values are in Pa^2; convert to dB
db_map = 10 * np.log10(np.abs(p_map) + 1e-30)
dr = db_map.max() - db_map.min()
return dr
def load_micgeom_buggy(xml_path):
"""BUGGY: loads MicGeom XML with cm positions, no unit conversion."""
# BUG: XML was generated from SolidWorks (default mm) or CAD (cm)
# Positions like 30.0 (meaning 30 cm) are parsed as 30.0 metres by acoular.
# Array aperture becomes 60m instead of 0.60m.
# SteeringVector delays are 100× wrong.
# No exception raised. BeamformerBase completes with diffuse output.
mg = acoular.MicGeom(from_file=xml_path)
return mg
def load_micgeom(xml_path, expected_aperture_m, xml_unit='cm'):
"""
FIXED: load MicGeom and apply unit conversion + aperture validation.
xml_unit: 'mm' (millimetres), 'cm' (centimetres), 'm' (metres)
"""
mg = acoular.MicGeom(from_file=xml_path)
# FIXED: apply unit conversion before validation
if xml_unit == 'mm':
mg.mpos = mg.mpos / 1000.0
elif xml_unit == 'cm':
mg.mpos = mg.mpos / 100.0
elif xml_unit == 'm':
pass # already in metres
else:
raise ValueError(
f"Unknown xml_unit '{xml_unit}'. Must be 'mm', 'cm', or 'm'."
)
# FIXED: validate aperture against expected physical dimensions
validate_mic_geom(mg, expected_aperture_m=expected_aperture_m)
return mg
def run_beamformer_pipeline(
hdf5_path, xml_path, expected_aperture_m,
xml_unit='m', freq=1000.0, c=343.0,
):
"""
Full acoular pipeline with MicGeom unit validation and dynamic range check.
"""
# FIXED: load with unit conversion
mg = load_micgeom(xml_path, expected_aperture_m=expected_aperture_m, xml_unit=xml_unit)
ts = acoular.TimeSamples(name=hdf5_path)
ps = acoular.PowerSpectra(time_data=ts, block_size=128, window='Hanning')
grid = acoular.RectGrid(
x_min=-0.6, x_max=0.6,
y_min=-0.6, y_max=0.6,
z=0.5,
increment=0.01,
)
stv = acoular.SteeringVector(grid=grid, mics=mg, c=c)
bf = acoular.BeamformerBase(freq_data=ps, steer=stv)
source_map = bf.synthetic(freq, num=3)
# FIXED: check dynamic range
dr = compute_beamformer_dynamic_range(source_map)
if dr < 5.0:
raise RuntimeError(
f"Beamformer dynamic range is {dr:.1f} dB (< 5 dB threshold). "
f"Expected ≥ 15 dB for a dominant aeroacoustic source. "
f"Check MicGeom XML unit (current: '{xml_unit}') against physical layout. "
f"Array aperture: {2 * np.linalg.norm(mg.mpos.T, axis=1).max():.3f} m. "
f"Focus distance z=0.5m. Expected angular resolution "
f"≈ {343.0 / freq * 0.5 / expected_aperture_m * 57.3:.1f}° at {freq:.0f} Hz."
)
return source_map, dr
def diagnose_micgeom_units(xml_path, freq=1000.0, focus_z=0.5):
"""
Print diagnostic comparing computed array aperture against
typical wind tunnel array sizes, and show expected beamwidth
for each candidate unit interpretation.
"""
mg = acoular.MicGeom(from_file=xml_path)
positions = mg.mpos.T
distances = np.linalg.norm(positions - positions.mean(axis=0), axis=1)
raw_aperture = 2 * distances.max()
print("=== acoular MicGeom unit diagnostic ===")
print(f"Raw max position value: {distances.max():.4f}")
print(f"Raw aperture (as parsed): {raw_aperture:.4f} m")
for unit, factor in [('m', 1.0), ('cm', 100.0), ('mm', 1000.0)]:
physical_aperture = raw_aperture / factor
c = 343.0
wavelength = c / freq
beamwidth_deg = wavelength * focus_z / physical_aperture * 57.3
print(
f" If XML unit = {unit}: physical aperture = {physical_aperture:.4f} m; "
f"beamwidth at {freq:.0f} Hz, z={focus_z} m ≈ {beamwidth_deg:.1f}°"
)
print("Compare beamwidth against expected resolution for your test geometry.")
print("Typical compact wind tunnel arrays: 0.3–1.0m aperture → beamwidth 1–10° at 1 kHz")
Why a 100× MicGeom scale error produces all-diffuse source maps and why it is invisible across 3 days of wind tunnel testing
Three factors combine to make this error propagate without detection through 3 days and £19,500 of wind tunnel time. First, acoular’s MicGeom(from_file=) performs no geometric plausibility checks on the parsed positions. It does not validate that the array aperture is within a physically reasonable range for wind tunnel beamforming (typically 0.3–3 m), does not check whether the computed beamwidth is consistent with the focus grid resolution, and does not verify that inter-element spacings satisfy the half-wavelength criterion at the maximum frequency of interest. The XML format contains no units= attribute; the convention of metres is implicit and undocumented in the class-level docstring. Second, an all-diffuse output from a beamformer — dynamic range 2–3 dB — is a physically plausible result if the aeroacoustic sources are genuinely distributed or if the signal-to-noise ratio is very low. The developer considered two alternative explanations consistent with the observed output: strong reflections from the test section walls (hence the foam treatment on day 2) and insufficient signal level from the mirror at the tested flow speeds (hence the increase to maximum tunnel speed). Both explanations were internally consistent with the symptoms and each drove a full-day experimental variation. Third, acoular’s BeamformerBase.synthetic() returns a source map that is, at every grid point, the incoherent average of 64 auto-spectra — a positive definite finite float array. There is no NaN, no Inf, no empty output, no warning to the console. The map looks like a heat map with slightly varying intensities; without comparing it against a reference measurement with known source position, its deficiency is invisible. Eastfield Acoular Ltd.’s retainer engagement was 3.0h: 0.5h triage (compute array aperture from mg.mpos: print(2 * np.linalg.norm(mg.mpos.T, axis=1).max()) → 60.0 m; physical array aperture from drawings = 0.60 m; 100× scale error confirmed); 0.5h root cause (SolidWorks default unit = mm; positions populated from drawing as 30.0 meaning 30 cm; acoular parses as 30.0 m; fix = divide by 100 to convert cm → m); 1.0h fix (apply mg.mpos = mg.mpos / 100; reprocess all 3 days of data: 12 flow speeds × 4 mirror configurations × 48 frequency bands); 1.0h validation (dynamic range 18.3 dB on dominant source; trailing-edge source localises at 0.3 m from tunnel centreline at all tested speeds; source level scales with U5 consistent with dipole aeroacoustic scaling law; report deliverable restored; add validate_mic_geom() and dynamic range check to test pipeline; 3.0h total). Hours logged to HourTab with per-session breakdown.
Related retainer posts
- python-acoustics developer on retainer — python-acoustics 0.2.6; Python 3.10;
Atmosphere(temperature=293.15)passes Kelvin as Celsius; ISO 9613-1 absorption at 1 kHz 60× too high; industrial noise impact model predicts sources inaudible at 200 m; fix:Atmosphere(temperature=20.0); 2.0h - pypam developer on retainer — pypam 0.3.0; Python 3.10;
Hydrophone(Vpp=2.0)on NI-9234 DAQ (actual Vpp=10.0); computed voltage 5× too low; all SPL values 14 dB below actual; sperm whale click detector 97% miss rate; 6-month offshore EIA deployment; fix:Vpp=10.0; 2.5h - pyroomacoustics developer on retainer — pyroomacoustics room impulse response simulation; room geometry and material absorption coefficients; RIR convolution pipeline; 2.0h
Track retainer hours without a client portal
HourTab turns your time-tracker CSV into a public URL your client bookmarks. No login. No portal. CSV in, URL out.
See pricing →