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

arbitrary frequency grid for DFT functions in Python interface #1163

Merged
merged 5 commits into from
Mar 31, 2020

Conversation

oskooi
Copy link
Collaborator

@oskooi oskooi commented Mar 29, 2020

Closes #1070.

Follows the outline proposed by @ChristopherHogan in #1070:comment and described in more detail by @stevengj in #1070:comment. All DFT functions can accept either fcen,df,nfreq (as 3 numbers) or a Numpy array freq.

Also includes a test (python/tests/bend_flux.py) as well as documentation.

ToDo: extend this functionality to the Scheme interface?

@stevengj
Copy link
Collaborator

stevengj commented Mar 29, 2020

(Please keep your documentation work on a separate branch and separate PR, to make PRs easier to review.)

python/simulation.py Outdated Show resolved Hide resolved
src/dft.cpp Show resolved Hide resolved
src/dft.cpp Outdated Show resolved Hide resolved
src/dft.cpp Outdated Show resolved Hide resolved
@oskooi oskooi force-pushed the unequal_DFT_freqs_python branch from b2e2e78 to 05da95f Compare March 29, 2020 21:55
python/simulation.py Outdated Show resolved Hide resolved
python/simulation.py Outdated Show resolved Hide resolved
@stevengj stevengj merged commit 81c4a7a into NanoComp:master Mar 31, 2020
@oskooi oskooi deleted the unequal_DFT_freqs_python branch March 31, 2020 02:02
bencbartlett pushed a commit to bencbartlett/meep that referenced this pull request Sep 9, 2021
…omp#1163)

* arbitrary frequency grid for DFT functions in Python interface

* fixes

* change add_dft_field arguments from freq_min,freq_max to fcen,df

* parse add_dft arguments using fix_dft_args and add runtime warning for add_dft_fields

* fix TypeError message in fix_dft_args
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

Successfully merging this pull request may close these issues.

allow unequal DFT frequencies
2 participants