Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion PDSim/scroll/plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
import threading
import wx

import warnings

import os
#import scrollCalcs as Calcs
from matplotlib.figure import Figure
Expand Down Expand Up @@ -1056,7 +1058,7 @@ def rotated_rectangle(x0,y0,w,h,rot):
self.orbiting_layers.append(self.ax.plot(xo, yo, 'ko')[0])

beta = self.param_dict.get('beta', pi/6)
rring = self.param_dict.get('oldham_ring_radius', 0.04)
rring = self.param_dict.get('oldham_ring_radius', 0.06)
lkey = wkey = self.param_dict.get('oldham_key_width', 0.005)


Expand All @@ -1067,6 +1069,11 @@ def rotated_rectangle(x0,y0,w,h,rot):
xo = self.geo.ro*cos(om)
yo = self.geo.ro*sin(om)

for term in ['pin1_ybeta_offset','pin2_ybeta_offset','pin3_xbeta_offset','pin4_xbeta_offset']:
if not hasattr(self.param_dict, term):
warnings.warn('"param_dict.'+term+'" not found, using 0')
self.param_dict.update({term : 0})

OSkeys = [dict(r = rring, width = wkey, length = lkey, xbeta_offset = self.param_dict['pin3_xbeta_offset']),
dict(r = rring, width = wkey, length = lkey, betaplus = pi, xbeta_offset = self.param_dict['pin4_xbeta_offset'])]
FSkeys = [dict(r = rring, width = wkey, length = lkey, ybeta_offset = self.param_dict['pin1_ybeta_offset']),
Expand Down