DeMarcoLab / juno

juno is a simulation package for optical system design using full wave propagation.
https://demarcolab.github.io/juno
MIT License
59 stars 2 forks source link

Escape path dimensions don't match with specific pixel size/escape path combo #42

Open DavidDierickx opened 1 year ago

DavidDierickx commented 1 year ago

When escape path is 0.1, a pixel size of 1um with 250um diameter fails to generate due to the following error:

ERROR: ERROR: Traceback (most recent call last): File "C:\Users\Dadie1\Github\juno\juno\ui\ElementCreation.py", line 424, in update_visualisation lens = generate_lens(self.config, Medium(medium), pixelsize) File "C:\Users\Dadie1\Github\juno\juno\Lens.py", line 703, in generate_lens lens = apply_modifications(lens, lens_config) File "C:\Users\Dadie1\Github\juno\juno\Lens.py", line 716, in apply_modifications lens.create_escape_path(lens_config["escape_path"]) File "C:\Users\Dadie1\Github\juno\juno\Lens.py", line 529, in create_escape_path profile_with_escape_path[self.escape_mask] = 0 IndexError: boolean index did not match indexed array along dimension 0; dimension is 275 but corresponding boolean dimension is 276

Recreation: Set escape path to 0.1 Set diameter to 250um Set pixel size to 2um Generate Profile Set pixel size to 1um Generate Profile