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
import meep as mp | |
from meep.materials import Al as ALU | |
import argparse | |
import matplotlib | |
matplotlib.use('agg') | |
import matplotlib.pyplot as plt | |
def main(args): | |
resolution = args.res # pixels/um |
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
import meep as mp | |
from meep.materials import Al as ALU | |
import numpy as np | |
lambda_min = 0.4 # minimum source wavelength | |
lambda_max = 0.8 # maximum source wavelength | |
fmin = 1/lambda_max # minimum source frequency | |
fmax = 1/lambda_min # maximum source frequency | |
fcen = 0.5*(fmin+fmax) # source frequency center | |
df = fmax-fmin # source frequency width |
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
import meep as mp | |
lambda_min = 0.4 # minimum source wavelength | |
lambda_max = 0.8 # maximum source wavelength | |
fmin = 1/lambda_max # minimum source frequency | |
fmax = 1/lambda_min # maximum source frequency | |
fcen = 0.5*(fmin+fmax) # source frequency center | |
df = fmax-fmin # source frequency width | |
resolution = 150 |
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
import meep as mp | |
import numpy as np | |
cell_size = mp.Vector3(14,14) | |
pml_layers = [mp.PML(thickness=2)] | |
w = 1.0 | |
geometry = [mp.Block(center=mp.Vector3(), | |
size=mp.Vector3(mp.inf,w,mp.inf), |
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
import matplotlib | |
matplotlib.use('agg') | |
import matplotlib.pyplot as plt | |
import meep as mp | |
import numpy as np | |
res = 10 # pixels/μm | |
n = 3.4 # index of waveguide | |
w = 1 # width of waveguide |
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
import meep as mp | |
from meep.materials import Al as ALU | |
import numpy as np | |
lambda_min = 0.4 # minimum source wavelength | |
lambda_max = 0.8 # maximum source wavelength | |
fmin = 1/lambda_max # minimum source frequency | |
fmax = 1/lambda_min # maximum source frequency | |
fcen = 0.5*(fmin+fmax) # source frequency center | |
df = fmax-fmin # source frequency width |
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
import numpy as np | |
from autograd import numpy as npa | |
from autograd import tensor_jacobian_product | |
import meep as mp | |
import meep.adjoint as mpa | |
silicon = mp.Medium(epsilon=12.) | |
sxy = 5.0 | |
cell_size = mp.Vector3(sxy,sxy,0) |
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
import meep as mp | |
import meep.adjoint as mpa | |
import numpy as np | |
from autograd import numpy as npa | |
from autograd import tensor_jacobian_product | |
silicon = mp.Medium(epsilon=12) | |
sxy = 5.0 | |
cell_size = mp.Vector3(sxy,sxy,0) |
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
import meep as mp | |
import meep.adjoint as mpa | |
import numpy as np | |
from autograd import numpy as npa | |
from autograd import tensor_jacobian_product | |
silicon = mp.Medium(epsilon=12.) | |
sxy = 5. | |
cell_size = mp.Vector3(sxy,sxy,0) |
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
import meep as mp | |
import numpy as np | |
import matplotlib | |
matplotlib.use('agg') | |
import matplotlib.pyplot as plt | |
resolution = 25 # pixels/μm | |
fcen = 0.25 # pulse center frequency | |
df = 0.2 # pulse width (in frequency) | |
eps = 13. # dielectric constant of waveguide |
OlderNewer