-
Notifications
You must be signed in to change notification settings - Fork 626
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
Plotting and animation #872
Merged
Merged
Changes from 26 commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
351544d
first stab at unified plotting and video
smartalecH da8ee1c
minor fix to pml boundaries
smartalecH 2685bc4
incomplete changes
smartalecH 8223c3f
begin support for arbitrary planes
smartalecH 68b178a
merging
smartalecH a4643f6
consolidate bug fixes
smartalecH d346f01
debugging
smartalecH e102e62
small bugs
smartalecH 04e6776
bug fixes
smartalecH e816cf5
fixed bugs with slicing, added animation run time object
smartalecH 053c7f2
use mixins
smartalecH 0aad0c7
retrofit straight waveguide tutorial with animations
smartalecH d703c79
fix naming error
smartalecH c5e0ccf
refactor visualization as standalone component
smartalecH 2116ac1
Cleanup and examples
smartalecH cc60528
check for library imports
smartalecH f630aa6
attempt to fix import error python2
smartalecH 8d3ec17
Add tutorials
smartalecH 5d5af2a
update straight example
smartalecH 884c58f
more cleanup
smartalecH 78c80cd
refactor run function and visualization base
smartalecH 97a5c5c
update docs, tutorials, tests, and customization
smartalecH 0fb7f51
add test file
smartalecH 17d11a0
fix matplotlib issues in test
smartalecH a2bd4c7
remove mp4 and gif on make clean
smartalecH beb9eb5
fix tabs
smartalecH 5465865
fixed deadlocking
smartalecH d17e960
fix test for mpi
smartalecH 36ef7d2
visualization movie bug with ffmpeg
smartalecH d72fdda
remove hashing
smartalecH 3936d77
fix jshtml with python2
smartalecH File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# Tutorials and Examples | ||
|
||
Meep simulations are Python scripts which involve specifying the device geometry, materials, current sources, monitor fields, and everything else necessary to set up a calculation. A Python script provides the flexibility to customize the simulation for practically any application particularly those involving parameter sweeps and optimization. | ||
|
||
Python libraries such as NumPy, SciPy, and Matplotlib can be used to augment the simulation functionality and will also be demonstrated. Much of the functionality of the low-level C++ interface has been abstracted in Python which means that you don't need to be an experienced programmer to set up simulations. Reasonable defaults are available where necessary. | ||
|
||
Several tutorials and examples are found here. These tutorials are meant to illustrate Meep's various features in an interactive and application-oriented manner. | ||
|
||
## iPython/Jupyter Notebooks | ||
|
||
Jupyter notebooks are interactive, browser based framework for displaying text, running python code, and visualizing results. There are several ways to read these notebooks online: | ||
|
||
### Local | ||
|
||
The recommended method to run the tutorial notebooks is by 1.) installing `meep` via `conda`, 2.) cloning this repo to your local drive, and 3.) launch a notebook server in this directory using `jupyter notebook`. | ||
|
||
### nbviewer | ||
|
||
`nbviewer` is a web platform that can render interactive features found inside Jupyter notebooks openly stored on web-servers. While `nbviewer` can't run python code, it can execute stored javascript code used to animate the simulations. | ||
|
||
### GitHub | ||
|
||
GitHub is able to render some of the smaller notebooks as plain text. However, they are not interactive and are often too large for GitHub. | ||
|
||
### Tutorials | ||
|
||
Below are summaries for each tutorial, along with the features the tutorials highlight. While there is no particular order to the tutorials, they progressively incorporate more complicated features. | ||
|
||
1. __`straight-waveguide.ipynb`__ - | ||
A simple 2D straight waveguide tutorial that explores basic meep features like `geometry`, `sources`, and `PML` layers. The tutorial also explores basic visualization and animation features. | ||
|
||
2. __`bent-waveguide.ipynb`__- | ||
A followup to the 2D straight waveguide tutorial by adding a bend. | ||
|
||
3. __`bend-flux.ipynb`__- | ||
Using the previous bent waveguide example, this tutorial calculates the loss, transmission, and reflection that the bent waveguide undergoes. | ||
|
||
4. __`ring.ipynb`__ - | ||
Computes the resonant mode frequencies of a 2D ring resonator using `harminv`. | ||
|
||
5. __`visualization.ipynb`__ - | ||
Demonstrates various visualization and animation features. | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is
visualization.ipynb
supposed to be part of this PR? I don't see it anywhere.