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

Only filter and merge in plot_structures_eps with transparency #303

Merged
merged 5 commits into from
Apr 15, 2022

Conversation

tylerflex
Copy link
Collaborator

This makes it much faster for most cases, like .plot() with many structures

@tylerflex
Copy link
Collaborator Author

plotting Simulation with sim.medium.permittivity=2 and structures with medium permittivity ranging from 1-3.

plot()
image
does not filter and merge

plot_eps() with no alpha:
image
does not filter and merge

plot_eps() with alpha:
image
filters and merges

@momchil-flex
Copy link
Collaborator

What's your thinking about plot_field eps overlays? Since monitors will usually only cover a subspace of the simulation that hopefully won't have way too many structure intersections, it's tempting to leave it on by default. And it already accepts an eps_alpha argument so it can be turned off if eps_alpha=0? I think the only thing to make sure then is that this indeed turns the overlay off, e.g. in simulation.plot_structures_eps, if alpha == 0: return ax

@tylerflex
Copy link
Collaborator Author

I dont think we can assume monitors cover subspaces that dont have too many structure intersections unfortunately.

But I dont think we have any other option but to still do the filtering and merging for overlays.

And yea if eps_alpha=0 we just dont call simulation.plot_structures_eps() (or we can do it if alpha=0 in that function call too).

@momchil-flex
Copy link
Collaborator

I guess my question is simply should we then disable the overlay in field plotting by default?

@tylerflex tylerflex merged commit 7e08c84 into develop Apr 15, 2022
@tylerflex tylerflex deleted the tyler/filter_faster branch April 15, 2022 19:00
daquinteroflex pushed a commit to daquinteroflex/tidy3d that referenced this pull request Nov 7, 2023
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

Successfully merging this pull request may close these issues.

2 participants