|
|
___
|
|
|
___
|
|
|
# **APRES python - cheat sheet**
|
|
|
|
|
|
# content
|
|
|
#### list of commonly used python functions for the ARPES Endstation
|
|
|
|
|
|
- [safe state](#safe-state)
|
|
|
- [beamline controls](#beamline-controls)
|
|
|
- [sample position](#sample-position)
|
|
|
- [motor scans](#motor-scans)
|
|
|
- [electron analyzer](#electron-analyzer)
|
|
|
- [analysis](#analysis)
|
|
|
---
|
|
|
|
|
|
___
|
|
|
___
|
|
|
### **ARPES Endstation initalization (run in the first cell)**
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## safe state
|
|
|
```python
|
|
|
safe_state # does the following: EA.off(); branch_shutter_close(); branch_valve_close()
|
|
|
```
|
|
|
|
|
|
|
|
|
## beamline controls
|
|
|
```python
|
|
|
get_all() # prints current beamline status
|
|
|
energy(932) #sets the energy (mono,undulator and slits)
|
|
|
polarization('V') # Turns the ID off and then sets the polarization:
|
|
|
# 'RCP', 'LCP', 'H', 'V'
|
|
|
# **need to set energy after a mode change!**
|
|
|
slit(100) #changes the slits (flux and resolution 0-300)
|
|
|
resolution() #prints resolution for the current beamlize and analyzer setting
|
|
|
|
|
|
scanXAS #scans the energy; Note ARPES branch has no mesh need ID_tracking=True
|
|
|
|
|
|
tey,ca15 = ARPES_init('user_name')
|
|
|
```
|
|
|
|
|
|
## sample position
|
|
|
```python
|
|
|
ARPES_transfer() # moves motors to transfer position
|
|
|
ARPES_measure() # moves motors to measure position
|
|
|
### **Beamline and energy**
|
|
|
|
|
|
mprint() # gets a list of current motor positions
|
|
|
mvsample([list_from_mprint]) # to go to a position
|
|
|
```
|
|
|
## motor scans
|
|
|
if EA is on records total number of counts not spectra:
|
|
|
```python
|
|
|
scanx(start,stop,step) #x,y,z,theta,focus
|
|
|
ARPES_sample_map2D # maps the sample, put EA first if you want EA contrast y:[-1.5,1.5,.1],z:[12.5,14.5,.5]
|
|
|
```
|
|
|
## electron analyzer
|
|
|
```python
|
|
|
EA.off() # turns off analyzer
|
|
|
EA.get() # get current analyzer settings
|
|
|
EA.put(KE,PE) # changes the current analyzer setting
|
|
|
|
|
|
scanEA(EAlist) # takes an analyzer spectra, number of parameters in EAlist determine the scan type
|
|
|
scanFM(RoughPositions, thList, EAlist) # takes a Fermi Map: moveS th, linear interp between RoughPositions, takes spectra
|
|
|
scanEA_hv(hvlist,EAlist=EAlist) # takes a spectra as a function of photon energy
|
|
|
scanx_EA(EAlist, start,stop,step, mode) # takes a spectra as a function of x/y/z/th
|
|
|
safe_state() #puts the beamline in a safe state
|
|
|
-------------------------------------------------------------
|
|
|
xrays_get_all() #gets current beamline settings
|
|
|
energy_get_all() #gets current ID and mono settings
|
|
|
energy_get() #return the photon energy
|
|
|
slit_get() #gets the exit slit size
|
|
|
-------------------------------------------------------------
|
|
|
polarization(ID_mode) #sets the polarization but not the energy
|
|
|
grating(grating_name) #changes grating ('HEG','MEG')
|
|
|
energy(hv) #sets the photon energy (ID, mono, apertures)
|
|
|
qp(QP_ratio) #set the QP ration (off = 100 )
|
|
|
apertures_set(c_2B=1) #(c_2B <1 kills flux)
|
|
|
slit(size) #sets the exit slit
|
|
|
-------------------------------------------------------------
|
|
|
scanXAS(hv_list,ID_tracking=True)
|
|
|
-------------------------------------------------------------
|
|
|
resolution() #prints resolution for current setting
|
|
|
```
|
|
|
|
|
|
## analysis
|
|
|
### **ARPES Endstation**
|
|
|
|
|
|
### loading data:
|
|
|
```python
|
|
|
data=IEXdata(start) # initializes the loading and loads filenumber start
|
|
|
data.update(start,inf,overwrite=False) # loads only unloaded data
|
|
|
```
|
|
|
ARPES_get_all()
|
|
|
ARPES_safe_state()
|
|
|
```
|
|
|
|
|
|
### **Preset Positions**
|
|
|
|
|
|
### ploting spectra:
|
|
|
*kwargs are the standard plotting kwargs plus some extras listing in the 'help'
|
|
|
```python
|
|
|
data.plotEA(MDAscanNum) # plot EA image
|
|
|
data.plotEDC(MDAscanNum) # angle integrated data
|
|
|
```
|
|
|
|
|
|
### Fermi maps:
|
|
|
Run in ipython_29id from the terminal
|
|
|
```python
|
|
|
EAImageTool(MDAscanNum) # stacks the data from a single mda file
|
|
|
ARPES_transfer()
|
|
|
ARPES_measure()
|
|
|
ARPES_LEED()
|
|
|
```
|
|
|
### mda scans:
|
|
|
- det[16] => TEY
|
|
|
- det[17] => EA
|
|
|
```python
|
|
|
data.plotMDA(scanNum,detNum) # plots 1D and 2D mda scans,
|
|
|
# TEY: detNum=16, EA: detNum=17
|
|
|
|
|
|
data.mda[scanNum].detAll() # lists all detectors
|
|
|
data.mda.keys() # lists all the mda data loaded
|
|
|
data.mda[scanNum].EA.keys() # lists all the EA data loaded for a give EA scan (useful for Fermi maps, multiple sweeps)
|
|
|
### **Motor Moves and Scans**
|
|
|
|
|
|
```
|
|
|
-------------------------------------------------------------
|
|
|
mprint() #prints current position
|
|
|
mv_sample(position_list) #moves to position
|
|
|
-------------------------------------------------------------
|
|
|
mvx(val) / mvy(val) / mvz(val) / mvth(val)
|
|
|
scanx(start,stop,step) / dscanx(delta_start,delta_stop,step) ...
|
|
|
-------------------------------------------------------------
|
|
|
ARPES_map_sample(y_start,y_stop,y_step,z_start,z_stop,z_step)
|
|
|
-------------------------------------------------------------
|
|
|
mvfocus(x_val)
|
|
|
mvy_fixed_focus(y_val)
|
|
|
scanfocus(x_start,x_stop,x_step)
|
|
|
-------------------------------------------------------------
|
|
|
mvth_interp(RoughPositions, thVal)
|
|
|
```
|
|
|
|
|
|
### **Electron Analyzer (Scienta)**
|
|
|
|
|
|
### metadata:
|
|
|
```python
|
|
|
data.mda[scanNum].EA[EAnum].header.all # dictionary of all the meta data
|
|
|
data.mda[scanNum].EA[EAnum].header.hv # mono readback
|
|
|
data.mda[scanNum].EA[EAnum].header.BeamlineInfo # beamline parameters
|
|
|
data.mda[171].EA[1].header.HVscanInfo # analyzer parameters
|
|
|
data.mda[171].EA[1].header.sampleInfo # sample parameter (position and temp)
|
|
|
```
|
|
|
EA.get() #get current EA setting
|
|
|
EA.put(KE,PE) #change EA setting
|
|
|
EA.off() #turns off EA high voltagae
|
|
|
-------------------------------------------------------------
|
|
|
SES_motor_get() #gets current SES slit number
|
|
|
SES_motor_set(slit_number) #change SES slit
|
|
|
-------------------------------------------------------------
|
|
|
scanEA_reset() #clears scanRecord after abort
|
|
|
-------------------------------------------------------------
|
|
|
scanEA(EAlist) #takes spectra
|
|
|
scanFM(EAlist,thList,RoughPositions) #takes Fermi map
|
|
|
scanEA_y(EAlist,y_start,y_stop,y_step) #takes spectra along y
|
|
|
scanEA_z(EAlist,z_start,z_stop,z_step) #takes spectra along z
|
|
|
scanEA_map_sample(EAlist,y_list,z_list) #takes spectra in 2D y,z scan
|
|
|
```
|
|
|
|
|
|
### **_Resolution_**
|
|
|
|
|
|
```
|
|
|
resolution_EA(PE,slit_SES) #returns EA contribution to resolution
|
|
|
resolution() #returns the resolution for the current beamline and analyzer parameters
|
|
|
```
|
|
|
|
|
|
### **Conversions**
|
|
|
|
|
|
```
|
|
|
hv2kz(lattice,V0,hv) #converts photon energy to kz
|
|
|
kz2hv(lattice,V0,n) #converst kz to photon energy
|
|
|
kx2deg(kx,hv) #converts in-plane momentum to degrees
|
|
|
deg2kx(th,hv) #conversts degrees to in-plane momentum
|
|
|
```
|
|
|
|
|
|
### **Current Amplifiers**
|
|
|
|
|
|
```
|
|
|
tey.get() #get the current setting for the Keithley current amplifer
|
|
|
tey.autoscale(On_Off) #turns on/off autoscaling
|
|
|
tey.avg(num_averages) #set the number of averages
|
|
|
```
|
|
|
|
|
|
### **Temperature Control** |
|
|
\ No newline at end of file |