示例#1
0
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
#
# i-depot BBIE 7396, 7556, 7748
#
# Contact: [email protected]

from ring import RingResonator

# documentation for your class
print RingResonator.__doc__

# create a new ringResonator object
my_ring = RingResonator(ring_radius=5.0)

print my_ring.name  # unique name with prefix

# change property
my_ring.ring_wg_width = 0.6

# my_ring.bus_wg_width = 2.0
# The command above will throw an error because the spacing between the
# waveguides is too narrow
示例#2
0
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
#
# i-depot BBIE 7396, 7556, 7748
#
# Contact: [email protected]

# When executing a script, the first line should load the technology
# This is a set of default settigns associated with a specific
# fabrication technology.
# IPKISS provides a default technology for silicon photonics as
# an example.
from technologies.si_photonics.ipkiss.default import *

# load the file with our RingResonator component
from ring import RingResonator

# create a new ringResonator object
my_ring = RingResonator(ring_radius=5.0)

print my_ring.name  # unique name with prefix
示例#3
0
# 1. import the ring resonator
from ring import RingResonator

# 2. create a new RingResonator object
my_ring = RingResonator(ring_radius=2.0, name="my_unique_ring_name")

# 3. print the autogenerated name
print my_ring.name  # unique name with prefix

# 4. change property
my_ring.ring_wg_width = 0.6

# 5. The following code will throw an error because the spacing between the
# waveguides is too narrow
#my_ring.coupler_spacing = 0.1
示例#4
0
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
#
# i-depot BBIE 7396, 7556, 7748
#
# Contact: [email protected]

from technologies.si_photonics.ipkiss.default import *
from ipkiss.all import *

# load the file with our RingResonator component
from ring import RingResonator

# create a new ringResonator object
my_ring = RingResonator(ring_radius=5.0)

my_ring.write_gdsii("myring.gds")

# create a new waveguide definition, and assign it
# to the bus waveguide of the ring.
from ipkiss.plugins.photonics.wg import WgElDefinition

new_bus_wg_def = WgElDefinition(wg_width=0.6)
my_ring.bus_wg_def = new_bus_wg_def
my_ring.write_gdsii("myring2.gds")
示例#5
0
#
# i-depot BBIE 7396, 7556, 7748
#
# Contact: [email protected]

from technologies.si_photonics.ipkiss.default import *
from ipkiss.all import *

from dircoup import BentDirectionalCoupler
from mzi import MZI, MziArmWaveguide, MziArmWithStructure, MZIWithStructures
from ring import RingResonator

my_splitter = BentDirectionalCoupler(coupler_length=10.0, bend_angle=30.0)
my_combiner = BentDirectionalCoupler(coupler_length=8.0, bend_angle=30.0)

my_ring1 = RingResonator(ring_radius=5.0)
my_ring2 = RingResonator(ring_radius=6.0)

# Example 1:
# construct an MZI manually, by defining 2 arms
#
my_combiner_transform = Translation((50, 0))
my_arm1 = MziArmWithStructure(structure=my_ring1,
                              splitter_port=my_splitter.ports["E1"],
                              combiner_port=my_combiner.ports.transform_copy(
                                  my_combiner_transform)["W1"])
my_arm2 = MziArmWaveguide(splitter_port=my_splitter.ports["E0"],
                          combiner_port=my_combiner.ports.transform_copy(
                              my_combiner_transform)["W0"],
                          route_south=True,
                          extra_length=40.0)
示例#6
0
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
#
# i-depot BBIE 7396, 7556, 7748
#
# Contact: [email protected]

from technologies.si_photonics.ipkiss.default import *
from ipkiss.all import *

# load the file with our RingResonator component
from ring import RingResonator

# create a new ringResonator object
my_ring = RingResonator(ring_radius=5.0)

my_ring.write_gdsii("myring.gds")  # fast writing to GDSII

# The proper way is to create a library, add your structure to the library,
# and export that to GDSII

my_lib = Library(name="MYLIB")
my_lib += my_ring

FileOutputGdsii("myring2.gds").write(my_lib)

# The second GDSII file will be slightly different from the first, because the
# in the first a default library name is used, while in the second a user-defined
# name is used.