diff --git a/doc/docs/Python_Tutorials/Eigenmode_Source.md b/doc/docs/Python_Tutorials/Eigenmode_Source.md
index 1ac4e5f9a..ed80730ba 100644
--- a/doc/docs/Python_Tutorials/Eigenmode_Source.md
+++ b/doc/docs/Python_Tutorials/Eigenmode_Source.md
@@ -17,9 +17,9 @@ The first structure, shown in the schematic below, is a 2d ridge waveguide with
The simulation script is in [examples/oblique-source.py](https://github.com/NanoComp/meep/blob/master/python/examples/oblique-source.py). The notebook is [examples/oblique-source.ipynb](https://nbviewer.jupyter.org/github/NanoComp/meep/blob/master/python/examples/oblique-source.ipynb).
-The simulation consists of two separate parts: (1) computing the Poynting flux and (2) plotting the field profile. The field profile is generated by setting the flag `compute_flux=False`. For the single-mode case, a constant-amplitude current source (`eig_src=False`) excites both the waveguide mode and radiating fields in *both* directions (i.e., forwards and backwards). This is shown in the main inset of the first of two figures above. The `EigenModeSource` excites only the *forward-going* waveguide mode **A** as shown in the smaller inset. Launching this mode requires setting `eig_src=True`, `fsrc=0.15`, `kx=0.4`, and `bnum=1`. Note that the length of the `EigenModeSource` must be large enough that it captures the entire guided mode (i.e., the fields should decay to roughly zero at the edges). The line source does *not* need to span the entire length of the cell but should be slightly larger than the waveguide width. The parameter `rot_angle` specifies the rotation angle of the waveguide axis and is initially 0° (i.e., straight or horizontal orientation). This enables `eig_parity` to include `EVEN_Y` in addition to `ODD_Z` and the simulation to include an overall mirror symmetry plane in the $y$-direction.
+The simulation consists of two separate parts: (1) computing the Poynting flux and (2) plotting the field profile. The field profile is generated by setting the flag `compute_flux=False`. For the single-mode case, a constant-amplitude current source (`eig_src=False`) excites both the waveguide mode and radiating fields in *both* directions (i.e., forwards and backwards). This is shown in the main inset of the first of two figures above. The `EigenModeSource` excites only the *forward-going* waveguide mode **A** as shown in the smaller inset. Launching this mode requires setting `eig_src=True`, `fsrc=0.15`, and `bnum=1`. Note that the length of the `EigenModeSource` must be large enough that it captures the entire guided mode (i.e., the fields should decay to roughly zero at the edges). The line source does *not* need to span the entire length of the cell but should be slightly larger than the waveguide width. The parameter `rot_angle` specifies the rotation angle of the waveguide axis and is initially 0° (i.e., straight or horizontal orientation). This enables `eig_parity` to include `EVEN_Y` in addition to `ODD_Z` and the simulation to include an overall mirror symmetry plane in the $y$-direction.
-For the multi-mode case, a constant-amplitude current source excites a superposition of the two waveguide modes in addition to the radiating field. This is shown in the main inset of the second figure above. The `EigenModeSource` excites only a given mode: **A** (`fsrc=0.35`, `kx=0.4`, `bnum=2`) or **B** (`fsrc=0.35`, `kx=1.2`, `bnum=1`) as shown in the smaller insets.
+For the multi-mode case, a constant-amplitude current source excites a superposition of the two waveguide modes in addition to the radiating field. This is shown in the main inset of the second figure above. The `EigenModeSource` excites only a given mode: **A** (`fsrc=0.35`, `bnum=2`) or **B** (`fsrc=0.35`, `bnum=1`) as shown in the smaller insets.
```py
import meep as mp
@@ -39,15 +39,14 @@ w = 1.0 # width of waveguide
geometry = [mp.Block(center=mp.Vector3(),
size=mp.Vector3(mp.inf,w,mp.inf),
- e1=mp.Vector3(1).rotate(mp.Vector3(z=1), rot_angle),
+ e1=mp.Vector3(x=1).rotate(mp.Vector3(z=1), rot_angle),
e2=mp.Vector3(y=1).rotate(mp.Vector3(z=1), rot_angle),
material=mp.Medium(epsilon=12))]
fsrc = 0.15 # frequency of eigenmode or constant-amplitude source
-kx = 0.4 # initial guess for wavevector in x-direction of eigenmode
bnum = 1 # band number of eigenmode
-kpoint = mp.Vector3(kx).rotate(mp.Vector3(z=1), rot_angle)
+kpoint = mp.Vector3(x=1).rotate(mp.Vector3(z=1), rot_angle)
compute_flux = True # compute flux (True) or plot the field profile (False)
@@ -92,13 +91,13 @@ else:
plt.show()
```
-Note that in `EigenModeSource` as well as `get_eigenmode_coefficients`, the `direction` property must be set to `NO_DIRECTION` for a non-zero `eig_kpoint` which specifies the waveguide axis.
+Note that in `EigenModeSource` as well as `get_eigenmode_coefficients`, the `direction` property must be set to `NO_DIRECTION` whenever `eig_kpoint` specifies the waveguide axis.
### What Happens When the Source Time Profile is a Pulse?
-The eigenmode source launches a fixed spatial mode profile specified by either its frequency (`eig_match_freq=True`) or wavevector (`eig_kpoint`) multiplied by the time profile. When the time profile of the source has a finite bandwidth, e.g. a [Gaussian pulse](Python_User_Interface.md#gaussiansource) (which is typical for calculations involving [Fourier-transformed fields](FAQ.md#for-calculations-involving-fourier-transformed-fields-why-should-the-source-be-a-pulse-rather-than-a-continuous-wave) such as [mode coefficients or S-parameters](Python_Tutorials/GDSII_Import.md)), then the frequency-dependence (dispersion) of the true modal pattern means that the eigenmode source does not match the desired mode exactly over the whole bandwidth. This is described in section 4.2.2 of our ["Electromagnetic Wave Source Conditions"](https://arxiv.org/abs/1301.5366) review article. A more accurate mode profile may be obtained by adding multiple narrow-band eigenmode sources at the same position at several frequencies across the bandwidth, but this has the disadvantage that the runtime increases as you add more frequency points due to the narrower source bandwidths. However, a *single* broadband eigenmode source is often sufficient for most practical applications (excepting cases with extreme modal dispersion, e.g. near a cutoff frequency).
+The eigenmode source launches a fixed spatial mode profile specified by either its frequency (`eig_match_freq=True`) or wavevector (`eig_match_freq=False`) multiplied by the time profile. When the time profile of the source has a finite bandwidth, e.g. a [Gaussian pulse](../Python_User_Interface.md#gaussiansource) (which is typical for calculations involving [Fourier-transformed fields](../FAQ.md#for-calculations-involving-fourier-transformed-fields-why-should-the-source-be-a-pulse-rather-than-a-continuous-wave) such as [mode coefficients or S-parameters](GDSII_Import.md#s-parameters-of-a-directional-coupler)), then the frequency-dependence (dispersion) of the true modal pattern means that the eigenmode source does not match the desired mode exactly over the whole bandwidth. This is described in Section 4.2.2 of the review article [Electromagnetic Wave Source Conditions](https://arxiv.org/abs/1301.5366). A more accurate mode profile may be obtained by adding multiple narrow-band eigenmode sources at the same position at several frequencies across the bandwidth, but this has the disadvantage that the runtime increases as you add more frequency points due to the narrower source bandwidths. However, a *single* broadband eigenmode source is often sufficient for most practical applications (excepting cases with extreme modal dispersion, e.g. near a cutoff frequency).
-This can be demonstrated by computing the error in a broadband eigenmode source via the backward-propagating and scattered power (i.e., any fields which are not forward-propagating waveguide modes) for the single and multi mode ridge waveguides.
+This can be demonstrated by computing the error in a broadband eigenmode source via the backward-propagating and scattered power (i.e., any fields which are not forward-propagating waveguide modes) for the single and multi mode ridge waveguide.
```py
import meep as mp
@@ -120,23 +119,20 @@ geometry = [mp.Block(center=mp.Vector3(),
material=mp.Medium(epsilon=12))]
fsrc = 0.35 # frequency of eigenmode source
-kx = 1.2 # initial guess for wavevector in x-direction of eigenmode
bnum = 1 # band number of eigenmode
df = 0.1 # frequency width
nfreq = 51 # number of frequencies
-symmetries = [mp.Mirror(mp.Y)]
-
sources = [mp.EigenModeSource(src=mp.GaussianSource(fsrc,fwidth=df),
center=mp.Vector3(0,0),
size=mp.Vector3(0,sxy),
- direction=mp.NO_DIRECTION,
eig_parity=mp.EVEN_Y+mp.ODD_Z,
- eig_kpoint=mp.Vector3(kx),
eig_band=bnum,
eig_match_freq=True)]
+symmetries = [mp.Mirror(mp.Y)]
+
sim = mp.Simulation(cell_size=cell_size,
resolution=resolution,
boundary_layers=pml_layers,
@@ -180,7 +176,7 @@ if mp.am_master():
plt.savefig('multi_mode_eigsource_B.png',dpi=150,bbox_inches='tight')
```
-Results are shown for the single mode waveguide with one eigenmode **A** (band 1) and multi mode waveguide with two eigenmodes **A** (higher-order mode, band 2) and **B** (fundamental mode, band 1), all with a center frequency of `0.35`.
+Results are shown for the single mode waveguide with one eigenmode **A** (band 1) using a center frequency of `0.15` and multi mode waveguide with two eigenmodes **A** (higher-order mode, band 2) and **B** (fundamental mode, band 1), all with a center frequency of `0.35`.
![](../images/single_mode_eigsource_pulse.png)
@@ -196,7 +192,7 @@ Results are shown for the single mode waveguide with one eigenmode **A** (band 1
These results demonstrate that in all cases the error is nearly 0 at the center frequency and increases roughly quadratically away from the center frequency. The error tends to be smallest for single-mode waveguides because a localized source excitation couples most strongly into guided modes. Note that in this case the maximum error is ~1% for a source bandwidth that is 67% of its center frequency. For the multi-mode waveguide, a much larger scattering loss is obtained for the higher-order mode **A** at frequencies below the center frequency, but this is simply because that mode ceases to be guided around a frequency `≈ 0.3`, and the mode pattern changes dramatically as this cutoff is approached.
-Another thing to keep in mind is that, even if the modes are imperfectly launched (some power leaks into radiation or into the backward direction), correct result can still be obtained by the standard procedure of normalizing against a separate straight-waveguide run (and subtracting off fields before computing reflected fluxes), as explained in the [Meep Introduction](Introduction.md#transmittancereflectance-spectra). More accurate mode launching may be required for multi-mode waveguide systems, however, as power coupled into an undesired *guided* mode will not typically decay away.
+Another thing to keep in mind is that, even if the modes are imperfectly launched (some power leaks into radiation or into the backward direction), the correct result involving the Poynting flux can still be obtained by the standard procedure of normalizing against a separate straight-waveguide run (and subtracting off fields before computing reflected fluxes), as explained in [Introduction](../Introduction.md#transmittancereflectance-spectra). More accurate mode launching may be required for multi-mode waveguide systems, however, as power coupled into an undesired *guided* mode will not typically decay away.
### Oblique Waveguides
diff --git a/doc/docs/Scheme_Tutorials/Eigenmode_Source.md b/doc/docs/Scheme_Tutorials/Eigenmode_Source.md
index f5505c409..136f0e094 100644
--- a/doc/docs/Scheme_Tutorials/Eigenmode_Source.md
+++ b/doc/docs/Scheme_Tutorials/Eigenmode_Source.md
@@ -17,9 +17,9 @@ The first structure, shown in the schematic below, is a 2d ridge waveguide with
The simulation script is in [examples/oblique-source.ctl](https://github.com/NanoComp/meep/blob/master/scheme/examples/oblique-source.ctl).
-The simulation consists of two parts: (1) computing the Poynting flux and (2) plotting the field profile. The field profile is generated by setting the flag `compute-flux=false`. For the single-mode case, a constant-amplitude current source (`eig-src=false`) excites both the waveguide mode and radiating fields in *both* directions (i.e., forwards and backwards). This is shown in the main inset of the first of two figures above. The `eigenmode-source` excites only the *forward-going* waveguide mode **A** as shown in the smaller inset. Launching this mode requires setting `eig-src=true`, `fsrc=0.15`, `kx=0.4`, and `bnum=1`. Note that the length of the `EigenModeSource` must be large enough that it captures the entire guided mode (i.e., the fields should decay to roughly zero at the edges). The line source does *not* need to span the entire length of the cell but should be slightly larger than the waveguide width. The parameter `rot-angle` specifies the rotation angle of the waveguide axis and is initially 0° (i.e., straight or horizontal orientation). This enables `eig-parity` to include `EVEN-Y` in addition to `ODD-Z` and the cell to include an overall mirror symmetry plane in the $y$-direction.
+The simulation consists of two parts: (1) computing the Poynting flux and (2) plotting the field profile. The field profile is generated by setting the flag `compute-flux=false`. For the single-mode case, a constant-amplitude current source (`eig-src=false`) excites both the waveguide mode and radiating fields in *both* directions (i.e., forwards and backwards). This is shown in the main inset of the first of two figures above. The `eigenmode-source` excites only the *forward-going* waveguide mode **A** as shown in the smaller inset. Launching this mode requires setting `eig-src=true`, `fsrc=0.15`, and `bnum=1`. Note that the length of the `EigenModeSource` must be large enough that it captures the entire guided mode (i.e., the fields should decay to roughly zero at the edges). The line source does *not* need to span the entire length of the cell but should be slightly larger than the waveguide width. The parameter `rot-angle` specifies the rotation angle of the waveguide axis and is initially 0° (i.e., straight or horizontal orientation). This enables `eig-parity` to include `EVEN-Y` in addition to `ODD-Z` and the cell to include an overall mirror symmetry plane in the $y$-direction.
-For the multi-mode case, a constant-amplitude current source excites a superposition of the two waveguide modes in addition to the radiating field. This is shown in the main inset of the second figure above. The `eigenmode-source` excites only a given mode: **A** (`fsrc=0.35`, `kx=0.4`, `bnum=2`) or **B** (`fsrc=0.35`, `kx=1.2`, `bnum=1`) as shown in the smaller insets.
+For the multi-mode case, a constant-amplitude current source excites a superposition of the two waveguide modes in addition to the radiating field. This is shown in the main inset of the second figure above. The `eigenmode-source` excites only a given mode: **A** (`fsrc=0.35`, `bnum=2`) or **B** (`fsrc=0.35`, `bnum=1`) as shown in the smaller insets.
```scm
(set-param! resolution 50) ; pixels/μm
@@ -43,10 +43,9 @@ For the multi-mode case, a constant-amplitude current source excites a superposi
(material (make medium (epsilon 12))))))
(define-param fsrc 0.15) ; frequency of eigenmode or constant-amplitude source
-(define-param kx 0.4) ; initial guess for wavevector in x-direction of eigenmode
(define-param bnum 1) ; band number of eigenmode
-(define kpoint (rotate-vector3 (vector3 0 0 1) rot-angle (vector3 kx 0 0)))
+(define kpoint (rotate-vector3 (vector3 0 0 1) rot-angle (vector3 1 0 0)))
(define-param compute-flux? true) ; compute flux (true) or output the field profile (false)
@@ -87,7 +86,119 @@ For the multi-mode case, a constant-amplitude current source excites a superposi
(at-end output-efield-z))))
```
-Note that in `eigenmode-source`, the `direction` property must be set to `NO-DIRECTION` for a non-zero `eig-kpoint` which specifies the waveguide axis.
+Note that in `eigenmode-source`, the `direction` property must be set to `NO-DIRECTION` whenever `eig-kpoint` specifies the waveguide axis.
+
+### What Happens When the Source Time Profile is a Pulse?
+
+The eigenmode source launches a fixed spatial mode profile specified by either its frequency (`eig-match-freq?` is `true`) or wavevector (`eig-match-freq?` is `false`) multiplied by the time profile. When the time profile of the source has a finite bandwidth, e.g. a [Gaussian pulse](../Scheme_User_Interface.md#gaussian-src) (which is typical for calculations involving [Fourier-transformed fields](../FAQ.md#for-calculations-involving-fourier-transformed-fields-why-should-the-source-be-a-pulse-rather-than-a-continuous-wave) such as [mode coefficients or S-parameters](Mode_Decomposition.md)), then the frequency-dependence (dispersion) of the true modal pattern means that the eigenmode source does not match the desired mode exactly over the whole bandwidth. This is described in Section 4.2.2 of the review article [Electromagnetic Wave Source Conditions](https://arxiv.org/abs/1301.5366). A more accurate mode profile may be obtained by adding multiple narrow-band eigenmode sources at the same position at several frequencies across the bandwidth, but this has the disadvantage that the runtime increases as you add more frequency points due to the narrower source bandwidths. However, a *single* broadband eigenmode source is often sufficient for most practical applications (excepting cases with extreme modal dispersion, e.g. near a cutoff frequency).
+
+This can be demonstrated by computing the error in a broadband eigenmode source via the backward-propagating and scattered power (i.e., any fields which are not forward-propagating waveguide modes) for the single and multi mode ridge waveguide.
+
+```scm
+(set-param! resolution 50) ; pixels/μm
+
+(define-param sxy 10)
+(set! geometry-lattice (make lattice (size sxy sxy no-size)))
+
+(define-param dpml 1)
+(set! pml-layers (list (make pml (thickness dpml))))
+
+(define-param w 1.0) ; width of waveguide
+
+(set! geometry (list (make block
+ (center 0 0 0)
+ (size infinity w infinity)
+ (material (make medium (epsilon 12))))))
+
+(define-param fsrc 0.15) ; frequency of eigenmode source
+(define-param bnum 1) ; band number of eigenmode
+
+(define df 0.1) ; frequency width
+(define nfreq 51) ; number of frequencies
+
+(set! sources (list
+ (make eigenmode-source
+ (src (make gaussian-src (frequency fsrc) (fwidth df)))
+ (center 0 0 0)
+ (size 0 sxy 0)
+ (eig-parity (+ EVEN-Y ODD-Z))
+ (eig-band bnum)
+ (eig-match-freq? true))))
+
+(set! symmetries (list (make mirror-sym (direction Y))))
+
+(define flux-mon-tp (add-flux fsrc df nfreq (make flux-region (center 0 (- (* +0.5 sxy) dpml)) (size (- sxy (* 2 dpml)) 0) (weight +1))))
+(define flux-mon-bt (add-flux fsrc df nfreq (make flux-region (center 0 (+ (* -0.5 sxy) dpml)) (size (- sxy (* 2 dpml)) 0) (weight -1))))
+(define flux-mon-rt (add-flux fsrc df nfreq (make flux-region (center (- (* +0.5 sxy) dpml) 0) (size 0 (- sxy (* 2 dpml))) (weight +1))))
+(define flux-mon-lt (add-flux fsrc df nfreq (make flux-region (center (+ (* -0.5 sxy) dpml) 0) (size 0 (- sxy (* 2 dpml))) (weight -1))))
+
+(run-sources+ 50)
+
+(display-fluxes flux-mon-tp flux-mon-bt flux-mon-rt flux-mon-lt)
+
+(define res (get-eigenmode-coefficients flux-mon-rt (list bnum) #:eig-parity (+ EVEN-Y ODD-Z)))
+(define coeffs (list-ref res 0))
+(define freqs (get-flux-freqs flux-mon-rt))
+
+(map (lambda (nf)
+ (let ((guided-power (sqr (magnitude (array-ref coeffs 0 nf 0)))))
+ (print "guided:, " (number->string (list-ref freqs nf)) ", " (number->string guided-power) "\n")))
+ (arith-sequence 0 1 nfreq))
+```
+
+Results are generated using the following shell script and plotted in Octave/Matlab for the single mode waveguide with one eigenmode **A** (band 1) using a center frequency of `0.15` and multi mode waveguide with two eigenmodes **A** (higher-order mode, band 2) and **B** (fundamental mode, band 1), all with a center frequency of `0.35`.
+
+```sh
+$ meep fsrc=0.15 bnum=1 eigsource-pulse.ctl |tee singlemode-A.out
+$ grep flux1: singlemode-A.out |cut -d, -f2- > singlemode-A-flux.dat
+$ grep guided: singlemode-A.out |cut -d, -f2- > singlemode-A-guided.dat
+
+$ meep fsrc=0.35 bnum=2 eigsource-pulse.ctl |tee multimode-A.out
+$ grep flux1: multimode-A.out |cut -d, -f2- > multimode-A-flux.dat
+$ grep guided: multimode-A.out |cut -d, -f2- > multimode-A-guided.dat
+
+$ meep fsrc=0.35 bnum=1 eigsource-pulse.ctl |tee multimode-B.out
+$ grep flux1: multimode-B.out |cut -d, -f2- > multimode-B-flux.dat
+$ grep guided: multimode-B.out |cut -d, -f2- > multimode-B-guided.dat
+```
+
+```matlab
+fl = dlmread('multimode-B-flux.dat',',');
+gp = dlmread('multimode-B-guided.dat',',');
+
+freqs = fl(:,1);
+flux_total = sum(fl(:,2:5),2);
+back = fl(:,5) ./ flux_total;
+scat = (flux_total - gp(:,2)) ./ flux_total;
+
+subplot(1,2,1);
+plot(freqs,back,'bo-');
+xlabel('frequency');
+ylabel('backward power (fraction of total power)');
+axis tight;
+
+subplot(1,2,2);
+plot(freqs,scat,'ro-');
+xlabel('frequency');
+ylabel('scattered power (fraction of total power)');
+axis tight;
+```
+
+
+![](../images/single_mode_eigsource_pulse.png)
+
+
+
+![](../images/multi_mode_eigsource_pulse_A.png)
+
+
+
+![](../images/multi_mode_eigsource_pulse_B.png)
+
+
+These results demonstrate that in all cases the error is nearly 0 at the center frequency and increases roughly quadratically away from the center frequency. The error tends to be smallest for single-mode waveguides because a localized source excitation couples most strongly into guided modes. Note that in this case the maximum error is ~1% for a source bandwidth that is 67% of its center frequency. For the multi-mode waveguide, a much larger scattering loss is obtained for the higher-order mode **A** at frequencies below the center frequency, but this is simply because that mode ceases to be guided around a frequency `≈ 0.3`, and the mode pattern changes dramatically as this cutoff is approached.
+
+Another thing to keep in mind is that, even if the modes are imperfectly launched (some power leaks into radiation or into the backward direction), the correct result involving the Poynting flux can still be obtained by the standard procedure of normalizing against a separate straight-waveguide run (and subtracting off fields before computing reflected fluxes), as explained in [Introduction](../Introduction.md#transmittancereflectance-spectra). More accurate mode launching may be required for multi-mode waveguide systems, however, as power coupled into an undesired *guided* mode will not typically decay away.
### Oblique Waveguides
diff --git a/doc/docs/images/single_mode_eigsource_pulse.png b/doc/docs/images/single_mode_eigsource_pulse.png
index a5f79c9ca..14d73d299 100644
Binary files a/doc/docs/images/single_mode_eigsource_pulse.png and b/doc/docs/images/single_mode_eigsource_pulse.png differ
diff --git a/python/examples/oblique-source.py b/python/examples/oblique-source.py
index 36de5fdc5..243825dc0 100644
--- a/python/examples/oblique-source.py
+++ b/python/examples/oblique-source.py
@@ -15,15 +15,14 @@
geometry = [mp.Block(center=mp.Vector3(),
size=mp.Vector3(mp.inf,w,mp.inf),
- e1=mp.Vector3(1).rotate(mp.Vector3(z=1), rot_angle),
+ e1=mp.Vector3(x=1).rotate(mp.Vector3(z=1), rot_angle),
e2=mp.Vector3(y=1).rotate(mp.Vector3(z=1), rot_angle),
material=mp.Medium(epsilon=12))]
fsrc = 0.15 # frequency of eigenmode or constant-amplitude source
-kx = 0.4 # initial guess for wavevector in x-direction of eigenmode
bnum = 1 # band number of eigenmode
-kpoint = mp.Vector3(kx).rotate(mp.Vector3(z=1), rot_angle)
+kpoint = mp.Vector3(x=1).rotate(mp.Vector3(z=1), rot_angle)
compute_flux = True # compute flux (True) or plot the field profile (False)
diff --git a/scheme/examples/oblique-source.ctl b/scheme/examples/oblique-source.ctl
index c5ad6f198..234f12a3c 100644
--- a/scheme/examples/oblique-source.ctl
+++ b/scheme/examples/oblique-source.ctl
@@ -13,16 +13,15 @@
(set! geometry (list (make block
(center 0 0 0)
- (size infinity 1 infinity)
+ (size infinity w infinity)
(e1 (rotate-vector3 (vector3 0 0 1) rot-angle (vector3 1 0 0)))
(e2 (rotate-vector3 (vector3 0 0 1) rot-angle (vector3 0 1 0)))
(material (make medium (epsilon 12))))))
(define-param fsrc 0.15) ; frequency of eigenmode or constant-amplitude source
-(define-param kx 0.4) ; initial guess for wavevector in x-direction of eigenmode
(define-param bnum 1) ; band number of eigenmode
-(define kpoint (rotate-vector3 (vector3 0 0 1) rot-angle (vector3 kx 0 0)))
+(define kpoint (rotate-vector3 (vector3 0 0 1) rot-angle (vector3 1 0 0)))
(define-param compute-flux? true) ; compute flux (true) or output the field profile (false)