11# using Pkg
22# Pkg.activate("dev")
33
4- # using Revise
5- using SMLMSim # must be 'dev'ed in the current environment
4+ using Revise
5+ using SMLMSim
66using CairoMakie
7-
7+ using MicroscopePSFs
88#= =========================================================================
99Basic Usage
1010==========================================================================#
@@ -25,7 +25,7 @@ smld_true, smld_model, smld_noisy = simulate(;
2525 framerate= 50.0 , # frames per second
2626 pattern= Nmer2D(n= 6 , d= 0.2 ), # hexamer with 200nm diameter
2727 molecule= GenericFluor(; q= [0 50 ; 1e-2 0 ]), # rates in 1/s
28- camera= IdealCamera(; ypixels = 256 , xpixels = 128 , pixelsize = 0.1 ) # pixelsize in μm
28+ camera= IdealCamera(1 : 256 , 1 : 128 , 0.1 ) # pixelsize in μm
2929)
3030
3131#= =========================================================================
@@ -77,7 +77,7 @@ params = SmoluchowskiParams(
7777systems = simulate(params)
7878
7979# Visualize the simulation
80- visualize_sequence(systems, filename= " diffusion.mp4" , framerate= 30 )
80+ visualize_sequence(systems, filename= " diffusion.mp4" , framerate= round(Int64, 1 / params . dt) )
8181
8282# Generate microscope images
8383psf = Gaussian2D(0.15 ) # 150nm PSF width
@@ -121,7 +121,8 @@ ax = Axis(fig[1, 1],
121121 title= " Simulated SMLM Localizations" ,
122122 xlabel= " x (μm)" ,
123123 ylabel= " y (μm)" ,
124- aspect= DataAspect()
124+ aspect= DataAspect(),
125+ yreversed= true # This makes (0,0) at top-left
125126)
126127
127128# Scatter plot with photon counts as color
0 commit comments