sys.path.append('..') import optivis.scene as scene import optivis.bench.components as components import optivis.view.canvas as canvas scene = scene.Scene(title="Example 3") l = components.Laser(name="L1") bs = components.BeamSplitter(name="BS", aoi=45) mTopRight = components.SteeringMirror(name="Top Right", aoi=45) mBottomRight = components.SteeringMirror(name="Bottom Right", aoi=45) mBottomLeft = components.SteeringMirror(name="Bottom Left", aoi=45) scene.link(outputNode=l.getOutputNode('out'), inputNode=bs.getInputNode('bkB'), length=100) scene.link(outputNode=bs.getOutputNode('frB'), inputNode=mTopRight.getInputNode('fr'), length=50) scene.link(outputNode=mTopRight.getOutputNode('fr'), inputNode=mBottomRight.getInputNode('fr'), length=50) scene.link(outputNode=mBottomRight.getOutputNode('fr'), inputNode=mBottomLeft.getInputNode('fr'), length=50) scene.link(outputNode=mBottomLeft.getOutputNode('fr'), inputNode=bs.getInputNode('frB'), length=42.5) scene.reference = l
""" Demonstration of funky angles of incidence. """ import sys sys.path.append('..') import optivis.scene as scene import optivis.bench.links as links import optivis.bench.components as components import optivis.view.canvas as canvas scene = scene.Scene(title="Example 4") l1 = components.Laser(name="L1") m1 = components.CavityMirror(name="M1") bs1 = components.BeamSplitter(name="BS", aoi=22.5) m2 = components.CavityMirror(name="M2", aoi=-23) m3 = components.CavityMirror(name="M3", aoi=-45) m4 = components.CavityMirror(name="M4") scene.link(outputNode=l1.getOutputNode('out'), inputNode=m1.getInputNode('bk'), length=50) scene.link(outputNode=m1.getOutputNode('fr'), inputNode=bs1.getInputNode('bkA'), length=50) scene.link(outputNode=bs1.getOutputNode('frB'), inputNode=m2.getInputNode('fr'), length=50) scene.link(outputNode=bs1.getOutputNode('frA'), inputNode=m3.getInputNode('fr'), length=50) scene.link(outputNode=bs1.getOutputNode('bkA'), inputNode=m4.getInputNode('fr'), length=50, pattern=[1, 2]) scene.link(outputNode=m2.getOutputNode('fr'), inputNode=m3.getInputNode('fr'), length=35) gui = canvas.Simple(scene=scene) gui.show()
""" import sys sys.path.append('..') import optivis.scene as scene import optivis.bench.components as components import optivis.view.canvas as canvas scene = scene.Scene(title="Example 6") l = components.Laser(name="L1") bs = components.BeamSplitter(name="BS", aoi=45) mTopRight = components.SteeringMirror(name="Top Right", aoi=45) mBottomRight = components.SteeringMirror(name="Bottom Right", aoi=45) mBottomLeft = components.SteeringMirror(name="Bottom Left", aoi=45) scene.link(outputNode=l.getOutputNode('out'), inputNode=bs.getInputNode('bkB'), length=100, startMarker=True, endMarker=True) scene.link(outputNode=bs.getOutputNode('frB'), inputNode=mTopRight.getInputNode('fr'), length=50, startMarker=True, endMarker=True) scene.link(outputNode=mTopRight.getOutputNode('fr'), inputNode=mBottomRight.getInputNode('fr'), length=50, startMarker=True, endMarker=True) scene.link(outputNode=mBottomRight.getOutputNode('fr'), inputNode=mBottomLeft.getInputNode('fr'), length=50, startMarker=True, endMarker=True) scene.link(outputNode=mBottomLeft.getOutputNode('fr'), inputNode=bs.getInputNode('bkA'), startMarker=True, endMarker=True) scene.reference = l print bs.getAoiForConstrainedNodeAngle(bs.getInputNode('bkB'), bs.getInputNode('bkA'), 45) gui = canvas.Full(scene=scene, startMarkers=True, endMarkers=True) gui.show()
import optivis.view.canvas as canvas scene = scene.Scene() # beam splitter bs = components.BeamSplitter(name="BS", azimuth=180+45, aoi=45) # mirrors mPR = components.SteeringMirror(name="PR") mSR = components.SteeringMirror(name="SR") mIX = components.SteeringMirror(name="IX") mIY = components.SteeringMirror(name="IY") # link OUTPUTS of beam splitter to mirrors scene.link(outputNode=bs.getOutputNode("frB"), inputNode=mPR.getInputNode("fr"), length=150, labels=[ labels.Label(text="BS->frB --> fr<-PR", position=geometry.Coordinates(-0.3, 0)) ]) scene.link(outputNode=bs.getOutputNode("bkB"), inputNode=mSR.getInputNode("fr"), length=150, labels=[ labels.Label(text="BS->bkB --> fr<-SR", position=geometry.Coordinates(-0.3, 0)) ]) scene.link(outputNode=bs.getOutputNode("bkA"), inputNode=mIX.getInputNode("fr"), length=300, labels=[ labels.Label(text="BS->bkA --> fr<-IX", position=geometry.Coordinates(-0.3, 0)) ]) scene.link(outputNode=bs.getOutputNode("frA"), inputNode=mIY.getInputNode("fr"), length=300, labels=[ labels.Label(text="BS->frA --> fr<-IY", position=geometry.Coordinates(-0.3, 0)) ]) scene.reference = bs gui = canvas.Simple(scene=scene, size=geometry.Coordinates(700, 700)) gui.show()
from __future__ import unicode_literals, division import sys sys.path.append('../..') import optivis.scene as scene import optivis.bench.components as components import optivis.view.canvas as canvas scene = scene.Scene() # lasers l1 = components.Laser() l2 = components.Laser() # mirror m1 = components.CavityMirror(azimuth=0, aoi=45) # link lasers to INPUTS of mirror scene.link(outputNode=l1.getOutputNode("out"), inputNode=m1.getInputNode("fr"), length=50) scene.link(outputNode=l2.getOutputNode("out"), inputNode=m1.getInputNode("bk"), length=100) scene.reference = m1 gui = canvas.Simple(scene=scene) gui.show()
import optivis.view.canvas as canvas scene = scene.Scene() # beam splitter bs = components.BeamSplitter(name="BS", azimuth=180+45, aoi=45) # mirrors mPR = components.SteeringMirror(name="PR") mSR = components.SteeringMirror(name="SR") mIX = components.SteeringMirror(name="IX") mIY = components.SteeringMirror(name="IY") # link mirrors to INPUTS of beam splitter scene.link(outputNode=mPR.getOutputNode("fr"), inputNode=bs.getInputNode("frA"), length=150, labels=[ labels.Label(text="PR->fr --> frA<-BS", position=geometry.Coordinates(-0.3, 0)) ]) scene.link(outputNode=mSR.getOutputNode("fr"), inputNode=bs.getInputNode("bkA"), length=150, labels=[ labels.Label(text="SR->fr --> bkA<-BS", position=geometry.Coordinates(-0.3, 0)) ]) scene.link(outputNode=mIX.getOutputNode("fr"), inputNode=bs.getInputNode("bkB"), length=300, labels=[ labels.Label(text="IX->fr --> bkB<-BS", position=geometry.Coordinates(-0.2, 0)) ]) scene.link(outputNode=mIY.getOutputNode("fr"), inputNode=bs.getInputNode("frB"), length=300, labels=[ labels.Label(text="IY->fr --> frB<-BS", position=geometry.Coordinates(-0.2, 0)) ]) scene.reference = bs gui = canvas.Simple(scene=scene, size=geometry.Coordinates(700, 700)) gui.show()
from __future__ import unicode_literals, division import sys sys.path.append('../..') import optivis.scene as scene import optivis.bench.components as components import optivis.view.canvas as canvas scene = scene.Scene() # laser l1 = components.Laser(name="L1", azimuth=45) # mirror m1 = components.SteeringMirror(name="M1") scene.link(outputNode=l1.getOutputNode("out"), inputNode=m1.getInputNode("fr"), length=50) gui = canvas.Simple(scene=scene) gui.show()
""" Demonstration of beam splitter's inputs and outputs. """ import sys sys.path.append('..') import optivis.scene as scene import optivis.bench.components as components import optivis.view.canvas as canvas scene = scene.Scene(title="Example 3") l = components.Laser(name="L1") bs = components.BeamSplitter(name="BS", aoi=45) mTopRight = components.SteeringMirror(name="Top Right", aoi=45) mBottomRight = components.SteeringMirror(name="Bottom Right", aoi=45) mBottomLeft = components.SteeringMirror(name="Bottom Left", aoi=45) scene.link(outputNode=l.getOutputNode('out'), inputNode=bs.getInputNode('bkB'), length=100) scene.link(outputNode=bs.getOutputNode('frB'), inputNode=mTopRight.getInputNode('fr'), length=50) scene.link(outputNode=mTopRight.getOutputNode('fr'), inputNode=mBottomRight.getInputNode('fr'), length=50) scene.link(outputNode=mBottomRight.getOutputNode('fr'), inputNode=mBottomLeft.getInputNode('fr'), length=50) scene.link(outputNode=mBottomLeft.getOutputNode('fr'), inputNode=bs.getInputNode('frB'), length=42.5) scene.reference = l gui = canvas.Simple(scene=scene, startMarkers=True, endMarkers=True) gui.show()
lens2 = components.ConcaveLens(name="Lens 2") mirror1 = components.CavityMirror(name="Mirror 1", aoi=30) mirror2 = components.CavityMirror(name="Mirror 2", aoi=15) mirror3 = components.CavityMirror(name="Mirror 3", aoi=-45) pd = components.Photodiode(name="Photodiode") # dashed pattern to indicate sidebands pat = [5, 5] scene.link( outputNode=laser.getOutputNode('out'), inputNode=wp1.getInputNode('bk'), length=40, specs=[ links.LinkSpec(width=3, color="red", pattern=None, offset=0) ], labels=[ labels.Label(text="laser->wp1", position=geometry.Coordinates(0, 0), azimuth=90), labels.Label(text="p=1W", position=geometry.Coordinates(-0.5, 0), azimuth=90), labels.Label(text="g=23+3i", position=geometry.Coordinates(0.5, 0), azimuth=90) ] ) scene.link( outputNode=wp1.getOutputNode('fr'), inputNode=wp2.getInputNode('bk'), length=10, specs=[ links.LinkSpec(width=3, color="red", pattern=None, offset=0) ] )
scene = scene.Scene() # beam splitter bs = components.BeamSplitter(name="BS", azimuth=180 + 45, aoi=45) # mirrors mPR = components.SteeringMirror(name="PR") mSR = components.SteeringMirror(name="SR") mIX = components.SteeringMirror(name="IX") mIY = components.SteeringMirror(name="IY") # link OUTPUTS of beam splitter to mirrors scene.link(outputNode=bs.getOutputNode("frB"), inputNode=mPR.getInputNode("fr"), length=150, labels=[ labels.Label(text="BS->frB --> fr<-PR", position=geometry.Coordinates(-0.3, 0)) ]) scene.link(outputNode=bs.getOutputNode("bkB"), inputNode=mSR.getInputNode("fr"), length=150, labels=[ labels.Label(text="BS->bkB --> fr<-SR", position=geometry.Coordinates(-0.3, 0)) ]) scene.link(outputNode=bs.getOutputNode("bkA"), inputNode=mIX.getInputNode("fr"), length=300, labels=[ labels.Label(text="BS->bkA --> fr<-IX",
mirror1 = components.CavityMirror(name="Mirror 1", aoi=30) mirror2 = components.CavityMirror(name="Mirror 2", aoi=15) mirror3 = components.CavityMirror(name="Mirror 3", aoi=-45) pd = components.Photodiode(name="Photodiode") # dashed pattern to indicate sidebands pat = [5, 5] scene.link( outputNode=laser.getOutputNode('out'), inputNode=wp1.getInputNode('bk'), length=40, specs=[links.LinkSpec(width=3, color="red", pattern=None, offset=0)], labels=[ labels.Label(text="laser->wp1", position=geometry.Coordinates(0, 0), azimuth=90), labels.Label(text="p=1W", position=geometry.Coordinates(-0.5, 0), azimuth=90), labels.Label(text="g=23+3i", position=geometry.Coordinates(0.5, 0), azimuth=90) ]) scene.link( outputNode=wp1.getOutputNode('fr'), inputNode=wp2.getInputNode('bk'), length=10, specs=[links.LinkSpec(width=3, color="red", pattern=None, offset=0)]) scene.link(
import optivis.scene as scene import optivis.bench.components as components import optivis.view.canvas as canvas scene = scene.Scene(title="Example 6") l = components.Laser(name="L1") bs = components.BeamSplitter(name="BS", aoi=45) mTopRight = components.SteeringMirror(name="Top Right", aoi=45) mBottomRight = components.SteeringMirror(name="Bottom Right", aoi=45) mBottomLeft = components.SteeringMirror(name="Bottom Left", aoi=45) scene.link(outputNode=l.getOutputNode('out'), inputNode=bs.getInputNode('bkB'), length=100, startMarker=True, endMarker=True) scene.link(outputNode=bs.getOutputNode('frB'), inputNode=mTopRight.getInputNode('fr'), length=50, startMarker=True, endMarker=True) scene.link(outputNode=mTopRight.getOutputNode('fr'), inputNode=mBottomRight.getInputNode('fr'), length=50, startMarker=True, endMarker=True) scene.link(outputNode=mBottomRight.getOutputNode('fr'), inputNode=mBottomLeft.getInputNode('fr'), length=50,
scene = scene.Scene() # beam splitter bs = components.BeamSplitter(name="BS", azimuth=180 + 45, aoi=45) # mirrors mPR = components.SteeringMirror(name="PR") mSR = components.SteeringMirror(name="SR") mIX = components.SteeringMirror(name="IX") mIY = components.SteeringMirror(name="IY") # link mirrors to INPUTS of beam splitter scene.link(outputNode=mPR.getOutputNode("fr"), inputNode=bs.getInputNode("frA"), length=150, labels=[ labels.Label(text="PR->fr --> frA<-BS", position=geometry.Coordinates(-0.3, 0)) ]) scene.link(outputNode=mSR.getOutputNode("fr"), inputNode=bs.getInputNode("bkA"), length=150, labels=[ labels.Label(text="SR->fr --> bkA<-BS", position=geometry.Coordinates(-0.3, 0)) ]) scene.link(outputNode=mIX.getOutputNode("fr"), inputNode=bs.getInputNode("bkB"), length=300, labels=[ labels.Label(text="IX->fr --> bkB<-BS",
from __future__ import unicode_literals, division import sys sys.path.append('../..') import optivis.scene as scene import optivis.bench.components as components import optivis.view.canvas as canvas scene = scene.Scene() # mirror m1 = components.CavityMirror(azimuth=0, aoi=45) # dumps d1 = components.Dump() d2 = components.Dump() # link OUTPUTS of mirror to dumps scene.link(outputNode=m1.getOutputNode("fr"), inputNode=d1.getInputNode("in"), length=50) scene.link(outputNode=m1.getOutputNode("bk"), inputNode=d2.getInputNode("in"), length=100) scene.reference = m1 gui = canvas.Simple(scene=scene) gui.show()
""" Demonstration of laser and mirror. """ import sys sys.path.append('..') import optivis.scene as scene import optivis.bench.links as links import optivis.bench.components as components import optivis.view.canvas as canvas scene = scene.Scene(title="Example 1") l1 = components.Laser(name="L1", tooltip="This is a laser") m1 = components.SteeringMirror(name="M1", tooltip="This is a mirror") scene.link(outputNode=l1.getOutputNode('out'), inputNode=m1.getInputNode('fr'), length=50) scene.reference = l1 gui = canvas.Simple(scene=scene) gui.show()
from __future__ import unicode_literals, division import sys sys.path.append('../..') import optivis.scene as scene import optivis.bench.components as components import optivis.view.canvas as canvas scene = scene.Scene() # mirror m1 = components.SteeringMirror(azimuth=0, aoi=45) # dump d1 = components.Dump() # link OUTPUT of mirror to dump scene.link(outputNode=m1.getOutputNode("fr"), inputNode=d1.getInputNode("in"), length=50) scene.reference = m1 gui = canvas.Simple(scene=scene) gui.show()