update notebooks to local ModeSimulation#532
Conversation
Spell Check ReportTFLNTidy3d.ipynb: Checked 7 notebook(s). Found spelling errors in 1 file(s). |
|
Hi guys. Just updated a few notebooks |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit d2327f3. Configure here.
| "metadata": {}, | ||
| "source": [ | ||
| "To obtain the width of the bus waveguide in each asymmetric directional coupler, we need to first calculate the relationship between the effective indices of each mode and the waveguide width. This can be achieved by using the [ModeSolver](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.plugins.mode.ModeSolver.html) from Tidy3D's plugins. This computation will be done on a local computer so it won't cost any FlexCredits.\n", | ||
| "To obtain the width of the bus waveguide in each asymmetric directional coupler, we need to first calculate the relationship between the effective indices of each mode and the waveguide width. This can be achieved by using the [ModeSimulation](https://docs.flexcompute.com/projects/tidy3d/en/latest/api/_autosummary/tidy3d.ModeSimulation.html) from Tidy3D's plugins. This computation will be done on a local computer so it won't cost any FlexCredits.\n", |
There was a problem hiding this comment.
Notebook claims local free runs
Medium Severity
The mode-index width-sweep cells now submit each iteration with web.run, but the introductory text still states the step runs locally and costs no FlexCredits. Readers who trust that description will misjudge cost and runtime versus what the notebook actually executes.
Additional Locations (2)
Reviewed by Cursor Bugbot for commit d2327f3. Configure here.
alec-flexcompute
left a comment
There was a problem hiding this comment.
Looks great, thanks @FilipeFcp !


Note
Low Risk
Example notebook and API migration only; no library or runtime product code changes.
Overview
Updates three Tidy3D example notebooks to use
td.ModeSimulationinstead of theModeSolverplugin, including doc links and narrative text.8-channel demultiplexer: Width-sweep mode solves now build
ModeSimulation.from_simulationand submit viaweb.run(noted as server-side for ~30 tasks per sweep); a one-off bus-waveguide visualization usesrun_local().td.config.simulation.use_local_subpixel = Trueis set in setup.90° bend polarization splitter/rotator and anisotropic metamaterial PBS: Mode analysis moves from
run_mode_solveron the server to localModeSimulation.run_local()with local subpixel averaging; the PBS notebook also switches field plots frommode_solver.plot_fieldtosim_data.plot_field.Imports drop
tidy3d.plugins.modehelpers where no longer needed.Reviewed by Cursor Bugbot for commit d2327f3. Bugbot is set up for automated code reviews on this repo. Configure here.