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 am having an issue with calling get_efield (and other get_Xfield functions) for certain values of band_min set by find_k.
In other words, if I first use find_k to solve for a set of eigenmodes: ms.find_k(mp.NO_PARITY, 1/1.55, band_min=1, band_max=2, kdir=...)
and then I try to retrieve the electric field of the 2nd band: E2 = ms.get_efield(2)
MPB returns the following errors from pympb.cpp (lines 1444-1452): Must have 1 <= band index <= num_bands (1) get_dfield must be called before get-efield-from-dfield!
However, if I set band_min=2 in find_k: ms.find_k(mp.NO_PARITY, 1/1.55, band_min=2, band_max=2, kdir=...)
then getting the 2nd band's field profile (as shown above) works without any errors.
It seems that the errors occur when band_min != band number (value given to get_efield). Is this behavior consistent with the intended usage of get_efield and find_k?
Thanks for your help
The text was updated successfully, but these errors were encountered:
Hello,
I am having an issue with calling
get_efield
(and otherget_Xfield
functions) for certain values ofband_min
set byfind_k
.In other words, if I first use
find_k
to solve for a set of eigenmodes:ms.find_k(mp.NO_PARITY, 1/1.55, band_min=1, band_max=2, kdir=...)
and then I try to retrieve the electric field of the 2nd band:
E2 = ms.get_efield(2)
MPB returns the following errors from pympb.cpp (lines 1444-1452):
Must have 1 <= band index <= num_bands (1)
get_dfield must be called before get-efield-from-dfield!
However, if I set band_min=2 in
find_k
:ms.find_k(mp.NO_PARITY, 1/1.55, band_min=2, band_max=2, kdir=...)
then getting the 2nd band's field profile (as shown above) works without any errors.
It seems that the errors occur when band_min != band number (value given to get_efield). Is this behavior consistent with the intended usage of
get_efield
andfind_k
?Thanks for your help
The text was updated successfully, but these errors were encountered: