Resonant Inelastic X-ray Scattering: Concentration Correction, and Cuts Through the Plane#
[1]:
import matplotlib.pyplot as plt
from daxs.measurements import Rixs
from daxs.sources import Hdf5Source
from daxs.utils import resources
Define the data mappings for the HDF5 file, the filename, and the scan IDs. This example uses scans 4 to 224 to construct the RIXS plane.
[2]:
data_mappings = {
"x": ".1/measurement/hdh_energy",
"y": ".1/instrument/positioners/xes_en",
"signal": ".1/measurement/det_dtc_apd",
"monitor": ".1/measurement/I02",
}
hdf5_filename = resources.getfile("Fe2O3_Ka1Ka2_RIXS.h5")
scan_ids = "4-224"
Create the data source and the measurement object.
[3]:
source = Hdf5Source(hdf5_filename, scan_ids, data_mappings=data_mappings)
measurement = Rixs(source)
Apply the concentration correction using data from scan 225.
[4]:
conc_corr_scan = 225
measurement.concentration_correction(conc_corr_scan)
Plot the RIXS maps, and get the axes objects for further customization.
[5]:
axes = measurement.plot()
ax1, ax2 = axes.flatten()
ax1.set_title("RIXS Maps")
plt.tight_layout()
Optionally, define and plot plane cuts. Here, we create constant incident energy (CIE) cuts at 7.114 keV and 7.115 keV.
[6]:
measurement.cut(mode="CIE", energies=[7.114, 7.115], widths=0.001)
fig, ax = plt.subplots(figsize=(6, 3.7))
for label in measurement.cuts:
x, signal, _ = measurement.cuts[label]
ax.plot(x, signal, label=label)
ax.set_xlabel("Incident energy (keV)")
ax.set_ylabel("Intensity (arb. units)")
ax.set_title("Constant Incident Energy Cuts")
ax.legend()
plt.tight_layout()
plt.show()