try to cleanup stuff(3)

This commit is contained in:
2024-12-11 15:26:01 +01:00
parent 71a473d25d
commit 0fe59e9ad6
4 changed files with 195 additions and 58 deletions

111
Readme.md
View File

@@ -102,3 +102,114 @@ python swissmx.py --sim 0xc0
```
Document to start SwissMX in cristallina environment (maintained by John):
https://docs.google.com/document/d/1yEmV_DbRBKQKVCoovjXriNgSjNEBaz50WA0l3yA5jtg/edit#heading=h.z9io692b8tow
## code generation parameters
```
copied from: PBSwissMX/python/shapepath.py: ShapePath.setup_motion
generates program <prgId> and saves to fnPrg
the type of generated program is defined by <mode>$
-> the list af all points that will be moved at, is in 'mot_pts'
(m)= mandatory
(o)= optional
common kwargs:
scale : (o) scaling velocity (default=1. value=0 would stop at each point
cnt : (o) move path multiple times (default=1)
dwell : (o) dwell time at end (default=100ms)
mode:0 unused
mode:1 pvt motion point list
common kwargs plus:
points : (m) point list
trf : (o) transformation that will be done on 'points', mot_pts=trf*points
mode:2 unused
mode:3 pvt motion point list using inverse fft velocity
common kwargs plus:
points : (m) point list
trf : (o) transformation that will be done on 'points', mot_pts=trf*points
numPad : (o) number of padding points to reduce aliasing (default=16)
mode:4 pvt motion short code using grid parameters
common kwargs plus:
trf : (o) transformation that will be done on 'grid points'
grid: (m) grid parameters: {orig:(0,0),pitch(10,10),cnt:(10,10),mode:0}
mode:5 pvt motion 'stop and go' short code using grid parameters.
Instead of continous motion it moves and waits as given in the parameters
common kwargs plus:
trf : (o) transformation that will be done on 'grid points'
grid: (m) grid parameters: {orig:(0,0),pitch(10,10),cnt:(10,10),mode:0}
tmove: (m) time to move in ms (move start on FEL-trigger
twait: (m) time to wait in ms
(tmove+twait will be rounded to a multiple of fel_per)
mode:6 pvt motion 'hit and return using grid parameters. continous motion on 2n ells to pump then same 2n wells to probe, then go 2 rows down
common kwargs plus:
trf : (o) transformation that will be done on 'grid points'
grid : (m) grid parameters: {orig:(0,0),pitch(10,10),cnt:(10,10),mode:0}
ssz : (m) section size (in wells)
smv : (o) time(in num of shots) to move to next section (horiz/vert)
default is (ssz[0]-1,ssz[1])
sdelay: (o) shots count of delay. Default is ssz[0]*ssz[1]
Examples:
mode:1
mode:3
mode:4
mode:5,tmove:20,twait:30
mode:6,ssz:(4,3)
```
## graphical object parameters
```
FixTarget:
90*40+480*2=4560
60*30+360*2=2520
2520-240=2280
4560-240=4320
size in mm, dscr.size in user units (um)
"size:(6,3.5),
dscr: {
size:(4560,2520),
fiducial:{type:0,pos:((240,240),(4320,240),(240,2280),(4320,2280))},
grid:{pos:(480,360),pitch:(90,60),count:(40,30)}
}"
grid:
size, fiducialSize in mm:
(60-1)*.120 -> 7.08mm
(45-1)*.120 -> 5.28mm
fiducialSize -> 0.1mm
"size:(7.08,5.28),cnt:(60,45),fiducialSize:.01"
SwissMX():
"ofs:[.2,.2],width:10,fidScl:.02,fiducial:[[.1,.1],[.1,2.7],[10.3,.1],[10.3, 2.7]]"
SwissFEL():
"ofs:[.2,.2],width:10,fidScl:.02,fiducial:[[.1,.1],[.1,2.2],[10.3,.1],[10.3,2.2]]"
```
## fully parameter examples:
```
"mode:4,size:(7.08,5.28), cnt:(60,45), fiducialSize:.01" -> add a grid
"mode:6,ssz:(4,3), size:(7.08,5.28), cnt:(60,45), fiducialSize:.01" -> add a grid
"mode:6,ssz:(4,3), size:(3,1.5), cnt:(30,15), fiducialSize:.01" -> add a grid
"mode:6,ssz:(6,8),
dscr: {
size:(4560,2520),
fiducial:{type:0,pos:((240,240),(4320,240),(240,2280),(4320,2280))},
grid:{pos:(480,360),pitch:(90,60),count:(40,30)}
}" -> add a FixTarget
```
## testing hit and return:
```
-> add a FixTarget
"mode:6,ssz:(6,8),
dscr: {
size:(4560,2520),
fiducial:{type:0,pos:((240,240),(4320,240),(240,2280),(4320,2280))},
grid:{pos:(480,360),pitch:(90,60),count:(40,30)}
}" -> add a FixTarget
```