Online Data Processing at ID24#
Temperature scans#
XAS scans can include temperature measurement. To plot the XAS signal together with the temperature and diagnostic plots in Flint, you need an Id24TemperaturePlotter object. It is best to instantiate this object in the Bliss session setup script but you could also do it in the terminal
DEMO_SESSION [1]: from blissoda.id24.temperature_plotter import Id24TemperaturePlotter
DEMO_SESSION [2]: temperature_plotter = Id24TemperaturePlotter()
The persistent parametrization saved in Redis can be shown like this
DEMO_SESSION [3]: temperature_plotter
Out [3]:
Workflows:
workflow '.../blissoda/resources/id24/id24_planck_plot.json'
workflow_with_fit '.../blissoda/resources/id24/id24_planck_fitplot.json'
xas_workflow '.../blissoda/resources/id24/id24_xas_planck_plot.json'
xas_workflow_with_fit '.../blissoda/resources/id24/id24_xas_planck_fitplot.json'
Xas:
energy_name 'energy_enc'
mu_name 'mu_trans'
Plot:
extend_plotrange_left -15 (nm)
extend_plotrange_right 50 (nm)
two_color_difference 42 (nm)
dpi 150
Fit:
refit False
wavelength_min None (nm)
wavelength_max None (nm)
Status:
Enabled False
Fitting False
Plotting tasks 0
Currently the only parameter is the Ewoks workflow that will generate the plots.
For example: enable automatic plotting for XAS temperature scans, do an XAS scan and disable it again
DEMO_SESSION [4]: temperature_plotter.enable()
DEMO_SESSION [5]: scan = ascan(...) # are whatever the scan command is
DEMO_SESSION [6]: temperature_plotter.disable()
To trigger the Ewoks workflow manually
DEMO_SESSION [7]: temperature_plotter.trigger_workflow_for_scan(scan)
Or if you do not have the scan object
DEMO_SESSION [8]: temperature_plotter.trigger_workflow(39, filename="LTC13_Fe_g1_LTC13_LH1.h5")
The filename can be an absolute path as well. If the filename is not provided it is the currently active Bliss dataset file by default.
To trigger the workflow outside Bliss
conda activate ewoks
ewoks execute .../blissoda/resources/id24/temperature.json \
-p filename=/.../RAW_DATA/LTC13_Fe_g1/LTC13_Fe_g1_LTC13_LH1/LTC13_Fe_g1_LTC13_LH1.h5 \
-p scan_number=39 \
-p output_directory=/tmp/results
The output_directory will contain .png images with the XAS and temperature plots.