This is the development version of the documentation. It may change before the next release. See 0.14.x for the latest release.
radiation_pressure
srcradiation_pressure applies radiation pressure correction to a modulation waveform. It rewrites a waveform computed by sine or similar in place.
Acoustic radiation pressure is proportional to the square of the sound pressure.
Since sine and similar functions specify the amplitude of the sound pressure, taking the square root of each sample is necessary when the radiation pressure should match the target waveform.
radiation_pressure performs this correction.
Each sample
radiation_pressure(&mut buffer);radiation_pressure(buffer)Modulation.RadiationPressure(buffer);radiation_pressure
Section titled “radiation_pressure”| Parameter | Type | Description |
|---|---|---|
samples |
&mut [u8] |
modulation waveform to correct |
Example
Section titled “Example”use autd3_rs::units::Hz;use autd3_rs::value::SamplingConfig;use autd3_rs_modulation::{SineOption, modulation_buffer, radiation_pressure, sine};
let mut buffer = modulation_buffer();sine(150 * Hz, &SineOption::default(), SamplingConfig::FREQ_4K, &mut buffer)?;
radiation_pressure(&mut buffer);from autd3.units import Hzfrom autd3.value import SamplingConfigfrom autd3_modulation import SineOption, modulation_buffer, radiation_pressure, sine
buffer = modulation_buffer()sine(150 * Hz, SineOption(), SamplingConfig.FREQ_4K, buffer)
radiation_pressure(buffer)using AUTD3;using static AUTD3.Units;
var buffer = Modulation.ModulationBuffer();Modulation.Sine(150 * Hz, new SineOption(), SamplingConfig.Freq4k, buffer);
Modulation.RadiationPressure(buffer);