-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Labels
enhancementNew feature or requestNew feature or request
Description
The beam center recorded in SST1 metadata is a decent starting place, but I find refinement is often necessary. I've found that simply minimizing the variance of I(chi) over some q slice is a pretty robust method and doesn't require having sharp peaks. The downside is it's fairly slow, calling integrate_radial. I know @pbeaucage has tinkered around with this problem, and I'm curious if anyone else has. Below is the function that I minimize with scipy.optimize.minimize
def func2(x, image, q_min, q_max, chi_min, chi_max, integrator):
poni1, poni2, rot1, rot2 = x
integrator.poni1 = poni1
integrator.poni2 = poni2
integrator.rot1 = rot1
integrator.rot2 = rot2
image_chi, image_int = integrator.integrate_radial(image, 150, radial_range=(q_min, q_max), azimuth_range=(chi_min, chi_max))
return np.var(image_int[image_int != 0 ])
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request