From b47fb5c2e02a2857f0f0457fa64205dfc551a6a8 Mon Sep 17 00:00:00 2001 From: bain Date: Fri, 3 May 2013 15:09:50 -0400 Subject: bug fix. beam used to travel in odd directions near limits --- beam_tracing/python/prismDiskCoupling.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/beam_tracing/python/prismDiskCoupling.py b/beam_tracing/python/prismDiskCoupling.py index 7cc9f70..aff59ff 100644 --- a/beam_tracing/python/prismDiskCoupling.py +++ b/beam_tracing/python/prismDiskCoupling.py @@ -85,8 +85,9 @@ def prismDiskCoupling(prismAngleInDegrees, nDisk, nPrism, diskX, coupDesc): xOutStart = xCross yOutStart = yCross xOutStop = 1.5 - xBeamOut = np.linspace(xOutStart, xOutStop) - yBeamOut = yOutStart + np.tan(thetaAirHorizon) * (xBeamOut - xOutStart) + yOutStop = 2.0 + yBeamOut = np.linspace(yOutStart, yOutStop) + xBeamOut = xOutStart + (1/np.tan(thetaAirHorizon)) * (yBeamOut - yOutStart) # this keeps the beam from going farther than necessary i = 0 for value in yBeamOut: @@ -133,7 +134,7 @@ def prismDiskCoupling(prismAngleInDegrees, nDisk, nPrism, diskX, coupDesc): # annotatation of thetaAir pylab.annotate('%.2f' % thetaAirInDegrees + u'\N{DEGREE SIGN}',\ xy = (xArcAir[29], yArcAir[29]),\ - xytext=(xCross, yCross + 0.3),\ + xytext=(xCross + 0.12, yCross + 0.3),\ arrowprops = dict(facecolor = 'black', arrowstyle = '->')) @@ -173,7 +174,7 @@ def prismDiskCoupling(prismAngleInDegrees, nDisk, nPrism, diskX, coupDesc): # annotation of thetaPrism2 pylab.annotate('%.2f' % thetaPrismInDegrees2 + u'\N{DEGREE SIGN}',\ xy = (xArcPrism2[29], yArcPrism2[29]),\ - xytext=(xCross - 0.5, yCross + 0.1),\ + xytext=(xCross - 0.2, yCross + 0.5),\ arrowprops = dict(facecolor = 'black', arrowstyle = '->')) -- cgit v1.2.3