| ... | ... | @@ -3,7 +3,7 @@ |
|
|
|
|
|
|
|
# content
|
|
|
|
|
|
|
|
- [detectors](#detectors)
|
|
|
|
- [Required Imports](## **Required Imports**)
|
|
|
|
- [energy](#energy)
|
|
|
|
- [diffractometer](#diffractometer)
|
|
|
|
- [motor scans](#motor-scans)
|
| ... | ... | @@ -16,77 +16,18 @@ |
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
# list of commonly used python functions for the Kappa Endstation
|
|
|
|
---
|
|
|
|
|
|
|
|
## detectors
|
|
|
|
|
|
|
|
| Name | Description | Ang. acceptance<br>HxV (deg) | Offset | Max tth | Det Num | Norm Det Num (d/I<sub>0</sub>) |
|
|
|
|
|------|-------------|------------------------------|--------|---------|---------|--------------------------------|
|
|
|
|
| mesh (I<sub>0</sub>) | Au mesh | 1 cm<sup>2</sup> | n/a | n/a | D31 | n/a |
|
|
|
|
| tey | drain current | n/a | n/a | n/a | D32 | D36 |
|
|
|
|
| d4 | small diode | 0.25 x 2.5 | 0 | 151 | D34 | D38 |
|
|
|
|
| d3 | big diode | 2.5 x 2.5 | 24 | 175 | D33 | D37 |
|
|
|
|
| mcp | area det | diameter = 6 | 13 | 165 | D35 | D39 |
|
|
|
|
| vortex | fluorescence detector | 1 cm<sup>2</sup> | fixed port @ tth=-155 | n/a | D16 | D49 |
|
|
|
|
|
|
|
|
```python
|
|
|
|
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/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).
|
|
|
|
|
|
|
|
## energy
|
|
|
|
|
|
|
|
```python
|
|
|
|
energy(932) # set undulator (ID), mono, apertures and mirror
|
|
|
|
polarization('V') # Turns the ID off and then sets the polarization:
|
|
|
|
# 'RCP', 'LCP', 'H', 'V'
|
|
|
|
# **need to set energy after a mode change!**
|
|
|
|
mvmono(500) # change mono
|
|
|
|
|
|
|
|
slit(100) # set energy resolving slits (and vertical beam size)
|
|
|
|
m3r_align() # realign mirror
|
|
|
|
|
|
|
|
|
|
|
|
scanmono # scan mono only and is a linear (constant step size)
|
|
|
|
|
|
|
|
scanXAS(hv_list_of_lists) # scan mono with variable step size; ID_tracking = True/False
|
|
|
|
hv_list_of_lists = [[445,455,0.5],[455,468,0.1],[468,475,0.5],[475,480,1]]
|
|
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
## motor scans
|
|
|
|
- m1 = kphi
|
|
|
|
- m2 = x
|
|
|
|
- m3 = y
|
|
|
|
- m4 = z
|
|
|
|
- m7 = kap
|
|
|
|
- m8 = kth
|
|
|
|
- m9 = tth
|
|
|
|
|
|
|
|
# **Kappa python - cheat sheet**
|
|
|
|
#### list of commonly used python functions for the Kappa Endstation
|
|
|
|
---
|
|
|
|
### **Required Imports**
|
|
|
|
## **Required Imports**
|
|
|
|
from iexcode.macros.Kappa import *
|
|
|
|
from iexcode.macros.xrays import *
|
|
|
|
|
|
|
|
### **Kappa Endstation initalization (run in the first cell)**
|
|
|
|
## **Kappa Endstation initalization (run in the first cell)**
|
|
|
|
tey,d3,d4,mesh,tth_pv,tthdet,ls331 = kappa_init('UserName', xrays=True)
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
### **KappaEndstation**
|
|
|
|
## **KappaEndstation**
|
|
|
|
Kappa_get_all()
|
|
|
|
Kappa_safe_state()
|
|
|
|
-------------------------------------------------------------
|
| ... | ... | @@ -94,7 +35,7 @@ scanXAS(hv_list_of_lists) # scan mono with variable step size; ID_tracking = T |
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
### **Beamline and energy**
|
|
|
|
## **Beamline and energy**
|
|
|
|
safe_state() #put the beamline in a safe state
|
|
|
|
-------------------------------------------------------------
|
|
|
|
xrays_get_all() #get current beamline settings
|
| ... | ... | @@ -116,7 +57,7 @@ scanXAS(hv_list_of_lists) # scan mono with variable step size; ID_tracking = T |
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
### **Motor Moves and Scans**
|
|
|
|
## **Motor Moves and Scans**
|
|
|
|
There are seven motors in Kappa:
|
|
|
|
`mot` = `tth`, `th`, `chi`, `phi`, `x`, `y`, `z`
|
|
|
|
|
| ... | ... | @@ -142,7 +83,7 @@ There are seven motors in Kappa: |
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
### **Diffraction and Scans**
|
|
|
|
## **Diffraction and Scans**
|
|
|
|
-------------------------------------------------------------
|
|
|
|
wh() #print current position
|
|
|
|
pa() #print current sample orientation
|
| ... | ... | @@ -169,11 +110,29 @@ There are seven motors in Kappa: |
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
### **Detectos**
|
|
|
|
`det` = `mesh`, `tey`, `d3`, or `d4` can be intialized as Keithley or SRS current amplifiers. You can configure them using these commands.
|
|
|
|
## **Detectos**
|
|
|
|
|
|
|
|
See below for a complete list of signals recorded during a scan and their corresponding [detector number](#detector-number) (Det Num).
|
|
|
|
|
|
|
|
| Name | Description | Ang. acceptance<br>HxV (deg) | Offset | Max tth | Det Num | Norm Det Num (d/I<sub>0</sub>) |
|
|
|
|
|------|-------------|------------------------------|--------|---------|---------|--------------------------------|
|
|
|
|
| mesh (I<sub>0</sub>) | Au mesh | 1 cm<sup>2</sup> | n/a | n/a | D31 | n/a |
|
|
|
|
| tey | drain current | n/a | n/a | n/a | D32 | D36 |
|
|
|
|
| d4 | small diode | 0.25 x 2.5 | 0 | 151 | D34 | D38 |
|
|
|
|
| d3 | big diode | 2.5 x 2.5 | 24 | 175 | D33 | D37 |
|
|
|
|
| mcp | area det | diameter = 6 | 13 | 165 | D35 | D39 |
|
|
|
|
| vortex | fluorescence detector | 1 cm<sup>2</sup> | fixed port @ tth=-155 | n/a | D16 | D49 |
|
|
|
|
|
|
|
|
|
|
|
|
`det` = `mesh`, `tey`, `d3`, or `d4` can be configured as Keithley or SRS current amplifiers.
|
|
|
|
|
|
|
|
```python
|
|
|
|
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
|
|
|
|
```
|
|
|
|
|
|
|
|
#### Keithley Current Amplifiers
|
|
|
|
##### Attributes:
|
|
|
|
### Keithley Current Amplifiers
|
|
|
|
#### Attributes:
|
|
|
|
[det].state
|
|
|
|
[det].current
|
|
|
|
[det].rate
|
| ... | ... | @@ -191,7 +150,7 @@ There are seven motors in Kappa: |
|
|
|
[det].set_avg_pts
|
|
|
|
[det].set_avg_time
|
|
|
|
|
|
|
|
##### Methods:
|
|
|
|
#### Methods:
|
|
|
|
[det].acquire()
|
|
|
|
[det].refresh()
|
|
|
|
[det].refresh_all()
|
| ... | ... | @@ -203,7 +162,7 @@ There are seven motors in Kappa: |
|
|
|
[det].set_avg_pts(n_pts)
|
|
|
|
[det].set_default()
|
|
|
|
|
|
|
|
##### Functions:
|
|
|
|
#### Functions:
|
|
|
|
ca_reset_all() #resets all the connected current amplifiers
|
|
|
|
ca_average(avg_pts) #set up average reading using number of points
|
|
|
|
ca_average_time(dwell_time) #set up average reading using dwell_time
|
| ... | ... | @@ -213,8 +172,8 @@ There are seven motors in Kappa: |
|
|
|
ca_passive() #puts all the Keithley in passive mode
|
|
|
|
|
|
|
|
|
|
|
|
#### SRS Current Amplifiers
|
|
|
|
##### Attributes:
|
|
|
|
### SRS Current Amplifiers
|
|
|
|
#### Attributes:
|
|
|
|
[det].scaler
|
|
|
|
[det].sens_num
|
|
|
|
[det].sens_unit
|
| ... | ... | @@ -232,7 +191,7 @@ There are seven motors in Kappa: |
|
|
|
[det].invert_on
|
|
|
|
[det].blank_on
|
|
|
|
|
|
|
|
##### Methods:
|
|
|
|
#### Methods:
|
|
|
|
[det].reset_filter()
|
|
|
|
[det].set_all()
|
|
|
|
[det].reset_default()
|
| ... | ... | @@ -246,7 +205,7 @@ There are seven motors in Kappa: |
|
|
|
[det].set_offset(value, gain, unit)
|
|
|
|
[det].auto_dark_counts(target=1000)
|
|
|
|
|
|
|
|
##### Functions:
|
|
|
|
#### Functions:
|
|
|
|
scaler_cts(time_seconds=0.1) #sets the scalers counting
|
|
|
|
|
|
|
|
-----------------------------------------------------------
|
| ... | ... | @@ -281,7 +240,7 @@ For detailed instructions see [manual here](https://git.aps.anl.gov/rodolakis/Ma |
|
|
|
|
|
|
|
## analysis
|
|
|
|
|
|
|
|
#### basic mda plots:
|
|
|
|
### basic mda plots:
|
|
|
|
|
|
|
|
```python
|
|
|
|
# n1,n2,n3 is a scan number
|
| ... | ... | |