OpenSIM: Documentation
Amit Lal
∗
, Chunyan Shan
†
, and Peng Xi
‡
January 23, 2016
version 1.0
Contents
1 File Description 2
2 Instructions for using SIMbasic files 3
3 Instructions for using SIMexpt files 5
4 Instructions for using TIRFbasic files 6
5 Instructions for using TIRFexpt files 6
6 System Requirements 7
∗
Department of Biomedical Engineering, College of Engineering, Peking University, Beijing 100871, China.
†
School of Life Sciences, Peking University, Beijing 100871, China.
‡
Department of Biomedical Engineering, College of Engineering, Peking University, Beijing 100871, China.
E-mail: xipeng@pku.edu.cn
1
1 File Description
1. The OpenSIM matlab codes may be downloaded from:
https://github.com/LanMai/OpenSI M
The site also accompanies OpenSIM mannual providing necessary instructions for using
these codes.
2. OpenSIM codes are provided in four sets (folders) – SIMbasic, SIMexpt, TIRFbasic and
TIRFexpt, Fig. 1. Files contained in SIMbasic are suited to perform SIM reconstruction
on simulated raw SIM images, while those contained in SIMexpt are suited for performing
SIM reconstruction on experimental r aw SIM images. Files contained in TIRFbasic and
TIRFexpt are TIRF-SIM counterparts of SIMbasic and SIMexpt, respectively.
Figure 1: OpenSIM code sets: SIMbasic, SIMexpt, TIRFbasic and TIRFexpt.
3. SIMbasic contains 23 Matlab files, listed in Table 1, and one synthetic image file testpat.tiff,
see Fig. 2. [testpat.tiff is identical w ith testpat.1k.tiff m entioned in manuscript
(section VI-A), but is renamed to avoid two dots ‘.’ in its name.]
4. SIMexpt contains 23 Matlab files, plus two ‘.tif’ files: OTF.tif and sim01z4.tif. OTF.tif
is the experimentally determined system OTF, while sim01z4.tif is experimental r aw
SIM data file, see Fig. 3. Nomenclature of Matlab files contained in SIMexpt are identical
with that listed in Table 1, with the following exceptions:
(a) SIMimagesF.m and PsfOtf.m are abs ent,
(b) Contains two new files
• OTFpost.m: flattens out the rippling higher fr equencies outside OT F support,
and
2
• BgNormalization0.m: Carries out intensity normalization of raw SIM images
(c) Files SIMo.m and PCMfilteringF.m in SIMexpt differ f rom their counterparts in SIM-
basic, a heuristically designed notch filter (Eq. 25 of main m anuscript) is incorporated
to suppress residual peaks resulting from inaccuracies in background fluorescence re-
moval.
5. TIRFbasic contains 21 Matlab files, and one synthetic image file testpat.tiff. Nomen-
clature of Matlab files contained in TIRFbasic are identical with that listed in Table 1,
with the following exceptions:
(a) ApproxFreqDuplex.m, IlluminationFreqF.m, IlluminationPhaseF.m,
PatternPhaseOpt.m and PhaseKai2opt.m are absent,
(b) Contains followin g new files
• Kai2Opt.m: Optimizes the relative phases φ
′
2
and φ
′
3
,
• IlluminationFreqTIRF.m: Estimates illumination frequency vector p
θ
, and
• Ifreq2opt.m: Used for subpixel optimization of p
θ
within IlluminationFreqTIRF.m.
6. TIRFexpt contains 21 Matlab files, plus two ‘.tif’ files: OTF.tif an d sim01z4.tif. OTF.tif
is the experimentally determined system OTF, while sim01z4.tif is experimental r aw
SIM d ata file, see Fig. 3. Nomenclature of Matlab files contained in TIRFexpt are identical
with that listed in Table 1, with the following exceptions:
(a) SIMimagesF.m, PsfOtf.m, ApproxFreqDuplex.m, IlluminationFreqF.m,
IlluminationPhaseF.m, PatternPhaseOpt.m and PhaseKai2opt.m are absent,
(b) Contains followin g new files
• OTFpost.m: flattens out the rippling higher fr equencies outside OT F support,
and
• BgNormalization0.m: Carries out intensity normalization of raw SIM images
• Kai2Opt.m: Optimizes the relative phases φ
′
2
and φ
′
3
,
• IlluminationFreqTIRF.m: Estimates illumination frequency vector p
θ
, and
• Ifreq2opt.m: Used for subpixel optimization of p
θ
within IlluminationFreqTIRF.m.
(c) Files SIMo.m and PCMfilteringF.m in TIRFexpt differ from their counterparts in
TIRFbasic, a heuristically designed notch filter (Eq. 25 of main manuscript) is in-
corporated to suppress residual peaks resulting from inaccuracies in background
fluorescence removal.
7. SIMo.m is the main script file in all SIMbasic, SIMexpt, TIRFbasic and TIRFexpt. Rest of
the *.m fi les in each folder, are function files that are used by SIMo.m for its operation.
2 Instructions for using SIMbasic files
1. Open the file SIMo.m contained in folder SIMbasic usin g Matlab. First few lines of SIMo.m
are shown in Fig. 4.
2. Referring to Fig. 4, the parameter values that a user may choose to fidd le with are as
follows:
(a) scale (on line 12): altering this parameter changes w idth of PSF (and hence, cor-
responding OTF
˜
H(k) support).
3
Table 1: SIMbasic files
File name Function
1 SIMo.m Main script file for simulated raw SIM images and
then carr y ing out SIM reconstru ction
2 PsfOtf.m Generates PSF, and corresponding OTF
˜
H(k),
using Bessel function
3 SIMimagesF.m Generates simulated raw SIM images D
θ ,φ
(r) [θ =
θ
1
, θ
2
, θ
3
and φ = φ
1
, φ
2
, φ
3
]
4 PCMseparateF.m Performs steps 3-10 of S IM-RA
5 IlluminationFreqF.m Estimates illumination frequency vector p
θ
(step 4
of SI M-RA)
6 ApproxFreqDuplex.m Provides initial gu ess for p
θ
determination
7 PhaseKai2opt.m Performs the iterative optimization for p
θ
deter-
mination
8 OTFedgeF.m Computes OTF cut-off frequency
9 IlluminationPhaseF.m Estimates illumination phase shift φ (step 8 of
SIM-RA)
10 PatternPhaseOpt.m Performs the iterative optimization for φ determi-
nation
11 SeparatedComponents2D.m Computes noisy estimates of
˜
S(k)
˜
H(k),
˜
S(k −
p
θ
)
˜
H(k) and
˜
S(k + p
θ
)
˜
H(k) (step 10 of SIM-
RA)
12 OBJpowerPara.m Determines object power parameters A and α
(step 12 of SIM-RA)
13 OBJparaOpt.m Performs the iterative optimization for determi-
nation of A and α
14 PCMfilteringF.m Performs steps 14-17 of SIM-RA
15 ModulationFactor.m Determines modulation factor m (step 14 of SIM-
RA)
16 WoFilterCenter.m Wiener filters noisy
˜
S(k)
˜
H(k) to obtain
˜
S
u
(k)
(step 15 of SIM-RA)
17 WoFilterSideLobe.m Wiener filters noisy
˜
S(k − p
θ
)
˜
H(k) and
˜
S(k +
p
θ
)
˜
H(k) to obtain
˜
S
u
(k − p
θ
) and
˜
S
u
(k − p
θ
),
respectively (step 15 of SIM-RA)
18 OTFdoubling.m Embeds system OTF in doubled r an ge of fre-
quency; this allows accommodation of higher
frequencies in r econstructed images
19 MergingHeptaletsF.m Merges all nine frequency components using gen-
eralized Wiener Filter (step 19 of SIM-RA)
20 TripletSNR0.m Computes average signal powers of
˜
S
u
(k),
˜
S
s
(k −
p
θ
) and
˜
S
s
(k + p
θ
)
21 SIMplot.m Plots the reconstructed SIM images
22 ApodizationFunction.m Masks the higher residual frequencies of
˜
D
SIM
(k),
i.e. computes
˜
D
SIM
(k)
˜
A(k) [section VII-E]
23 OTFmaskShifted.m Used in computation of apodization mask
˜
A(k)
4