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

Issue with band_min in find_k #53

Open
DerekK44 opened this issue Jun 17, 2018 · 0 comments
Open

Issue with band_min in find_k #53

DerekK44 opened this issue Jun 17, 2018 · 0 comments

Comments

@DerekK44
Copy link

Hello,

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

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

No branches or pull requests

1 participant