You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to visualize the epsilon profile of the patterned layer named "slab" in the example file "phc_slab_circ_hole_spectrum.py", using ReconstructLayer (as defined on line 309 of simulator.py).
I'm not entirely sure about the correct usage of ReconstructLayer but I'm just doing: s.ReconstructLayer('slab', 100, 100) or s.ReconstructLayer('slab') (since nx and ny both seem to default to 101). In both cases, I get the error:
Traceback (most recent call last):
File "phc_slab_circ_hole_spectrum.py", line 32, in <module>
s.ReconstructLayer('slab')
File "/home/sachin/miniconda3/lib/python3.7/site-packages/inkstone/simulator.py", line 337, in ReconstructLayer
result = self.layers[name].reconstruct(nx, ny)
File "/home/sachin/miniconda3/lib/python3.7/site-packages/inkstone/layer.py", line 395, in reconstruct
for em in [fft.ifftshift(self.epsi_fs, axes=(0, 1)), fft.ifftshift(self.epsi_inv_fs, axes=(0, 1)), fft.ifftshift(self.mu_fs, axes=(0, 1)), fft.ifftshift(self.mu_inv_fs, axes=(0, 1))]]
File "<__array_function__ internals>", line 6, in ifftshift
File "/home/sachin/miniconda3/lib/python3.7/site-packages/numpy/fft/helper.py", line 121, in ifftshift
shift = [-(x.shape[ax] // 2) for ax in axes]
File "/home/sachin/miniconda3/lib/python3.7/site-packages/numpy/fft/helper.py", line 121, in <listcomp>
shift = [-(x.shape[ax] // 2) for ax in axes]
IndexError: tuple index out of range
Could you please help me with this?
Thanks!
The text was updated successfully, but these errors were encountered:
This is fixed.
You probably have called ReconstructLayer() before solving. This lead to error because the layer's information hasn't been computed. This is now fixed.
Hi,
I'm trying to visualize the epsilon profile of the patterned layer named "slab" in the example file "phc_slab_circ_hole_spectrum.py", using ReconstructLayer (as defined on line 309 of simulator.py).
I'm not entirely sure about the correct usage of ReconstructLayer but I'm just doing:
s.ReconstructLayer('slab', 100, 100)
ors.ReconstructLayer('slab')
(since nx and ny both seem to default to 101). In both cases, I get the error:Could you please help me with this?
Thanks!
The text was updated successfully, but these errors were encountered: