-
Notifications
You must be signed in to change notification settings - Fork 50
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
fix[invdes]: handle pixel size validation for simulations without sources #2161
Conversation
Porting from other discussion: do we want to just fix |
@momchil-flex @tylerflex I think it might be best to raise an error in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @yaugenst-flex!
I just gave it a try, and it works well. In which cases do you plan to run optimizations without sources? Eigenmode optimizations?
Emerson
Great! Actually it's not as much about running the optimization but just being able to set up optimizations, because a common pattern we use involves doing |
Got it! Yes, it should also work for GUI. |
Merging now but will follow up with a fix for |
Currently
InverseDesign
validation will error if the simulation contains no sources due to the_check_pixel_size
validator trying to accesssim.wvl_mat_min
, which depends on the sources being present.This PR skips the validator if the simulation contains no sources and instead warns the user about checking the pixel size. The reason for not erroring is that we probably still want to allow the construction of simulations without sources in the plugin since we also allow it in
td.Simulation
(and it can be useful in some cases).