Esempio n. 1
0
 def test_ebeam_terminator_te1550(self):
     assert is_equal(siepic.ebeam_terminator_te1550(),
                     ebeam.ebeam_terminator_te1550())
Esempio n. 2
0
"""

import matplotlib.pyplot as plt
import numpy as np

from simphony.library import ebeam, sipann
from simphony.connect import innerconnect_s, connect_s
from simphony.simulation import freq2wl, wl2freq

# First, we'll set up the frequency range we wish to perform the simulation on.
freq = np.linspace(wl2freq(1600e-9), wl2freq(1500e-9), 2000)

# Get the scattering parameters for each of the elements in our network.
half_ring_left = sipann.sipann_dc_halfring(radius=10).s_parameters(freq)
half_ring_right = sipann.sipann_dc_halfring(radius=10).s_parameters(freq)
term = ebeam.ebeam_terminator_te1550().s_parameters(freq)

### CONFIGURATION 1 ###
n1 = connect_s(half_ring_left, 1, half_ring_right, 3)
n2 = innerconnect_s(n1, 2, 4)
n3 = connect_s(n2, 1, term, 0)

### CONFIGURATION 2 ###
m1 = connect_s(half_ring_right, 1, half_ring_left, 3)
m2 = innerconnect_s(m1, 2, 4)
m3 = connect_s(term, 0, m2, 3)

plt.plot(freq, np.abs(n3[:, 1, 2])**2, 'b.')
plt.plot(freq, np.abs(m3[:, 0, 1])**2, 'r--')
plt.tight_layout()
plt.show()
Esempio n. 3
0
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))

import matplotlib.pyplot as plt
import matplotlib.gridspec as gridspec
import numpy as np

from simphony.library import ebeam, sipann
from simphony.netlist import Subcircuit
from simphony.simulation import SweepSimulation
from simphony.tools import freq2wl

# Have a main data line where frequency multiplexed data enters the circuit.
wg_data = ebeam.ebeam_wg_integral_1550(100e-6)

# A terminator for dispersing unused light
term = ebeam.ebeam_terminator_te1550()

def ring_factory(radius):
    """
    Creates a full ring (with terminator) from a half ring.

    Ports of a half ring are ordered like so:
    2           4
     |         |
      \       /
       \     /
     ---=====---
    1           3

    Resulting pins are ('in', 'out', 'pass').