Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Over-constrained components' azimuths are not overridden #20

Open
SeanDS opened this issue Mar 4, 2015 · 0 comments
Open

Over-constrained components' azimuths are not overridden #20

SeanDS opened this issue Mar 4, 2015 · 0 comments
Assignees
Labels

Comments

@SeanDS
Copy link
Owner

SeanDS commented Mar 4, 2015

If a component is linked in such a way that it is overconstrained, the link length and azimuth is changed to the required numbers but the component's azimuth is not. This leads to funky situations like this:

export

Notice how one mirror in each cavity is at the wrong angle.

Example to reproduce:

"""
Speedmeter example.
"""

import sys

sys.path.append('..')

import optivis.scene as scene
import optivis.bench.links as links
import optivis.bench.components as components
import optivis.bench.labels as labels
import optivis.view.canvas as canvas
import optivis.geometry as geometry

scene = scene.Scene(title="ERC Speedmeter")

laser = components.Laser(name="Laser")
eom = components.ElectroopticModulator(name="EOM")
m6 = components.BeamSplitter(name="M6")
m9 = components.CavityMirror(name="M9")
m1a = components.BeamSplitter(name="M1a", aoi=-45)
m1b = components.BeamSplitter(name="M1b", aoi=45)
m2a = components.BeamSplitter(name="M2a")
m2b = components.BeamSplitter(name="M2b")
m3a = components.BeamSplitter(name="M3a", aoi=12)
m3b = components.BeamSplitter(name="M3b", aoi=-12)

BHDa = components.Photodiode(name="BHDa")

PDHa = components.Photodiode(name="PDHa")
PDHb = components.Photodiode(name="PDHb")

# laser -> eom -> M6
scene.link(outputNode=laser.getOutputNode('out'), inputNode=eom.getInputNode('bk'), length=30)
scene.link(outputNode=eom.getOutputNode('fr'), inputNode=m6.getInputNode('frA'), length=50)

# M6 -> cavity A
scene.link(outputNode=m6.getOutputNode('bkA'), inputNode=m1a.getInputNode('bkA'), length=50)
scene.link(outputNode=m1a.getOutputNode('frA'), inputNode=m3a.getInputNode('frB'), length=100)
scene.link(outputNode=m3a.getOutputNode('frB'), inputNode=m2a.getInputNode('frB'), length=109)
scene.link(outputNode=m2a.getOutputNode('frB'), inputNode=m1a.getInputNode('frA'), length=30) # length ignored

# M6 -> cavity B
scene.link(outputNode=m6.getOutputNode('frA'), inputNode=m1b.getInputNode('bkA'), length=50)
scene.link(outputNode=m1b.getOutputNode('frA'), inputNode=m3b.getInputNode('frB'), length=100)
scene.link(outputNode=m3b.getOutputNode('frB'), inputNode=m2b.getInputNode('frB'), length=109)
scene.link(outputNode=m2b.getOutputNode('frB'), inputNode=m1b.getInputNode('frA'), length=30)

# Show
gui = canvas.Full(scene=scene)
gui.show()
@SeanDS SeanDS added the bug label Mar 4, 2015
@SeanDS SeanDS self-assigned this Mar 4, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant