Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

M1 transitions #100

Closed
wants to merge 9 commits into from
Prev Previous commit
Next Next commit
the easiest way to define microwaves is to give them a derived 'point…
…ing' field not needed in the constructor. That way, nothing has to change in traps.jl
thomasdellaert committed Sep 13, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 19c86b42d49819782e858fb7742a97cd17f836d3
4 changes: 3 additions & 1 deletion src/lightfields.jl
Original file line number Diff line number Diff line change
@@ -135,6 +135,7 @@ mutable struct Microwave <: LightField
ϵ::NamedTuple{(:x, :y, :z)}
k::NamedTuple{(:x, :y, :z)}
ϕ::Function
pointing::Array{Tuple{Int, <:Real}}(undef, 0)
function Microwave(;
λ = nothing,
E::TE = 0,
@@ -150,7 +151,8 @@ mutable struct Microwave <: LightField
# Above commented out until we figure out a better place to put this warning
TE <: Number ? Et(t) = E : Et = E
<: Number ? ϕt(t) = ϕ : ϕt = ϕ
return new(λ, Et, Δ, ϵ, k, ϕt)

return new(λ, Et, Δ, ϵ, k, ϕt, [])
end
# for copying
Microwave(λ, E, Δ, ϵ, k, ϕ) = new(λ, E, Δ, ϵ, k, ϕ)
2 changes: 1 addition & 1 deletion src/traps.jl
Original file line number Diff line number Diff line change
@@ -66,7 +66,7 @@ mutable struct Trap
Bhat::NamedTuple{(:x, :y, :z)}
∇B::Real
δB::Function
lasers::Array{<:Laser}
lasers::Array{<:LightField}
basis::CompositeBasis
_cnst_δB::Bool
function Trap(;