Closed DSimonne closed 2 months ago
@DSimonne If you want to generate two theta vs intensity numpy arrays using hexrd, you can do something like the following:
HEDMInstrument
using your calibrated yaml fileThen you would do something like this:
from hexrd.projections.polar import PolarView
# instrument is the HEDMInstrument
# image_dict is the images dict
tth_min = 0
tth_max = 20
pv = PolarView((tth_min, tth_max), instrument, eta_min=0, eta_max=360, pixel_size=(0.1, 0.25))
img = pv.warp_image(image_dict, pad_with_nans=False, do_interpolation=True)
# Now sum along valid pixels to create the intensity array
intensities = np.nansum(img, axis=0) / np.sum(~np.isnan(img), axis=0)
@psavery can I mark this as complete?
Yes, thank you!
Hello,
I would like to use the instrument calibration file that I have created with
hexrdgui
to then properly extract 2theta vs intensity numpy arrays from my powder measurements.I have many experimental files and going through the GUI to extract them as h5 one by one while correcting for the calibration is slightly time consuming.
Below is then the script I use to load the
.h5
files in Jupyter.Thank you!!