first steps in helicalscan

This commit is contained in:
2017-10-03 11:11:35 +02:00
parent 3764e27d13
commit c80dba7b37
4 changed files with 1013 additions and 91 deletions

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 15 KiB

146
python/helicalscan.py Executable file
View File

@@ -0,0 +1,146 @@
#!/usr/bin/env python
# *-----------------------------------------------------------------------*
# | |
# | Copyright (c) 2017 by Paul Scherrer Institute (http://www.psi.ch) |
# | |
# | Author Thierry Zamofing (thierry.zamofing@psi.ch) |
# *-----------------------------------------------------------------------*
'''
tools to setup and execute a helical scan of a cristal
#THIS IS JUST TESTING CODE TO SOLVE FINDING THE ROTATION CENTER
'''
import os, sys, json
import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt
from utilities import *
class HelicalScan:
def __init__(self,args):
if args.cfg:
fh=open(args.cfg,'r')
s=fh.read()
cfg=json.loads(s, object_hook=ConvUtf8)
s=json.dumps(cfg, indent=2, separators=(',', ': '));print(s)
else:
fn='/tmp/shapepath4'
#fn='/home/zamofing_t/Documents/prj/SwissFEL/epics_ioc_modules/ESB_MX/python/data/'+time.strftime('%y-%m-%d-%H_%M_%S')
#cfg = {"sequencer": ['gen_grid_points(w=5,h=5,pitch=100,rnd=0.4)', 'sort_points()','gen_prog(file="'+fn+'.prg",host="SAR-CPPM-EXPMX1",mode=1,pt2pt_time=10,cnt=1)', 'plot_gather("'+fn+'.npz")']}
#cfg = {"sequencer": ['test_find_rot_ctr()']}
cfg = {"sequencer": ['test_find_rot_ctr(n=5. ,per=1. ,phi=24.6 ,bias=2.31,ampl=4.12)']}
self.cfg=dotdict(cfg)
self.args=args
def run(self):
print('args='+str(self.args))
print('cfg='+str(self.cfg))
#try:
# self.points=np.array(self.cfg.points)
#except AttributeError:
# pass
try:
sequencer= self.cfg.pop('sequencer')
except KeyError:
print('no command sequence to execute')
else:
dryrun=self.args.dryrun
for cmd in sequencer:
print('>'*5+' '+cmd+' '+'<'*5)
if not dryrun:
eval('self.' + cmd)
def meas_rot_ctr(self,y,per=1):
# find the amplitude bias and phase of an equidistant sampled sinus
# it needs at least 3 measurements e.g. at 0,120 240 deg or 0 90 180 270 deg
# per is the number of persiods, default is 1 period =360 deg
n=len(y)
f = np.fft.fft(y)
idx=int(per)
bias=np.absolute(f[0]/n)
phase=np.angle(f[idx])
ampl=np.absolute(f[idx])*2/n
return (bias,phase,ampl)
def test_find_rot_ctr(self,n=3. ,per=1. ,phi=37 ,bias=4.1,ampl=2.4):
# find the rotation center, amplitude out of n (niminum 3) measurements
# n number of equidistant measurements
# per number of periods (full rotation of all measurements nut be a interger value for precise measurements)
# phi phase
# bias bias value
# ampl amplitude
t = np.arange(n)
y=ampl*np.cos(2*np.pi*(per/n*t+phi/360.))+bias
sp = np.fft.fft(y)
freq = np.fft.fftfreq(t.shape[-1])
plt.figure(1)
plt.subplot(311)
plt.plot(t,y,'b.-')
plt.subplot(312)
#plt.plot(t, sp.real,'b.-', t, sp.imag,'r.-')
plt.step(t, sp.real,'b.-', t, sp.imag,'r.-', where='mid')
#plt.stem(t, sp.real,'b-')
#plt.plot(freq, sp.real,'b.-', freq, sp.imag,'r.-')
idx=int(per)
bias=np.absolute(sp[0]/n)
phase=np.angle(sp[idx])
ampl=np.absolute(sp[idx]) * 2 / n
print('bias: '+str(bias))
print('phase: '+str(phase*360./2/np.pi))
print('amplitude: '+str(ampl))
plt.subplot(313)
t2 = np.linspace(0,2*np.pi,64)
y2=ampl*np.cos(t2+phase)+bias
plt.plot(t2,y2,'g-')
plt.stem(t/n*2*np.pi*per,y,'b-')
plt.show()
pass
if __name__=='__main__':
from optparse import OptionParser, IndentedHelpFormatter
class MyFormatter(IndentedHelpFormatter):
'helper class for formating the OptionParser'
def __init__(self):
IndentedHelpFormatter.__init__(self)
def format_epilog(self, epilog):
if epilog:
return epilog
else:
return ""
def parse_args():
'main command line interpreter function'
#usage: gpasciiCommunicator.py --host=PPMACZT84 myPowerBRICK.cfg
(h, t)=os.path.split(sys.argv[0]);cmd='\n '+(t if len(h)>3 else sys.argv[0])+' '
exampleCmd=('-n',
'-v15'
)
epilog=__doc__+'''
Examples:'''+''.join(map(lambda s:cmd+s, exampleCmd))+'\n '
fmt=MyFormatter()
parser=OptionParser(epilog=epilog, formatter=fmt)
parser.add_option('-v', '--verbose', type="int", dest='verbose', help='verbosity bits (see below)', default=0)
parser.add_option('-n', '--dryrun', action='store_true', help='dryrun to stdout')
parser.add_option('--xy', action='store_true', help='sort x,y instead y,x')
parser.add_option('--cfg', help='config file containing json configuration structure')
(args, other)=parser.parse_args()
args.other=other
sp=HelicalScan(args)
sp.run()
#------------------ Main Code ----------------------------------
#ssh_test()
ret=parse_args()
exit(ret)

389
python/helicalscan1.svg Normal file
View File

@@ -0,0 +1,389 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="210mm"
height="297mm"
viewBox="0 0 744.09448819 1052.3622047"
id="svg2"
version="1.1"
inkscape:version="0.91 r13725"
sodipodi:docname="helicalscan1.svg">
<defs
id="defs4">
<marker
inkscape:stockid="Arrow1Mend"
orient="auto"
refY="0.0"
refX="0.0"
id="marker5378"
style="overflow:visible;"
inkscape:isstock="true">
<path
id="path5380"
d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1;fill:#000000;fill-opacity:1"
transform="scale(0.4) rotate(180) translate(10,0)" />
</marker>
<marker
inkscape:stockid="Arrow1Mend"
orient="auto"
refY="0.0"
refX="0.0"
id="marker5095"
style="overflow:visible;"
inkscape:isstock="true"
inkscape:collect="always">
<path
id="path5097"
d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1;fill:#000000;fill-opacity:1"
transform="scale(0.4) rotate(180) translate(10,0)" />
</marker>
<marker
inkscape:isstock="true"
style="overflow:visible;"
id="marker5049"
refX="0.0"
refY="0.0"
orient="auto"
inkscape:stockid="Arrow1Mend"
inkscape:collect="always">
<path
transform="scale(0.4) rotate(180) translate(10,0)"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1;fill:#000000;fill-opacity:1"
d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
id="path5051" />
</marker>
<marker
inkscape:stockid="Arrow1Mend"
orient="auto"
refY="0.0"
refX="0.0"
id="Arrow1Mend"
style="overflow:visible;"
inkscape:isstock="true"
inkscape:collect="always">
<path
id="path4194"
d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1;fill:#000000;fill-opacity:1"
transform="scale(0.4) rotate(180) translate(10,0)" />
</marker>
<marker
inkscape:stockid="Arrow1Mstart"
orient="auto"
refY="0.0"
refX="0.0"
id="Arrow1Mstart"
style="overflow:visible"
inkscape:isstock="true">
<path
id="path4191"
d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
style="fill-rule:evenodd;stroke:#000000;stroke-width:1.0pt"
transform="scale(0.4) translate(10,0)" />
</marker>
<marker
inkscape:stockid="DotM"
orient="auto"
refY="0.0"
refX="0.0"
id="DotM"
style="overflow:visible"
inkscape:isstock="true">
<path
id="path4249"
d="M -2.5,-1.0 C -2.5,1.7600000 -4.7400000,4.0 -7.5,4.0 C -10.260000,4.0 -12.5,1.7600000 -12.5,-1.0 C -12.5,-3.7600000 -10.260000,-6.0 -7.5,-6.0 C -4.7400000,-6.0 -2.5,-3.7600000 -2.5,-1.0 z "
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1;fill:#000000;fill-opacity:1"
transform="scale(0.4) translate(7.4, 1)" />
</marker>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="0.88479319"
inkscape:cx="391.99221"
inkscape:cy="491.90477"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:window-width="1871"
inkscape:window-height="1176"
inkscape:window-x="49"
inkscape:window-y="24"
inkscape:window-maximized="1" />
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
<ellipse
style="opacity:1;fill:none;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="path4138"
cx="335.5954"
cy="182.45689"
rx="64.310562"
ry="16.077641" />
<ellipse
style="opacity:1;fill:none;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="path4138-3"
cx="335.5954"
cy="364.42032"
rx="131.10408"
ry="32.77602" />
<path
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 335.59539,118.92292 0,327.66276"
id="path4155"
inkscape:connector-curvature="0" />
<path
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 232.16105,182.4569 219.7738,0"
id="path4157"
inkscape:connector-curvature="0" />
<path
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 295.29607,222.81599 370.01916,148.0929"
id="path4159"
inkscape:connector-curvature="0" />
<path
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.60790253;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 176.61822,364.42032 324.86563,0"
id="path4157-6"
inkscape:connector-curvature="0" />
<path
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.61177063;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="M 285.81401,414.37511 377.2408,322.94832"
id="path4159-7"
inkscape:connector-curvature="0" />
<path
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-start:url(#DotM);marker-end:url(#DotM)"
d="M 229.92096,383.63385 375.15264,195.45428"
id="path4179"
inkscape:connector-curvature="0" />
<path
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#marker5095)"
d="m 25.573679,473.75772 583.399551,0"
id="path4863"
inkscape:connector-curvature="0" />
<path
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Mend)"
d="m 43.954761,498.53222 0,-463.522935"
id="path4865"
inkscape:connector-curvature="0" />
<path
inkscape:connector-curvature="0"
id="path4867"
d="M 35.233586,484.34143 279.37986,240.19516"
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.63367343;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker5049)" />
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:15px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;-inkscape-font-specification:sans-serif;font-stretch:normal;font-variant:normal;"
x="578.60449"
y="458.57333"
id="text4965"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan4967"
x="578.60449"
y="458.57333">x</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:15px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;-inkscape-font-specification:sans-serif;font-stretch:normal;font-variant:normal;"
x="52.745712"
y="54.988724"
id="text4969"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan4971"
x="52.745712"
y="54.988724">y</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:15px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;-inkscape-font-specification:sans-serif;font-stretch:normal;font-variant:normal;"
x="242.94995"
y="261.97568"
id="text4973"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan4975"
x="242.94995"
y="261.97568">z</tspan></text>
<path
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none"
d="M 348.04179,362.07266 217.57607,386.44758"
id="path5141"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
<path
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none"
d="m 326.464,179.26081 56.7416,19.97944"
id="path5143"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
<path
id="ellipse5150"
style="opacity:1;fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.15941836;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
transform="scale(-1,1)"
sodipodi:type="arc"
sodipodi:cx="-336.79416"
sodipodi:cy="363.82095"
sodipodi:rx="20.900398"
sodipodi:ry="5.2250996"
sodipodi:start="3.0626771"
sodipodi:end="0.72911685"
d="m -357.62951,364.23287 a 20.900398,5.2250996 0 0 1 14.00007,-5.34969 20.900398,5.2250996 0 0 1 24.23216,2.04192 20.900398,5.2250996 0 0 1 -1.81013,6.37687"
sodipodi:open="true" />
<path
id="ellipse5152"
style="opacity:1;fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.5;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
sodipodi:type="arc"
sodipodi:cx="335.5954"
sodipodi:cy="182.45689"
sodipodi:rx="18.581232"
sodipodi:ry="4.645308"
sodipodi:start="0.94527877"
sodipodi:end="0.0049500353"
d="m 346.47502,186.22266 a 18.581232,4.645308 0 0 1 -22.99427,-0.24354 18.581232,4.645308 0 0 1 -4.40853,-5.64718 18.581232,4.645308 0 0 1 20.94057,-2.38717 18.581232,4.645308 0 0 1 14.16361,4.53512"
sodipodi:open="true" />
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:15px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="354.63498"
y="358.07678"
id="text5154"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan5156"
x="354.63498"
y="358.07678">φ<tspan
style="font-size:64.99999762%;baseline-shift:sub"
id="tspan5158">s</tspan></tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;baseline-shift:baseline;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="383.2056"
y="205.23409"
id="text5188"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan5190"
x="383.2056"
y="205.23409">p<tspan
style="font-size:64.99999762%;baseline-shift:sub"
id="tspan5192">e</tspan></tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:15px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="226.9664"
y="401.83173"
id="text5194"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan5196"
x="226.9664"
y="401.83173">p<tspan
style="font-size:65%;baseline-shift:sub"
id="tspan5198">s</tspan></tspan></text>
<text
sodipodi:linespacing="125%"
id="text5200"
y="177.46268"
x="305.48557"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:15px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
y="177.46268"
x="305.48557"
id="tspan5202"
sodipodi:role="line">φ<tspan
id="tspan5204"
style="font-size:64.99999762%;baseline-shift:sub">e</tspan></tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:15px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="513.47156"
y="364.27039"
id="text5206"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan5208"
x="513.47156"
y="364.27039">y<tspan
style="font-size:65%;baseline-shift:sub"
id="tspan5210">s</tspan></tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:15px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="458.32828"
y="180.06"
id="text5212"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan5214"
x="458.32828"
y="180.06">y<tspan
style="font-size:65%;baseline-shift:sub"
id="tspan5216">e</tspan></tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:15px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="-44.847584"
y="412.73996"
id="text5218"
sodipodi:linespacing="125%"
transform="matrix(0.65298954,-0.75736693,0.75736693,0.65298954,0,0)"><tspan
sodipodi:role="line"
id="tspan5220"
x="-44.847584"
y="412.73996">crystal</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:15px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="271.81494"
y="385.5397"
id="text5222"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan5224"
x="271.81494"
y="385.5397">r<tspan
style="font-size:65%;baseline-shift:sub"
id="tspan5226">s</tspan></tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:15px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="349.51669"
y="192.83932"
id="text5228"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan5230"
x="349.51669"
y="192.83932">r<tspan
style="font-size:64.99999762%;baseline-shift:sub"
id="tspan5232">e</tspan></tspan></text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 17 KiB

478
python/helicalscan2.svg Normal file
View File

@@ -0,0 +1,478 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="8.5in"
height="11in"
viewBox="0 0 765 990"
id="svg2"
version="1.1"
inkscape:version="0.91 r13725"
sodipodi:docname="helicalscan2.svg">
<defs
id="defs4">
<inkscape:path-effect
effect="spiro"
id="path-effect5690"
is_visible="true" />
<inkscape:path-effect
effect="spiro"
id="path-effect5686"
is_visible="true" />
<inkscape:path-effect
effect="spiro"
id="path-effect5682"
is_visible="true" />
<inkscape:path-effect
effect="spiro"
id="path-effect5678"
is_visible="true" />
<inkscape:path-effect
effect="spiro"
id="path-effect5674"
is_visible="true" />
<marker
inkscape:stockid="Arrow1Mend"
orient="auto"
refY="0"
refX="0"
id="marker5378"
style="overflow:visible"
inkscape:isstock="true">
<path
id="path5380"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 Z"
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1"
transform="matrix(-0.4,0,0,-0.4,-4,0)"
inkscape:connector-curvature="0" />
</marker>
<marker
inkscape:isstock="true"
style="overflow:visible"
id="marker5320"
refX="0"
refY="0"
orient="auto"
inkscape:stockid="Arrow1Mend"
inkscape:collect="always">
<path
transform="matrix(-0.4,0,0,-0.4,-4,0)"
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 Z"
id="path5322"
inkscape:connector-curvature="0" />
</marker>
<marker
inkscape:stockid="Arrow1Mend"
orient="auto"
refY="0"
refX="0"
id="marker5095"
style="overflow:visible"
inkscape:isstock="true"
inkscape:collect="always">
<path
id="path5097"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 Z"
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1"
transform="matrix(-0.4,0,0,-0.4,-4,0)"
inkscape:connector-curvature="0" />
</marker>
<marker
inkscape:stockid="Arrow1Mend"
orient="auto"
refY="0"
refX="0"
id="Arrow1Mend"
style="overflow:visible"
inkscape:isstock="true"
inkscape:collect="always">
<path
id="path4194"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 Z"
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1"
transform="matrix(-0.4,0,0,-0.4,-4,0)"
inkscape:connector-curvature="0" />
</marker>
<marker
inkscape:stockid="Arrow1Mstart"
orient="auto"
refY="0"
refX="0"
id="Arrow1Mstart"
style="overflow:visible"
inkscape:isstock="true">
<path
id="path4191"
d="M 0,0 5,-5 -12.5,0 5,5 0,0 Z"
style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt"
transform="matrix(0.4,0,0,0.4,4,0)"
inkscape:connector-curvature="0" />
</marker>
<marker
inkscape:stockid="DotM"
orient="auto"
refY="0"
refX="0"
id="DotM"
style="overflow:visible"
inkscape:isstock="true">
<path
id="path4249"
d="m -2.5,-1 c 0,2.76 -2.24,5 -5,5 -2.76,0 -5,-2.24 -5,-5 0,-2.76 2.24,-5 5,-5 2.76,0 5,2.24 5,5 z"
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1"
transform="matrix(0.4,0,0,0.4,2.96,0.4)"
inkscape:connector-curvature="0" />
</marker>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="1"
inkscape:cx="441.16057"
inkscape:cy="535.19697"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:window-width="1871"
inkscape:window-height="1176"
inkscape:window-x="49"
inkscape:window-y="24"
inkscape:window-maximized="1"
showguides="true"
inkscape:guide-bbox="true"
units="in"
inkscape:snap-path-clip="true"
inkscape:snap-path-mask="true"
gridtolerance="10000"
objecttolerance="20">
<inkscape:grid
type="xygrid"
id="grid5704"
spacingx="10"
spacingy="10" />
<sodipodi:guide
position="99.348502,347.54298"
orientation="0,1"
id="guide5724" />
</sodipodi:namedview>
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-62.362205)">
<path
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#marker5095)"
d="m 78.823645,702.92931 583.399535,0"
id="path4863"
inkscape:connector-curvature="0" />
<path
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.72616929px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#Arrow1Mend)"
d="m 97.204725,727.70381 0,-244.42575"
id="path4865"
inkscape:connector-curvature="0" />
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:15px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="631.85449"
y="687.74493"
id="text4965"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan4967"
x="631.85449"
y="687.74493">x</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:15px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="105.99566"
y="545.16028"
id="text4969"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan4971"
x="105.99566"
y="545.16028">t</tspan></text>
<path
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.05952632px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#marker5320)"
d="m 99.47892,470.60149 0,-373.215877"
id="path5253"
inkscape:connector-curvature="0" />
<path
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#marker5378)"
d="m 83.495374,447.79916 445.141856,0"
id="path5255"
inkscape:connector-curvature="0" />
<path
style="opacity:1;fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.5;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="path5257"
sodipodi:type="arc"
sodipodi:cx="304.86755"
sodipodi:cy="264.78748"
sodipodi:rx="134.26181"
sodipodi:ry="134.26181"
sodipodi:start="0"
sodipodi:end="6.2817754"
d="M 439.12936,264.78748 A 134.26181,134.26181 0 0 1 304.91488,399.04928 134.26181,134.26181 0 0 1 170.60578,264.88212 134.26181,134.26181 0 0 1 304.72558,130.52574 134.26181,134.26181 0 0 1 439.12923,264.59818"
sodipodi:open="true" />
<path
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 493.19182,327.01012 289.08112,259.32017"
id="path5261"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
<path
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path5263"
d="M 269.52222,83.567473 312.95636,294.1775"
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
<path
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 163.34995,393.39558 324.02651,250.47549"
id="path5265"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
<path
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.16342318px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 356.34182,265.30622 -300.720763,0"
id="path5267"
inkscape:connector-curvature="0" />
<text
sodipodi:linespacing="125%"
id="text5280"
y="248.90388"
x="305.66669"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:15px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
y="248.90388"
x="305.66669"
id="tspan5282"
sodipodi:role="line">φ<tspan
id="tspan5284"
style="font-size:64.99999762%;baseline-shift:sub">0</tspan></tspan></text>
<path
style="opacity:1;fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.5;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="path5286"
sodipodi:type="arc"
sodipodi:cx="307.16516"
sodipodi:cy="265.48676"
sodipodi:rx="26.572651"
sodipodi:ry="26.572651"
sodipodi:start="4.5179844"
sodipodi:end="6.263118"
sodipodi:open="true"
d="m 302.03179,239.41466 a 26.572651,26.572651 0 0 1 21.80407,5.37925 26.572651,26.572651 0 0 1 9.8966,20.15964" />
<path
d="m 285.07968,285.10663 a 29.541634,29.541634 0 0 1 -2.90618,-35.37185 29.541634,29.541634 0 0 1 33.16527,-12.63641 29.541634,29.541634 0 0 1 21.36798,28.33767"
sodipodi:end="6.2814685"
sodipodi:start="2.4152455"
sodipodi:ry="29.541634"
sodipodi:rx="29.541634"
sodipodi:cy="265.48676"
sodipodi:cx="307.16516"
sodipodi:type="arc"
id="path5290"
style="opacity:1;fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.55586541;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
sodipodi:open="true" />
<path
style="opacity:1;fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.61173081;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="path5292"
sodipodi:type="arc"
sodipodi:cx="307.16516"
sodipodi:cy="265.48676"
sodipodi:rx="32.510616"
sodipodi:ry="32.510616"
sodipodi:start="0.31315531"
sodipodi:end="6.2783498"
d="m 338.09467,275.50204 a 32.510616,32.510616 0 0 1 -38.45693,21.61189 32.510616,32.510616 0 0 1 -24.59765,-36.61918 32.510616,32.510616 0 0 1 34.55013,-27.42804 32.510616,32.510616 0 0 1 30.08518,32.26284"
sodipodi:open="true" />
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:15px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="282.59045"
y="256.99554"
id="text5294"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan5296"
x="282.59045"
y="256.99554">φ<tspan
style="font-size:64.99999762%;baseline-shift:sub"
id="tspan5298">1</tspan></tspan></text>
<text
sodipodi:linespacing="125%"
id="text5300"
y="286.46521"
x="312.16"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:15px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
xml:space="preserve"><tspan
y="286.46521"
x="312.16"
id="tspan5302"
sodipodi:role="line">φ<tspan
id="tspan5304"
style="font-size:64.99999762%;baseline-shift:sub">2</tspan></tspan></text>
<path
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 282.69036,132.92324 -192.601772,0"
id="path5306"
inkscape:connector-curvature="0" />
<path
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 217.4575,355.29437 -126.270044,0"
id="path5310"
inkscape:connector-curvature="0" />
<path
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 437.4311,306.74434 -352.437269,0"
id="path5312"
inkscape:connector-curvature="0" />
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:15px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="124.25343"
y="120.13644"
id="text5448"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan5450"
x="124.25343"
y="120.13644">x<tspan
style="font-size:64.99999762%;baseline-shift:sub"
id="tspan5452">o</tspan></tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:15px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="123.45425"
y="299.95129"
id="text5454"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan5456"
x="123.45425"
y="299.95129">x<tspan
style="font-size:64.99999762%;baseline-shift:sub"
id="tspan5458">1</tspan></tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:15px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="113.86412"
y="365.48392"
id="text5460"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan5462"
x="113.86412"
y="365.48392">x<tspan
style="font-size:64.99999762%;baseline-shift:sub"
id="tspan5464">2</tspan></tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:15px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="83.765572"
y="93.60762"
id="text5588"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan5590"
x="83.765572"
y="93.60762">z</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:15px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="553.93195"
y="448.49283"
id="text5592"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan5594"
x="553.93195"
y="448.49283">x</tspan></text>
<flowRoot
xml:space="preserve"
id="flowRoot5596"
style="font-style:normal;font-weight:normal;font-size:15px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"><flowRegion
id="flowRegion5598"><rect
id="rect5600"
width="556.06213"
height="226.04152"
x="-48.598927"
y="-3.2517097" /></flowRegion><flowPara
id="flowPara5602"></flowPara></flowRoot> <path
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1.02096951px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 307.54664,726.11726 0,-467.70736"
id="path5658"
inkscape:connector-curvature="0" />
<path
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.58961648px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 430.63363,288.87182 0,303.72251"
id="path5700"
inkscape:connector-curvature="0" />
<path
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.86124104px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 279.7652,719.28169 0,-601.0725"
id="path5702"
inkscape:connector-curvature="0" />
<path
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 314.67238,710.41352 c -178.59881,-38.63665 -178.69295,-58.26174 0,-96.91875 178.69302,-38.65704 178.65468,-57.77694 0,-96.15475 -62.27974,-13.37866 -72.12489,-15.19103 -72.12489,-15.19103"
id="path5712"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cssc"
inkscape:transform-center-x="1959.1502"
inkscape:transform-center-y="-110.57797" />
<path
inkscape:connector-curvature="0"
id="path5714"
d="m 208.7652,653.16037 0,-320.30443"
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.628699px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
<circle
style="opacity:1;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="path5716"
cx="279.72141"
cy="703.36542"
r="2.1213202" />
<circle
r="2.1213202"
cy="581.36542"
cx="429.72141"
id="circle5718"
style="opacity:1;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<circle
style="opacity:1;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="circle5720"
cx="208.39699"
cy="641.82306"
r="2.1213202" />
<circle
r="2.1213202"
cy="509.24054"
cx="279.46121"
id="circle5722"
style="opacity:1;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 20 KiB