|
17 | 17 | import matplotlib.pyplot as plt |
18 | 18 | import numpy as np |
19 | 19 |
|
| 20 | +plt.style.use("piezod.default") |
| 21 | + |
20 | 22 | from piezod import CantileverDiffusion, CantileverEpitaxy |
21 | 23 |
|
22 | 24 | # Cantilever geometry - typical MEMS force sensor |
|
148 | 150 | # Diffusion profile |
149 | 151 | z_diff, active_diff, total_diff = c_diff.doping_profile() |
150 | 152 | ax1 = axes[0] |
151 | | -ax1.semilogy(z_diff * 1e9, active_diff, "b-", linewidth=2, label="Active") |
152 | | -ax1.semilogy(z_diff * 1e9, total_diff, "r--", linewidth=2, label="Total") |
| 153 | +ax1.semilogy(z_diff * 1e9, active_diff, "b-", label="Active") |
| 154 | +ax1.semilogy(z_diff * 1e9, total_diff, "r--", label="Total") |
153 | 155 | ax1.axhline(y=1e15, color="gray", linestyle=":", label="Background (1e15)") |
154 | 156 | ax1.axvline(x=c_diff.junction_depth * 1e9, color="green", linestyle="--", label="Junction") |
155 | 157 | ax1.set_xlabel("Depth (nm)") |
156 | 158 | ax1.set_ylabel("Concentration (cm$^{-3}$)") |
157 | 159 | ax1.set_title(f"POCl3 Diffusion Profile\n({DIFFUSION_TEMP-273.15:.0f}C, {DIFFUSION_TIME/60:.0f} min)") |
158 | 160 | ax1.legend() |
159 | 161 | ax1.set_ylim([1e14, 1e22]) |
160 | | -ax1.grid(True, alpha=0.3) |
161 | 162 |
|
162 | 163 | # Epitaxial profile (step function) |
163 | 164 | z_epi, active_epi, total_epi = c_epi.doping_profile() |
164 | 165 | ax2 = axes[1] |
165 | | -ax2.semilogy(z_epi * 1e9, active_epi, "b-", linewidth=2, label="Active = Total") |
| 166 | +ax2.semilogy(z_epi * 1e9, active_epi, "b-", label="Active = Total") |
166 | 167 | ax2.axhline(y=1e15, color="gray", linestyle=":", label="Background (1e15)") |
167 | 168 | ax2.axvline(x=c_epi.junction_depth * 1e9, color="green", linestyle="--", label="Junction") |
168 | 169 | ax2.set_xlabel("Depth (nm)") |
169 | 170 | ax2.set_ylabel("Concentration (cm$^{-3}$)") |
170 | 171 | ax2.set_title(f"Epitaxial Profile\n(N = {c_epi.dopant_concentration:.0e} cm$^{{-3}}$)") |
171 | 172 | ax2.legend() |
172 | 173 | ax2.set_ylim([1e14, 1e22]) |
173 | | -ax2.grid(True, alpha=0.3) |
174 | 174 |
|
175 | 175 | plt.tight_layout() |
176 | | -plt.savefig("doping_profiles_comparison.png", dpi=150) |
| 176 | +plt.savefig("doping_profiles_comparison.png") |
177 | 177 | print("Saved doping profile comparison to: doping_profiles_comparison.png") |
178 | 178 |
|
179 | 179 | # Plot temperature dependence of diffusion |
|
196 | 196 | diffusion_temp=temp_c + 273.15, |
197 | 197 | ) |
198 | 198 | z, active, total = c_temp.doping_profile() |
199 | | - ax3.semilogy(z * 1e9, active, color=color, linewidth=1.5, label=f"{temp_c}C") |
| 199 | + ax3.semilogy(z * 1e9, active, color=color, label=f"{temp_c}C") |
200 | 200 |
|
201 | 201 | ax3.axhline(y=1e15, color="gray", linestyle=":", alpha=0.5) |
202 | 202 | ax3.set_xlabel("Depth (nm)") |
203 | 203 | ax3.set_ylabel("Active Concentration (cm$^{-3}$)") |
204 | 204 | ax3.set_title("POCl3 Diffusion Profile vs Temperature\n(30 minute diffusion)") |
205 | 205 | ax3.legend(title="Temperature") |
206 | 206 | ax3.set_ylim([1e14, 1e22]) |
207 | | -ax3.grid(True, alpha=0.3) |
208 | 207 |
|
209 | 208 | plt.tight_layout() |
210 | | -plt.savefig("diffusion_temperature_dependence.png", dpi=150) |
| 209 | +plt.savefig("diffusion_temperature_dependence.png") |
211 | 210 | print("Saved temperature dependence plot to: diffusion_temperature_dependence.png") |
0 commit comments