GS
Gershberg-Saxon, Gain for multiple focal points based on the paper by Marzo et al.1.
use autd3::prelude::*;
use autd3_gain_holo::{EmissionConstraint, Pa, GS, GSOption};
use std::num::NonZeroUsize;
fn main() {
let x1 = 0.;
let y1 = 0.;
let z1 = 0.;
let x2 = 0.;
let y2 = 0.;
let z2 = 0.;
let _ =
GS::new(
vec![
(Point3::new(x1, y1, z1), 5e3 * Pa),
(Point3::new(x2, y2, z2), 5e3 * Pa),
],
GSOption {
repeat: NonZeroUsize::new(100).unwrap(),
constraint: EmissionConstraint::Clamp(Intensity::MIN, Intensity::MAX),
},
);
}
#include<autd3.hpp>
#include "autd3/gain/holo.hpp"
using namespace autd3;
using gain::holo::Pa;
int main() {
const auto x1 = 0.0;
const auto y1 = 0.0;
const auto z1 = 0.0;
const auto x2 = 0.0;
const auto y2 = 0.0;
const auto z2 = 0.0;
auto g = gain::holo::GS(
std::vector<std::pair<Point3, gain::holo::Amplitude>>{
{Point3(x1, y1, z1), 5e3 * Pa},
{Point3(x2, y2, z2), 5e3 * Pa},
},
gain::holo::GSOption{
.repeat = 100,
.constraint = gain::holo::EmissionConstraint::Clamp(
std::numeric_limits<Intensity>::min(),
std::numeric_limits<Intensity>::max()),
});
return 0; }
using AUTD3Sharp.Gain.Holo;
using AUTD3Sharp;
using AUTD3Sharp.Utils;
using static AUTD3Sharp.Units;
var x1 = 0.0f;
var y1 = 0.0f;
var z1 = 0.0f;
var x2 = 0.0f;
var y2 = 0.0f;
var z2 = 0.0f;
new GS(
foci: [
(new Point3(x1, y1, z1), 5e3f * Pa),
(new Point3(x2, y2, z2), 5e3f * Pa)
],
option: new GSOption
{
Repeat = 100,
EmissionConstraint = EmissionConstraint.Clamp(Intensity.Min, Intensity.Max),
}
);
import numpy as np
from pyautd3 import Intensity
from pyautd3.gain.holo import GS, EmissionConstraint, GSOption, Pa
x1 = 0.0
y1 = 0.0
z1 = 0.0
x2 = 0.0
y2 = 0.0
z2 = 0.0
GS(
foci=[(np.array([x1, y1, z1]), 5e3 * Pa), (np.array([x2, y2, z2]), 5e3 * Pa)],
option=GSOption(
repeat=100,
constraint=EmissionConstraint.Clamp(Intensity.MIN, Intensity.MAX),
),
)
repeat is the number of iterations, the default is as above.
For details on the parameters, refer to the paper1.
1
Marzo, Asier, and Bruce W. Drinkwater. “Holographic acoustic tweezers.” Proceedings of the National Academy of Sciences 116.1 (2019): 84-89.