DESC
DESC copied to clipboard
Figures for Surface Current and Coil-Cutting Paper
Small thing which I think is fine: the torus knots rely on #844 to make the figures, which I note in the script.
Check out this pull request on ![]()
See visual diffs & provide feedback on Jupyter Notebooks.
Powered by ReviewNB
plt.figure()
theta_grid = np.linspace(0, 2 * np.pi, 300)
zeta_grid = np.linspace(0, 2 * np.pi, 300)
grid = LinearGrid(rho=1.0, theta=theta_grid, zeta=zeta_grid)
fig = plot_3d(eq, name="|B|", grid=grid)
fig.update_traces(
colorbar=dict(
tickfont=dict(size=58), # Adjust the size value as needed
title_font=dict(size=58), # Adjust the size value as needed
)
)
fig.update_layout(font=dict(size=18, color="black", family="Arial, sans-serif"))
config = {
"toImageButtonOptions": {
"filename": f"modB_3d_{keyword}_{legend}",
"format": "svg",
"scale": scale,
}
}
save_path_html = os.getcwd() + f"/3D_modB/modB_3d_{keyword}_{legend}.html"
fig.write_html(
save_path_html, config=config, include_plotlyjs=True, full_html=True
)
# save_path_png = os.getcwd() + f"/3D_modB/modB_3d_{keyword}_{legend}.png"
# fig.write_image(save_path_png, scale=scale)
plt.close()
Something you can use to increase the font size of the colorbar for the 3D plots and save a svg (high resolution and small file size).
Memory benchmark result
| Test Name | %Δ | Master (MB) | PR (MB) | Δ (MB) | Time PR (s) | Time Master (s) |
| -------------------------------------- | ------------ | ------------------ | ------------------ | ------------ | ------------------ | ------------------ |
test_objective_jac_w7x | -1.74 % | 3.925e+03 | 3.857e+03 | -68.32 | 31.65 | 29.93 |
test_proximal_jac_w7x_with_eq_update | 0.15 % | 6.829e+03 | 6.840e+03 | 10.44 | 157.39 | 158.91 |
test_proximal_freeb_jac | 0.27 % | 1.319e+04 | 1.323e+04 | 36.07 | 75.49 | 76.52 |
test_proximal_freeb_jac_blocked | 1.65 % | 7.548e+03 | 7.673e+03 | 124.63 | 65.87 | 67.39 |
test_proximal_freeb_jac_batched | -0.25 % | 7.576e+03 | 7.558e+03 | -18.67 | 66.58 | 67.80 |
test_proximal_jac_ripple | -0.64 % | 7.594e+03 | 7.545e+03 | -48.62 | 67.99 | 69.10 |
test_proximal_jac_ripple_spline | 0.54 % | 3.448e+03 | 3.467e+03 | 18.70 | 68.80 | 69.30 |
test_eq_solve | 7.27 % | 2.004e+03 | 2.150e+03 | 145.73 | 124.45 | 124.17 |
For the memory plots, go to the summary of Memory Benchmarks workflow and download the artifact.