Closed CJ-Wright closed 9 months ago
On Tue, 23 Jun 2015 15:13:06 -0700 "Christopher J. Wright" notifications@github.com wrote:
Would it be possible to have a function which we could call to produce the calibration configuration dictionary (the key word arguments for pyFAI.geometry.Geometry)? My hope is that the signature would look like this:
geometry_keywords = magic_calibration_function( img, ring_positions, d_spacings, detector, mask, initial_guess_dictionary)
There is a calibration function which almost does what you are looking for:
def calib(img, calibrant, detector, basename="from_ipython", reconstruct=False, dist=0.1, gaussian=None, interactive=True): """ Procedural interfact for calibration
@param img: 2d array representing the calibration image
@param calibrant: Instance of Calibrant, set-up with wavelength
@param detector: Detector instance containing the mask
@param basename: output file base
@param recontruct: perform image reconstruction of masked pixel ?
@param dist: initial distance
@param gaussian: width of the gaussian used for difference of gaussian in the "massif" peak-picking algorithm
@param interactive: set to False for testing
@retrun: azimuthal integrator object
"""
You would like to inject in addition the control points ? it looks like the biggest difference. And it should not be too complicated (actually the signature of this function is not yet fixed).
Cheers,
Yes, @tacaswell has a nice way for finding/tracking the diffraction rings automatically.
First of all, I would like to appologise, I confused you with Jon (also Wright)
Yes, @tacaswell has a nice way for finding/tracking the diffraction rings automatically.
Are you refering to the correlation of a debye-scherrer ring diffraction image with itself flipped H-V and R-L to get the vertical and horizontal center position ?
That is the first naive approach. I have some quasi-vaporware ideas based on extending my graduate work for finding interference fringes, but have not done anything with that yet.
On Wed, 24 Jun 2015 14:33:25 -0700 Thomas A Caswell notifications@github.com wrote:
That is the first naive approach. I have some quasi-vaporware ideas based on extending my graduate work for finding interference fringes, but have not done anything with that yet.
Hi Thomas,
I don't know where you are now, but we are able to calibrate really obfuscated setups like this one: http://journals.iucr.org/j/issues/2015/02/00/fv5028/fv5028fig2thm.gif
But me neither, I am not yet happy with have. I am thinking on a Ridge&Valley reconstruction based on a watershed like technique ... Cheers,
Jerome.
PS: we have 3 positions opened on data-analysis, if you wish to visit the French alps :)
Out of curiosity, did the above function ever get written? It would be very helpful for doing in python data processing. Would it be possible to have the option of providing the control points? If not given run though the full GUI?
A bit late ... but I guess this class does what you are looking for: http://www.silx.org/doc/pyFAI/dev/api/pyFAI.html#pyFAI.goniometer.SingleGeometry
It is intensively used in goniometer calibration, there are several tutorials available on them.
Would it be possible to have a function which we could call to produce the calibration configuration dictionary (the key word arguments for pyFAI.geometry.Geometry)? My hope is that the signature would look like this:
My hope is that this would eliminate as much user involvement and file IO as possible, as the peaks will have already been found, and all the file IO will be accomplished before or after calling this function. Thank you very much!