Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x and y limits to plot #723

Closed
4 tasks
tylerflex opened this issue Feb 24, 2023 · 1 comment
Closed
4 tasks

x and y limits to plot #723

tylerflex opened this issue Feb 24, 2023 · 1 comment
Assignees

Comments

@tylerflex
Copy link
Collaborator

tylerflex commented Feb 24, 2023

Our Simulation supports .plot() and .plot_eps methods, which plot the structures on a single plane. See this notebook for more details.

However, when the simulations get very large, this image can get way too large to render in a reasonable time.

Instead, a use might want to zoom into the plot, by supplying limits.

We would like a feature where the user can supply other keyword arguments to these plotting methods to add limits to the plot.

  1. Design an API, how would the user specify the limits given the current plot call?

Then, the plotting should only grab the objects that intersect with the limited extent plane. Hint: there is a Geometry.intersections_box2d method that can be useful for this.

  1. Implement the changes to the plotting method where only structures intersecting with the limited extent plane are displayed

  2. Test performance on a wide structure (eg a metalens) with and without this plot limits to verify the speedup.4.

Checklist

a PR in this repository (into develop branch) containing

  • The new method
  • Test coverage in tests/test_components/test_viz.py or tests/test_components/test_simulation.py.
  • Add line to CHANGELOG.md explaining what was added.

a PR to the tidy3d-docs repository (develop branch)

@tylerflex
Copy link
Collaborator Author

Fixed by #1044

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants