Skip to content
Snippets Groups Projects
Commit e3c39a46 authored by Loïc Le Guyader's avatar Loïc Le Guyader
Browse files

DSSC fine timing analysis

See merge request !184
parents 50c7fc80 3d54644f
No related branches found
No related tags found
1 merge request!184DSSC fine timing analysis
%% Cell type:code id:1bfd1581 tags:
``` python
import numpy as np
%matplotlib notebook
import matplotlib.pyplot as plt
plt.rcParams['figure.constrained_layout.use'] = True
import dask
print(f'dask: {dask.__version__}')
import toolbox_scs as tb
print(tb.__file__)
import toolbox_scs.routines.boz as boz
```
%% Output
dask: 2.11.0
/home/lleguy/notebooks/ToolBox/src/toolbox_scs/__init__.py
%% Cell type:code id:69c17cda tags:
``` python
runs = np.arange(775, 814+1)
delay = np.arange(4756930, 4756969+1)
```
%% Cell type:code id:b436e44e tags:
``` python
proposal = 2937
```
%% Cell type:markdown id:fdec2470 tags:
use first run as dark
%% Cell type:code id:6d5673f2 tags:
``` python
arr_dark, tid_dark = boz.load_dssc_module(proposal, runs[0])
dark = boz.average_module(arr_dark).compute()
```
%% Cell type:code id:542d140c tags:
``` python
intensity = np.zeros((len(runs)))
for k,r in enumerate(runs):
arr, tid = boz.load_dssc_module(proposal, r)
data = boz.average_module(arr, dark=dark).compute()
sensor = data[:,:,:256]
intensity[k] = sensor.mean(axis=(0,1,2))
```
%% Cell type:code id:eab988af tags:
``` python
plt.figure()
plt.plot(delay-delay[0], intensity)
plt.xlabel(f'delay - {delay[0]}')
plt.ylabel('<intensity>')
```
%% Output
Text(0, 0.5, '<intensity>')
%% Cell type:code id:369b3289 tags:
``` python
```
......@@ -18,6 +18,7 @@ unreleased
- update version GATT-related mnemonics, add `transmission_col2` :mr:`172`
- reorganize the Howto section :mr:`169`
- improve SLURM scripts with named arguments :mr:`176`
- adds notebook for DSSC fine timing analysis
- **New Features**
- add routine for fluence calibration :mr:`180`
......
......@@ -79,6 +79,14 @@ hexagonal pixel shape information from the DSSC geometry to split
the intensity in a pixel in the bins covered by it. An example notebook
:doc:`Azimuthal integration of DSSC with pyFAI <Azimuthal integration of DSSC with pyFAI>` is available.
DSSC fine timing
################
When DSSC is reused after a period of inactivity or when the DSSC gain setting
use a different operation frequency the DSSC fine trigger delay needs to be
checked. To analysis runs recorded with different fine delay, one can use
the notebook :doc:`DSSC fine delay with SCS toolbox.ipynb <DSSC fine delay with SCS toolbox>`.
Legacy DSSC binning procedure
#############################
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment