Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions examples/1d_mot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,12 @@ fn main() {
.create_entity()
.with(GaussianBeam {
intersection: Vector3::new(0.0, 0.0, 0.0),
e_radius: 0.01,
w0_x: 0.01,
w0_y: 0.01,
power,
direction: -Vector3::z(),
rayleigh_range: f64::INFINITY,
ellipticity: 0.0,
rayleigh_range_x: f64::INFINITY,
rayleigh_range_y: f64::INFINITY,
})
.with(CoolingLight::for_transition::<Strontium88_461>(
detuning,
Expand All @@ -58,11 +59,12 @@ fn main() {
.create_entity()
.with(GaussianBeam {
intersection: Vector3::new(0.0, 0.0, 0.0),
e_radius: 0.01,
w0_x: 0.01,
w0_y: 0.01,
power,
direction: Vector3::z(),
rayleigh_range: f64::INFINITY,
ellipticity: 0.0,
rayleigh_range_x: f64::INFINITY,
rayleigh_range_y: f64::INFINITY,
})
.with(CoolingLight::for_transition::<Strontium88_461>(
detuning,
Expand Down
35 changes: 20 additions & 15 deletions examples/2d_plus_mot_from_oven.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,12 @@ fn main() {
.create_entity()
.with(GaussianBeam {
intersection: Vector3::new(0.0, 0.0, 0.0),
e_radius: push_beam_radius,
w0_x: push_beam_radius,
w0_y: push_beam_radius,
power: push_beam_power,
direction: Vector3::z(),
rayleigh_range: f64::INFINITY,
ellipticity: 0.0,
rayleigh_range_x: f64::INFINITY,
rayleigh_range_y: f64::INFINITY,
})
.with(CoolingLight::for_transition::<Strontium88_461>(
push_beam_detuning,
Expand All @@ -73,11 +74,12 @@ fn main() {
.create_entity()
.with(GaussianBeam {
intersection: Vector3::new(0.0, 0.0, 0.0),
e_radius: radius,
w0_x: radius,
w0_y: radius,
power,
direction: Vector3::new(1.0, 1.0, 0.0).normalize(),
rayleigh_range: f64::INFINITY,
ellipticity: 0.0,
rayleigh_range_x: f64::INFINITY,
rayleigh_range_y: f64::INFINITY,
})
.with(CoolingLight::for_transition::<Strontium88_461>(
detuning,
Expand All @@ -88,11 +90,12 @@ fn main() {
.create_entity()
.with(GaussianBeam {
intersection: Vector3::new(0.0, 0.0, 0.0),
e_radius: radius,
w0_x: radius,
w0_y: radius,
power,
direction: Vector3::new(1.0, -1.0, 0.0).normalize(),
rayleigh_range: f64::INFINITY,
ellipticity: 0.0,
rayleigh_range_x: f64::INFINITY,
rayleigh_range_y: f64::INFINITY,
})
.with(CoolingLight::for_transition::<Strontium88_461>(
detuning,
Expand All @@ -103,11 +106,12 @@ fn main() {
.create_entity()
.with(GaussianBeam {
intersection: Vector3::new(0.0, 0.0, 0.0),
e_radius: radius,
w0_x: radius,
w0_y: radius,
power,
direction: Vector3::new(-1.0, 1.0, 0.0).normalize(),
rayleigh_range: f64::INFINITY,
ellipticity: 0.0,
rayleigh_range_x: f64::INFINITY,
rayleigh_range_y: f64::INFINITY,
})
.with(CoolingLight::for_transition::<Strontium88_461>(
detuning,
Expand All @@ -118,11 +122,12 @@ fn main() {
.create_entity()
.with(GaussianBeam {
intersection: Vector3::new(0.0, 0.0, 0.0),
e_radius: radius,
w0_x: radius,
w0_y: radius,
power,
direction: Vector3::new(-1.0, -1.0, 0.0).normalize(),
rayleigh_range: f64::INFINITY,
ellipticity: 0.0,
rayleigh_range_x: f64::INFINITY,
rayleigh_range_y: f64::INFINITY,
})
.with(CoolingLight::for_transition::<Strontium88_461>(
detuning,
Expand Down
42 changes: 24 additions & 18 deletions examples/benchmark.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,12 @@ fn main() {
.create_entity()
.with(GaussianBeam {
intersection: beam_centre,
e_radius: radius,
w0_x: radius,
w0_y: radius,
power,
direction: Vector3::new(0.0, 0.0, 1.0),
rayleigh_range: f64::INFINITY,
ellipticity: 0.0,
rayleigh_range_x: f64::INFINITY,
rayleigh_range_y: f64::INFINITY,
})
.with(CoolingLight::for_transition::<Rubidium87_780D2>(
detuning,
Expand All @@ -101,11 +102,12 @@ fn main() {
.create_entity()
.with(GaussianBeam {
intersection: beam_centre,
e_radius: radius,
w0_x: radius,
w0_y: radius,
power,
direction: Vector3::new(0.0, 0.0, -1.0),
rayleigh_range: f64::INFINITY,
ellipticity: 0.0,
rayleigh_range_x: f64::INFINITY,
rayleigh_range_y: f64::INFINITY,
})
.with(CoolingLight::for_transition::<Rubidium87_780D2>(
detuning,
Expand All @@ -116,11 +118,12 @@ fn main() {
.create_entity()
.with(GaussianBeam {
intersection: beam_centre,
e_radius: radius,
w0_x: radius,
w0_y: radius,
power,
direction: Vector3::new(-1.0, 0.0, 0.0),
rayleigh_range: f64::INFINITY,
ellipticity: 0.0,
rayleigh_range_x: f64::INFINITY,
rayleigh_range_y: f64::INFINITY,
})
.with(CoolingLight::for_transition::<Rubidium87_780D2>(
detuning,
Expand All @@ -131,11 +134,12 @@ fn main() {
.create_entity()
.with(GaussianBeam {
intersection: beam_centre,
e_radius: radius,
w0_x: radius,
w0_y: radius,
power,
direction: Vector3::new(1.0, 0.0, 0.0),
rayleigh_range: f64::INFINITY,
ellipticity: 0.0,
rayleigh_range_x: f64::INFINITY,
rayleigh_range_y: f64::INFINITY,
})
.with(CoolingLight::for_transition::<Rubidium87_780D2>(
detuning,
Expand All @@ -146,11 +150,12 @@ fn main() {
.create_entity()
.with(GaussianBeam {
intersection: beam_centre,
e_radius: radius,
w0_x: radius,
w0_y: radius,
power,
direction: Vector3::new(0.0, 1.0, 0.0),
rayleigh_range: f64::INFINITY,
ellipticity: 0.0,
rayleigh_range_x: f64::INFINITY,
rayleigh_range_y: f64::INFINITY,
})
.with(CoolingLight::for_transition::<Rubidium87_780D2>(
detuning,
Expand All @@ -161,11 +166,12 @@ fn main() {
.create_entity()
.with(GaussianBeam {
intersection: beam_centre,
e_radius: radius,
w0_x: radius,
w0_y: radius,
power,
direction: Vector3::new(0.0, -1.0, 0.0),
rayleigh_range: f64::INFINITY,
ellipticity: 0.0,
rayleigh_range_x: f64::INFINITY,
rayleigh_range_y: f64::INFINITY,
})
.with(CoolingLight::for_transition::<Rubidium87_780D2>(
detuning,
Expand Down
7 changes: 4 additions & 3 deletions examples/cross_section.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,12 @@ fn main() {
.create_entity()
.with(GaussianBeam {
intersection: Vector3::new(0.0, 0.0, 0.0),
e_radius: radius,
w0_x: radius,
w0_y: radius,
power,
direction: Vector3::x(),
rayleigh_range: f64::INFINITY,
ellipticity: 0.0,
rayleigh_range_x: f64::INFINITY,
rayleigh_range_y: f64::INFINITY,
})
.with(CoolingLight::for_transition::<Rubidium87_780D2>(
detuning,
Expand Down
17 changes: 10 additions & 7 deletions examples/dipole_trap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,18 @@ fn main() {

// Create dipole laser.
let power = 10.0;
let e_radius = 60.0e-6 / (2.0_f64.sqrt());
let w0_x = 60.0e-6;
let w0_y = 60.0e-6;
let wavelength = 1064.0e-9;

let gaussian_beam = GaussianBeam {
intersection: Vector3::new(0.0, 0.0, 0.0),
e_radius,
w0_x,
w0_y,
power,
direction: Vector3::x(),
rayleigh_range: crate::laser::gaussian::calculate_rayleigh_range(&wavelength, &e_radius),
ellipticity: 0.0,
rayleigh_range_x: crate::laser::gaussian::calculate_rayleigh_range(&wavelength, &w0_x),
rayleigh_range_y: crate::laser::gaussian::calculate_rayleigh_range(&wavelength, &w0_y),
};
sim.world
.create_entity()
Expand All @@ -53,11 +55,12 @@ fn main() {

let gaussian_beam = GaussianBeam {
intersection: Vector3::new(0.0, 0.0, 0.0),
e_radius,
w0_x,
w0_y,
power,
direction: Vector3::y(),
rayleigh_range: crate::laser::gaussian::calculate_rayleigh_range(&wavelength, &e_radius),
ellipticity: 0.0,
rayleigh_range_x: crate::laser::gaussian::calculate_rayleigh_range(&wavelength, &w0_x),
rayleigh_range_y: crate::laser::gaussian::calculate_rayleigh_range(&wavelength, &w0_y),
};
sim.world
.create_entity()
Expand Down
48 changes: 27 additions & 21 deletions examples/doppler_limit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,18 +79,19 @@ fn main() {
// Create cooling lasers.
let detuning = configuration.detuning;
let power = 0.02;
let radius = 66.7e-3 / (2.0_f64.sqrt());
let radius = 66.7e-3 ;
let beam_centre = Vector3::new(0.0, 0.0, 0.0);

sim.world
.create_entity()
.with(GaussianBeam {
intersection: beam_centre,
e_radius: radius,
w0_x: radius,
w0_y: radius,
power,
direction: Vector3::new(0.0, 0.0, 1.0),
rayleigh_range: f64::INFINITY,
ellipticity: 0.0,
rayleigh_range_x: f64::INFINITY,
rayleigh_range_y: f64::INFINITY,
})
.with(CoolingLight::for_transition::<Rubidium87_780D2>(
detuning,
Expand All @@ -101,11 +102,12 @@ fn main() {
.create_entity()
.with(GaussianBeam {
intersection: beam_centre,
e_radius: radius,
w0_x: radius,
w0_y: radius,
power,
direction: Vector3::new(0.0, 0.0, -1.0),
rayleigh_range: f64::INFINITY,
ellipticity: 0.0,
rayleigh_range_x: f64::INFINITY,
rayleigh_range_y: f64::INFINITY,
})
.with(CoolingLight::for_transition::<Rubidium87_780D2>(
detuning,
Expand All @@ -116,11 +118,12 @@ fn main() {
.create_entity()
.with(GaussianBeam {
intersection: beam_centre,
e_radius: radius,
w0_x: radius,
w0_y: radius,
power,
direction: Vector3::new(-1.0, 0.0, 0.0),
rayleigh_range: f64::INFINITY,
ellipticity: 0.0,
direction: Vector3::new(-1.0, 0.0, 1.0),
rayleigh_range_x: f64::INFINITY,
rayleigh_range_y: f64::INFINITY,
})
.with(CoolingLight::for_transition::<Rubidium87_780D2>(
detuning,
Expand All @@ -131,11 +134,12 @@ fn main() {
.create_entity()
.with(GaussianBeam {
intersection: beam_centre,
e_radius: radius,
w0_x: radius,
w0_y: radius,
power,
direction: Vector3::new(1.0, 0.0, 0.0),
rayleigh_range: f64::INFINITY,
ellipticity: 0.0,
direction: Vector3::new(1.0, 0.0, 1.0),
rayleigh_range_x: f64::INFINITY,
rayleigh_range_y: f64::INFINITY,
})
.with(CoolingLight::for_transition::<Rubidium87_780D2>(
detuning,
Expand All @@ -146,11 +150,12 @@ fn main() {
.create_entity()
.with(GaussianBeam {
intersection: beam_centre,
e_radius: radius,
w0_x: radius,
w0_y: radius,
power,
direction: Vector3::new(0.0, 1.0, 0.0),
rayleigh_range: f64::INFINITY,
ellipticity: 0.0,
rayleigh_range_x: f64::INFINITY,
rayleigh_range_y: f64::INFINITY,
})
.with(CoolingLight::for_transition::<Rubidium87_780D2>(
detuning,
Expand All @@ -161,11 +166,12 @@ fn main() {
.create_entity()
.with(GaussianBeam {
intersection: beam_centre,
e_radius: radius,
w0_x: radius,
w0_y: radius,
power,
direction: Vector3::new(0.0, -1.0, 0.0),
rayleigh_range: f64::INFINITY,
ellipticity: 0.0,
rayleigh_range_x: f64::INFINITY,
rayleigh_range_y: f64::INFINITY,
})
.with(CoolingLight::for_transition::<Rubidium87_780D2>(
detuning,
Expand Down
Loading
Loading