... | ... | @@ -29,11 +29,17 @@ |
|
|
| vortex | fluorescence detector | 1 cm<sup>2</sup> | fixed port @ tth=-155 | n/a | D16 | D49 |
|
|
|
|
|
|
```python
|
|
|
setdet('d3') # select a given detector (d3,d4, or mcp)
|
|
|
# DOES NOT MOVE MOTORS!
|
|
|
mvtth(90) # moves the selected detector
|
|
|
tthdet.set('d3',move=True) # select a given detector (d3,d4, or mcp); move = True/False
|
|
|
tthdet.get() # returns the name of the current detector
|
|
|
|
|
|
mvtth(90) # moves the selected detector
|
|
|
|
|
|
scaler_cts(1) # set counting time to 1s
|
|
|
d3.setgain(2,'pA') # set gain for d3 to 2 pA
|
|
|
|
|
|
d3/d4
|
|
|
d3.setgain(2,'pA') # set gain for d3 to 2 pA
|
|
|
d3.get() # returns the current with background subtraction in Amps
|
|
|
d3.get_all() # returns all the current settings
|
|
|
```
|
|
|
|
|
|
See below for a complete list of signals recorded during a scan and their corresponding [detector number](#detector-number) (Det Num).
|
... | ... | @@ -72,56 +78,63 @@ scanXAS_BL(E_Ti,mcp=True,m3r=True);plot_latest() |
|
|
- m9 = tth
|
|
|
|
|
|
```python
|
|
|
uan(tth,th) # moves th & tth simulatenously
|
|
|
mvx(500) # absolute move
|
|
|
mvrz(500) # relative move
|
|
|
|
|
|
mprint() # prints current motor position
|
|
|
# returns [x,y,z,tth,ktrh,kap,kphi]
|
|
|
mysample=['name',x,y,z,tth,ktrh,kap,kphi]
|
|
|
mvsample(mysample) # moves to mysample, does not move tth
|
|
|
uan(tth,th) # moves th & tth simulatenously
|
|
|
mvx(500) # absolute move
|
|
|
dmvz(500) # 'delta' move; relative to current position
|
|
|
|
|
|
mprint() # prints current motor positions [x,y,z,tth,ktrh,kap,kphi]
|
|
|
mprint4C() # prints current position in Euler
|
|
|
|
|
|
mvsample(['name',x,y,z,tth,kth,kap,kphi]) # moves sample x,y,z only!, does not move tth; mysample
|
|
|
mv4C(['th','chi','phi']) #moves diffractometer in Euler; each move is sequential so slower than mvkappa
|
|
|
mvkappa(['desc','x','y','z','tth','kth','kap','kphi']) #move all the diffractometer motors simultaneously (except kphi which goes last)
|
|
|
```
|
|
|
|
|
|
## motor scans
|
|
|
|
|
|
```python
|
|
|
physical motors: x,y,z,tth,kth,kap,kphi
|
|
|
psuedo motors: th,chi,phi
|
|
|
|
|
|
scanx(-500,500,50) # absolute scan (start,stop,step)
|
|
|
dscanx(-500,500,50) # relative scan (start,stop,step)
|
|
|
|
|
|
scanth2th() # absolute th2th scan
|
|
|
dscanth2th() # relative th2th scan
|
|
|
```
|
|
|
|
|
|
## hkl:
|
|
|
|
|
|
## hkl:
|
|
|
```
|
|
|
hkl1=[0,0,1.9]
|
|
|
hkl2=[0,0,2.1]
|
|
|
|
|
|
sampleNew(name,A,B,C,Alpha,Beta,Gamma)
|
|
|
sampleChange(sample_key=None
|
|
|
sampleUpdate(a,b,c,alpha,beta,gamma)
|
|
|
sampleList()
|
|
|
sampleRBV()
|
|
|
sampleReload(scanNum=None,**kwargs) #updates the sample and UB to be the same as in previous scanNum
|
|
|
#sample_... used specify lattice parameters used by fourc
|
|
|
sample_new(name,A,B,C,Alpha,Beta,Gamma) #can only be defined once
|
|
|
sample_change(name=None)
|
|
|
sample_update(a,b,c,alpha,beta,gamma) #updates the current sample
|
|
|
sample_list() #lists all samples defined
|
|
|
sample_load_from_scan(scanNum=None,**kwargs) #updates the sample and UB to be the same as in previous scanNum
|
|
|
|
|
|
setor(h,k,l,*args)
|
|
|
setor(h,k,l,*args) #set the orientation matrix
|
|
|
UBcalc(r1,r2) # calculates the UB matrix
|
|
|
UBenergy(eV) # updated UB with specified energy
|
|
|
UB_get_all() # gets all the pvs associated with the UB matrix
|
|
|
UBenergy(eV) # updated UB with specified energy; default is to get current energy
|
|
|
|
|
|
cahkl(h,k,l) # calculate Euler angles for given hkl with current UB
|
|
|
get_hkl() # return hkl for current position
|
|
|
wh() # calculates and print all hkl UB for current setting including energy
|
|
|
|
|
|
### scanning
|
|
|
scanhkl(hkl1,hkl2,50,1) # first hkl, last hkl, npts, cts
|
|
|
scanhkl(hkl1,hkl2,npts) # first hkl, last hkl, npts
|
|
|
scanhkl_test(hkl1,hkl2,npts) # prints the tragectory
|
|
|
|
|
|
#### fix Q scan:
|
|
|
hkl=[0.5,0,0]
|
|
|
E_Ti=[[445,455,0.5],[455,468,0.1],[468,475,0.5],[475,480,1]]
|
|
|
scanhkl_E(E_Ti,hkl,ID_tracking=True) # energy list, Q, ID_tracking = False (fixed ID) or True to move ID to maximize flux (slow)
|
|
|
scanhkl_E(hv_list, hkl) # scans energy with a fixed q
|
|
|
|
|
|
scan_positioners_clear() # remove extra positioners (eg after th2th or hkl scan)
|
|
|
scan_positioners_clear() # remove extra positioners (eg after th2th or hkl scan if aborted)
|
|
|
```
|
|
|
|
|
|
## srs setup
|
|
|
## srs setup - dark counts
|
|
|
|
|
|
With shutter close or slit at 0 (faster), 'INPUT OFFSET' set 'ON' and 'UNCAL'
|
|
|
|
... | ... | @@ -183,9 +196,9 @@ plot_mda(n,d) |
|
|
plot_mda(n1,d1,n2,d2....)
|
|
|
plot_mda((n1,d1,n2,d2),(n1,d1,n3,d3)....) # each (n,d,...) is a subplots
|
|
|
plot_mda2D(n,d)
|
|
|
fit_mda(n, d, FWHM_guess,function) # 'gauss', 'lorz', 'erf', 'box'
|
|
|
# xrange=[x1,x2] to fit subrange
|
|
|
fit_mda(n, d, poly_order,'poly')
|
|
|
fit_mda(n, d, function) # 'gauss', 'lorz', 'erf', 'box', 'poly'
|
|
|
# xrange=[x1,x2] to fit subrange
|
|
|
|
|
|
```
|
|
|
|
|
|
Custom functions for scattering:
|
... | ... | |