ImageD11.transformer module#

class ImageD11.transformer.transformer(parfile=None, fltfile=None)#

Bases: object

Handles the algorithmic, fitting and state information for fitting parameters to give experimental calibrations

addcellpeaks(limit=None)#

Adds unit cell predicted peaks for fitting against Optional arg limit gives highest angle to use

Depends on parameters:

‘cell__a’,’cell__b’,’cell__c’, ‘wavelength’ # in angstrom ‘cell_alpha’,’cell_beta’,’cell_gamma’ # in degrees ‘cell_lattice_[P,A,B,C,I,F,R]’

addcolumn(col, name)#

Return the data

applyargs(args)#

for use with simplex/gof function, alter parameters

compute_histo(colname)#

Compute the histogram over twotheta for peaks previous read in Filtering is moved to a separate function

colname is most-often “tth”

other parameters are set in the parameter object no_bins = number of bins weight_hist_intensities: True or False

False: histogram by number of measured peaks True: weight by peak intensities

compute_tth_eta()#

Compute the twotheta and eta for peaks previous read in

compute_tth_histo()#

Give hardwire access to tth

computegv()#

Using tth, eta and omega angles, compute x,y,z of spot in reciprocal space

filter_min(col, minval)#

and filter peaks out falling in bins with less than min_prob

fit(tthmin=0, tthmax=180)#

Apply simplex to improve fit of obs/calc tth

get_variable_list()#
getaxis()#

Compute the rotation axis This handles omegasign in a more elegant way

getcols()#
getcolumn(name)#

Return the data

getvars()#

decide what is refinable

gof(args)#

Compute how good is the fit of obs/calc peak positions in tth

loadfileparameters(filename, phase_name=None)#

Read in beam center etc from file

loadfiltered(filename)#

Read in 3D peaks from peaksearch

save_tth_his(filename, bins, hist)#

Saves a 2 theta histogram into a file bins and histogram should have been calculated previously

savegv(filename)#

Save g-vectors into a file Use crappy .ascii format from previous for now (testing)

saveparameters(filename)#

Save beam center etc to file

setfiltered(colfile)#

Set self.colfile as colfile

setvars(varlist)#

set the things to refine

setxyomcols(xname, yname, omeganame)#
tth_entropy()#

Compute the entropy of the two theta values … this may depend on the number of tth bins (perhaps?) … to be used for cell parameter free line straightening S = sum -p log p

updateparameters()#
write_colfile(filename)#

Save out the column file (all info stored we hope)

write_graindex_gv(filename)#
write_pyFAI(filename, tthmin=0, tthmax=180)#

Write file for Jerome Kieffer’s pyFAI fitting routine to use and run the refinment…