From b78bfacbc6eeb4fe1ae10c61f563a9f99378d891 Mon Sep 17 00:00:00 2001 From: Thierry Zamofing Date: Fri, 8 Dec 2017 09:26:49 +0100 Subject: [PATCH] change angle for deltatau from rad to 1000*deg --- Readme.md | 29 +++++++++++++++++++---------- python/helicalscan.py | 6 ++++-- 2 files changed, 23 insertions(+), 12 deletions(-) diff --git a/Readme.md b/Readme.md index c372336..a8390a0 100644 --- a/Readme.md +++ b/Readme.md @@ -187,8 +187,11 @@ caQtDm -macro 'P=SAR-ESB_MX' ESB_MX_exp HelicalScan ----------- - +``` PPMAC=MOTTEST-CPPM-CRM0485 +gpasciiCommander --host $PPMAC mx-stage_sim.cfg -i + + ssh root@$PPMAC sendgetsends -1 send 1"SampleMessage\n" &1p ->this will trigger:forward kinematic @@ -197,14 +200,20 @@ cpx pmatch ->this will trigger:forward kinematic cpx ;linear abs; X0Y0Z0B0 ->this will trigger: inverse -cpx ;linear abs; X1.4678795645244058 Y18.549693638496166, B0.0 Z2.3 +#7j=0.1 //cx +#8j=0.2 //cy +#1j=0.3 //w +#2j=0.4 //fx -#7j=1.4678795645244058 -#8j=18.549693638496166 -#1j=0.0 -#2j=2.3 +(cx,cz,w,fy) (2.6164986454377614, 17.758728111340563, 0.1, 4.3) +(dx,dz,w,y) (0.2, 0.3, 0.1, 4.3) + +#7j=2.6164986454377614 +#8j=17.758728111340563 +#1j=5729.578 // 0.1*1000.*360./(2*pi) +#2j=4.3 +&1p +B0.1 X0.2 Y4.3 Z0.3 +cpx ;linear abs; X0.2 Z0.3, B0.1 Y4.3 +``` -#7j=0 //cx -#8j=0 //cy -#1j=0.0 //w -#2j=2.3 //fx diff --git a/python/helicalscan.py b/python/helicalscan.py index 80f8b03..b6ded7f 100755 --- a/python/helicalscan.py +++ b/python/helicalscan.py @@ -489,6 +489,8 @@ open forward #https://stackoverflow.com/questions/3471999/how-do-i-merge-two-lists-into-a-single-list l=[j for i in zip((i,) * param.shape[1], list(param[i])) for j in i] prg.append(" define(z_%i=%g, y_%i=%g, x_%i=%g, r_%i=%g, phi_%i=%g)"%tuple(l)) + prg.append(" W=qW") + prg.append(" qW=qW*%g"%(d2r/1000.)) #scale from 1000*deg to rad prg.append(''' p0_x=x_0+r_0*sin(phi_0+qW) p1_x=x_1+r_1*sin(phi_1+qW) @@ -504,7 +506,6 @@ open forward DX=qCX-p0_x DZ=qCZ-p0_z Y=qFY - W=qW send 1"forward result %f %f %f %f\\n",DX,DZ,W,Y D0=$000001c2; //B=$2 X=$40 Y=$80 Z=$100 hex(2+int('40',16)+int('80',16)+int('100',16)) -> 0x1c2 @@ -525,6 +526,8 @@ open inverse # https://stackoverflow.com/questions/3471999/how-do-i-merge-two-lists-into-a-single-list l = [j for i in zip((i,) * param.shape[1], list(param[i])) for j in i] prg.append(" define(z_%i=%g, y_%i=%g, x_%i=%g, r_%i=%g, phi_%i=%g)" % tuple(l)) + prg.append(" qW=W") + prg.append(" W=W*%g"%(d2r/1000.)) #scale from 1000*deg to rad prg.append(''' p0_x=x_0+r_0*sin(phi_0+W) p1_x=x_1+r_1*sin(phi_1+W) @@ -540,7 +543,6 @@ open inverse qCX=DX+p0_x qCZ=DZ+p0_z qFY=Y - qW=W send 1"inverse result %f %f %f %f\\n",qCX,qCZ,qW,qFY close