ImageD11.transformer | index /sware/exp/fable/standalone/redhate4-a64/lib/python2.5/site-packages/ImageD11/transformer.py

`# ImageD11_v1.1 Software for beamline ID11
# Copyright (C) 2005 - 2008 Jon Wright
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA`

Modules
`` |  |
ImageD11.columnfile logging | math numpy | ImageD11.transform ImageD11.unitcell |

Classes
`` |  | transformer
class transformer
`` | `Handles the algorithmic, fitting and state information for fitting parameters to give experimental calibrations`
| Methods defined here: __init__(self, parfile=None, fltfile=None) `Nothing is passed in ...will need to loadfileparameters and also peaks` addcellpeaks(self, 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(self, col, name) `Return the data` applyargs(self, args) `for use with simplex/gof function, alter parameters` compute_histo(self, colname) `Compute the histogram over twotheta for peaks previous read in Filtering is moved to a separate function` compute_tth_eta(self) `Compute the twotheta and eta for peaks previous read in` compute_tth_histo(self) `Give hardwire access to tth` computegv(self) `Using tth, eta and omega angles, compute x,y,z of spot in reciprocal space` filter_min(self, col, minval) `and filter peaks out falling in bins with less than min_prob` fit(self, tthmin=0, tthmax=180) `Apply simplex to improve fit of obs/calc tth` get_variable_list(self) getaxis(self) `Compute the rotation axis This handles omegasign in a more elegant way` getcols(self) getcolumn(self, name) `Return the data` getvars(self) `decide what is refinable` gof(self, args) `Compute how good is the fit of obs/calc peak positions in tth` loadfileparameters(self, filename) `Read in beam center etc from file` loadfiltered(self, filename) `Read in 3D peaks from peaksearch` savegv(self, filename) `Save g-vectors into a file Use crappy .ass format from previous for now (testing)` saveparameters(self, filename) `Save beam center etc to file` setvars(self, varlist) `set the things to refine` setxyomcols(self, xname, yname, omeganame) tth_entropy(self) `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(self) write_colfile(self, filename) `Save out the column file (all info stored we hope)` write_graindex_gv(self, filename)

Data
`` |  | PARAMETERS = [<ImageD11.parameters.par instance at 0x2a9a2156c8>, <ImageD11.parameters.par instance at 0x2a9a215710>, <ImageD11.parameters.par instance at 0x2a9a215758>, <ImageD11.parameters.par instance at 0x2a9a2157a0>, <ImageD11.parameters.par instance at 0x2a9a2157e8>, <ImageD11.parameters.par instance at 0x2a9a215830>, <ImageD11.parameters.par instance at 0x2a9a215878>, <ImageD11.parameters.par instance at 0x2a9a2158c0>, <ImageD11.parameters.par instance at 0x2a9a215908>, <ImageD11.parameters.par instance at 0x2a9a215950>, <ImageD11.parameters.par instance at 0x2a9a215998>, <ImageD11.parameters.par instance at 0x2a9a2159e0>, <ImageD11.parameters.par instance at 0x2a9a215a28>, <ImageD11.parameters.par instance at 0x2a9a215a70>, <ImageD11.parameters.par instance at 0x2a9a215ab8>, <ImageD11.parameters.par instance at 0x2a9a215b00>, <ImageD11.parameters.par instance at 0x2a9a215b48>, <ImageD11.parameters.par instance at 0x2a9a215b90>, <ImageD11.parameters.par instance at 0x2a9a215bd8>, <ImageD11.parameters.par instance at 0x2a9a215c20>, ...]