| ... | ... | @@ -223,24 +223,23 @@ roi=4; MPA_ROI_SetUp(535,539,400,400,roi) #set up ROI4 = 400x400 at the center |
|
|
|
For detailed instructions see [manual here](https://git.aps.anl.gov/rodolakis/Macros_29id/-/wikis/RSXS/vortex).
|
|
|
|
|
|
|
|
## Data Analysis
|
|
|
|
|
|
|
|
### data loading
|
|
|
|
Import iexplot module:
|
|
|
|
```python
|
|
|
|
from iexplot import *
|
|
|
|
from iexplot import *
|
|
|
|
```
|
|
|
|
|
|
|
|
Load data:
|
|
|
|
### data loading
|
|
|
|
```python
|
|
|
|
data = IEX_nData(scan_num_start, scan_num_stop/inf, path=path, prefix=prefix)
|
|
|
|
data = IEX_nData(scan_num_start, scan_num_stop/inf, path=path, prefix=prefix)
|
|
|
|
```
|
|
|
|
|
|
|
|
### raw data
|
|
|
|
```python
|
|
|
|
x = data.mda[scan_num].posx[0].data
|
|
|
|
y = data.mda[scan_num].det[det_num].data
|
|
|
|
```
|
|
|
|
|
|
|
|
### basic mda plots:
|
|
|
|
|
|
|
|
```python
|
|
|
|
# n1,n2,n3 is a scan number
|
|
|
|
# d1,d2,d3 is a detector number - see table below
|
| ... | ... | @@ -256,7 +255,6 @@ fit_mda(n, d, function) # 'gauss', 'lorz', 'erf', 'box', 'poly' |
|
|
|
```
|
|
|
|
|
|
|
|
Custom functions for scattering:
|
|
|
|
|
|
|
|
```python
|
|
|
|
plot_latest() # plot last scan with currently selected detector; use norm=31 to normalize with I0
|
|
|
|
fit_z() # erf fit for last scan on d3
|
| ... | ... | @@ -266,7 +264,6 @@ fit_centroid(n) # to calculate avg centroid position during scan n |
|
|
|
```
|
|
|
|
|
|
|
|
#### nData
|
|
|
|
|
|
|
|
```python
|
|
|
|
from Macros_29id.IEX_nData import *
|
|
|
|
|
| ... | ... | @@ -293,7 +290,6 @@ plt.show() |
|
|
|
```
|
|
|
|
|
|
|
|
#### mdaFile
|
|
|
|
|
|
|
|
```python
|
|
|
|
mydata=mdaFile(1,3) # loads mda scans 1 to 3
|
|
|
|
mydata.update(4) # loads another scan
|
| ... | ... | |