Interface
Any illumination pattern is a subtype of the IlluminationPattern
SIMIlluminationPatterns.IlluminationPattern — Type
IlluminationPattern{N}Super type for N-dimensional illumination patterns.
Such an illumination pattern can be sampled at points within the object plane/space by intensity(IP, r).
SIMIlluminationPatterns.intensity — Method
@interface intensity(ip::IlluminationPattern{N}, r::SVector{N})
@interface intensity(ip::IlluminationPattern{N}, R::HyperRectangle{<:SVector{N}})Return the intensity of the illumination pattern ip at the location r (SVector{N}) or under the cell integration hyper-rectangle R (HyperRectangle{<:SVector{N}}).
Every IlluminationPattern must implement these methods.
Method intensity when r isa AbstractVector{<:Length} has a default implementation converting r to SVector{N} and calling the child implementation.
or as an illumination of a object density described by a SpatialArray by the SIMIlluminationPatterns.sample(IP, A) method
SIMIlluminationPatterns.sample — Method
sample(ip::IlluminationPattern, sa::SpatialArray)Sample the illumination pattern ip at the index locations of sa.
julia> sa = TransferFunctions.SpatialArray(rand(10,10), 61u"nm");
julia> h = Harmonic(m, Pθ, 0, I0)
Harmonic{Float64}(m=0.5, Pθ=[0.00546 nm^-1, 0.0041 nm^-1], ϕ=0.0, I0=0.000269 nm^-2)
julia> SIMIlluminationPatterns.sample(h, sa)
10×10 SampledArray{Float64, Quantity{Int64, 𝐋, Unitful.FreeUnits{(nm,), 𝐋, nothing}}, 2, Matrix{Float64}, (61 nm, 61 nm)}:
0.86838 0.86838 1.13162 1.13162 0.86838 … 1.13162 1.13162 0.86838 0.86838
0.951824 1.1798 1.04818 0.820204 0.951824 1.04818 0.820204 0.951824 1.1798
1.1798 0.951824 0.820204 1.04818 1.1798 0.820204 1.04818 1.1798 0.951824
0.86838 0.86838 1.13162 1.13162 0.86838 1.13162 1.13162 0.86838 0.86838
0.951824 1.1798 1.04818 0.820204 0.951824 1.04818 0.820204 0.951824 1.1798
1.1798 0.951824 0.820204 1.04818 1.1798 … 0.820204 1.04818 1.1798 0.951824
0.86838 0.86838 1.13162 1.13162 0.86838 1.13162 1.13162 0.86838 0.86838
0.951824 1.1798 1.04818 0.820204 0.951824 1.04818 0.820204 0.951824 1.1798
1.1798 0.951824 0.820204 1.04818 1.1798 0.820204 1.04818 1.1798 0.951824
0.86838 0.86838 1.13162 1.13162 0.86838 1.13162 1.13162 0.86838 0.86838Harmonic Illumination Pattern
The harmonic illumination pattern is represented by the Harmonic type
SIMIlluminationPatterns.Harmonic — Type
Harmonic{T} <: IlluminationPattern{2}2D Harmonic (sinusoidal) illumination pattern.
The intensity is given by
\[ I(r) = 1 + (m/2) * cos(2π * (k ⋅r + ϕ))\]