1) Physical intent
C(x) is the chemical profile after optional anneal; p(x) is active net holes with activation fraction and background compensation.
2) Range/straggle (B→Si)
Lookup table + linear interpolation gives Rp, σ; suitable for fast UI exploration. For angle θ, we project to depth: Rp←Rpcosθ, σ←σcosθ.
3) Pearson-IV & Dual-Pearson-IV
Pearson-IV captures skew/tails and is commonly used to fit SIMS or compact distributions. Dual-Pearson = main + tail component to emulate channeling tails; dose is conserved by numerical normalization.
4) Channeling control via angles
Tilt (θ): tip the wafer; Twist (φ): in-plane rotation (azimuth). Both break alignment with low-index directions and suppress channeling.
We use a smooth suppression factor S(θ,φ)=exp[-(θ/θ_c)^2]·exp[-(φ/φ_c)^2] (defaults: θc=5°, φc=25°). Parameters update as:
f_tail←f_tail·S, ΔR_p←ΔR_p·S, σ_tail_scale←1+(σ_tail_scale−1)·S, v←v·S.
5) Anneal
Discrete Gaussian convolution with σ_D=√(2Dt) (cm), kernel normalized so total dose is preserved.
6) Activation & background
- p-type background:
p(x)=N_B + f·C(x) - n-type background:
p(x)=max(f·C(x) − N_B, 0)
7) Auto depth
With auto depth, if xj does not exist or sits off the right edge, the plot extends until NB and the crossing are visible, then pads a bit to keep the marker readable.
8) UX
Log/linear Y, drag-to-zoom, wheel zoom, double-click reset. Export PNG/CSV reproduces current theme, scale, and series selection.