| Home | Trees | Indices | Help |
|
|---|
|
|
PdfFit sandbox for importing pdffit2 scripts.
Data members:
_fits -- list of Fitting instances
_curphase -- 0 based index of selected phase
_curdataset -- 0 based index of selected datased
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
_atomselect =
|
|||
_FCON =
|
|||
_Sctp =
|
|||
_dataset_vars =
|
|||
|
|||
Get resulting list of Fitting and Calculations
|
Create sandbox dictionary suitable for script evaluation returns sandbox dictionary |
Execute scriptfile in this sandbox. Before it is executed, change to script directory and shadow pdffit and pdffit2 modules scriptfile -- path to the script to be loaded |
Read structure from file into memory.
filename -- name of file from which to read structure
Raises:
pdffit2.calculationError when a lattice cannot be created from the
given structure
pdffit2.structureError when a structure file is malformed
IOError when the file cannot be read from the disk
|
Read structure from a string into memory.
s -- string containing the contents of the structure file
name -- tag with which to label structure
Raises:
pdffit2.calculationError when a lattice cannot be created from the
given structure
pdffit2.structureError when a structure file is malformed
|
Read pdf data from file into memory.
filename -- name of file from which to read data
stype -- 'X' (xray) or 'N' (neutron)
qmax -- maximum q value
qdamp -- instrumental q-resolution factor
Raises:
IOError when the file cannot be read from disk
|
Read pdf data from a string into memory. s -- string containing the contents of the data file stype -- 'X' (xray) or 'N' (neutron) qmax -- maximum q value qdamp -- instrumental q-resolution factor name -- tag with which to label data |
Read pdf data into memory from lists.
All lists must be of the same length.
stype -- 'X' (xray) or 'N' (neutron)
qmax -- maximum q value
qdamp -- instrumental q-resolution factor
r_data -- list of r-values
Gr_data -- list of G(r) values
dGr_data -- list of G(r) uncertainty values
name -- tag with which to label data
Raises:
NotImplementedError
|
Set the range of the fit in specified dataset. iset -- data set to consider, indexed from 1 or 'ALL' rmin -- minimum r-value of fit rmax -- maximum r-value of fit |
Allocate space for a PDF calculation. The structure from which to calculate the PDF must first be imported with the read_struct() or read_struct_string() method. stype -- 'X' (xray) or 'N' (neutron) qmax -- maximum q value qdamp -- instrumental q-resolution factor rmin -- minimum r-value of calculation rmax -- maximum r-value of calculation rlen -- number of data points in calculation |
Calculate the PDF of the imported structure.
Space for the calculation must first be allocated with the alloc()
method.
Raises:
ControlRuntimeError when space for calculation has not been
allocated
|
Fit the theory to the imported data. toler -- tolerance of the fit, ignored for now |
Run a single step of the fit.
toler -- tolerance of the fit
Raises:
NotImplementedError - I am not importing such beast
|
Save calculated or fitted PDF to file. Ignored.
|
Save calculated or fitted PDF to string.
iset -- data set to save, indexed from 1
Raises:
NotImplementedError - we cannot return anything without engine.
|
Save data and fitted PDF difference to file. Ignored. iset -- data set to save fname -- file to write to |
Save data and fitted PDF difference to string.
iset -- data set to save
Raises:
NotImplementedError - we cannot return anything without engine.
|
Save fit-specific data to file. Ignored.
|
save_res_string() --> Save fit-specific data to a string.
Raises:
NotImplementedError - we cannot return anything without engine.
|
Save structure resulting from fit to file. Ignored. ip -- phase to save |
Save structure resulting from fit to string.
ip -- phase to save
Raises:
NotImplementedError - we cannot return anything without engine.
|
Print structure resulting from fit. Ignored. ip -- phase to display |
Constrain a variable to a parameter.
A variable can be constrained to a number or equation string.
var -- variable to constrain, such as x(1)
par -- parameter which to constrain the variable. This can be
an integer or an equation string containing a reference
to another parameter. Equation strings use standard c++
syntax. The value of a constrained parameter is accessed
as @p in an equation string, where p is the parameter.
e.g.
>>> constrain(x(1), 1)
>>> constrain(x(2), "0.5+@1")
fcon -- 'IDENT', 'FCOMP', or 'FSQR', old-style constraint formulas:
'IDENT' @par
'FCOMP' 1.0-@par
'FSQR' @par*@par
|
Set value of constrained parameter.
idx -- parameter index
val -- Either a numerical value or a reference to variable
Raises:
KeyError when parameter is yet to be constrained
|
Get value of parameter.
idx -- parameter index
Raises:
KeyError if parameter does not exists
|
Fix a parameter.
idx -- parameter index
Fixed parameters are not fitted in a refinement. Passed parameter can be
'ALL', in which case all parameters are fixed.
Raises:
ControlKeyError if parameter does not exists
|
Free a parameter.
idx -- parameter index
Freed parameters are fitted in a refinement. Passed parameter can be
ALL, in which case all parameters are freed.
Raises:
ControlKeyError if parameter does not exists
|
Set the value of a variable.
Raises:
ControlKeyError if variable does not yet exist
|
Get stored value of a variable.
Raises:
ControlKeyError if variable index does not exist
returns value of variable var.
|
Get goodness of fit value, rw.
Raises:
NotImplementedError - we cannot return anything without engine.
|
Get r-points used in the fit.
This function should only be called after data has been loaded or
calculated. Before a refinement, the list of r-points will reflect the
data. Afterwords, they will reflect the fit range.
Raises:
NotImplementedError - we cannot return anything without engine.
|
Get fitted PDF.
This function should only be called after a refinement or refinement
step has been done.
Raises:
NotImplementedError - we cannot return anything without engine.
|
Get observed PDF.
This function should only be called after data has been loaded or
calculated. Before a refinement, the list of r-points will reflect the
data. Afterwords, they will reflect the fit range.
Raises:
NotImplementedError - we cannot return anything without engine.
|
Get atoms in the structure.
This function should only be called after a structure has been loaded.
Raises:
NotImplementedError - we cannot return anything without engine.
|
Switch to phase ip.
ip -- phase index starting from 1
All parameters assigned after this method is called refer only to the
current phase.
Raises:
IndexError if phase ip does not exist
|
Set specified dataset in focus.
iset -- dataset index starting from 1
Raises:
IndexError if dataset iset does not exist
|
Associate the current data set with phase ip.
ip -- phase index starting from 1
Raises:
NotImplementedError
|
Unassociate the current data set with phase ip.
ip -- phase index starting from 1
Raises:
NotImplementedError
|
Select atoms for calculating partial PDF
ip -- phase index starting from 1, if set to 'ALL' isel applies
to all phases
i -- atom index starting from 1, if set to 'ALL', select all atoms
Raises:
NotImplementedError
|
Deselect atoms for calculating partial PDF
ip -- phase index starting from 1, if set to 'ALL' isel applies
to all phases
i -- atom index starting from 1, if set to 'ALL', select all atoms
Raises:
NotImplementedError
|
Select atoms for calculating partial PDF
ip -- phase index starting from 1, if set to 'ALL' jsel applies
to all phases
i -- atom index starting from 1, if set to 'ALL', select all atoms
Raises:
NotImplementedError
|
Deselect atoms for calculating partial PDF
ip -- phase index starting from 1, if set to 'ALL' jsel applies
to all phases
i -- atom index starting from 1, if set to 'ALL', select all atoms
Raises:
NotImplementedError
|
bang(ia, ja, ka) --> Get the bond angle defined by atoms ia, ja, ka.
Raises:
NotImplementedError
|
blen(ia, ja) --> Get bond between atoms ia and ja. Ignored. blen(a1, a2, lb, ub) --> Print length of all a1-a2 bonds in range [lb,ub], where a1 and a2 are integers representing atom types. 1 represent the first type of atom in the phase, 2 represents the second type of atom in the structure, an so on. Either a1 or a2 can be the keyword ALL, in which all atom types are used for that end of the calculated bonds. |
Print scattering length for all atoms. Ignored. stype -- 'X' (xray) or 'N' (neutron). |
Get string with scattering length for all atoms.
stype -- 'X' (xray) or 'N' (neutron).
Raises:
NotImplementedError
|
Return scattering factor of given element.
Not supported.
Raises:
NotImplementedError
|
set_scat() --> Change neutron or x-ray scattering factor for given
element. Not supported.
Raises:
NotImplementedError
|
reset_scat() --> reset scattering factor. Not supported.
Raises:
NotImplementedError
|
Get number of atoms in current phase.
Raises:
ControlKeyError if phase does not exists
|
lat(n) --> Get reference to lattice variable n. n can be an integer or a string representing the lattice variable. 1 <==> 'a' 2 <==> 'b' 3 <==> 'c' 4 <==> 'alpha' 5 <==> 'beta' 6 <==> 'gamma' |
u11(i) --> Get reference to U(1,1) for atom i. U is the anisotropic thermal factor tensor. |
u22(i) --> Get reference to U(2,2) for atom i. U is the anisotropic thermal factor tensor. |
u33(i) --> Get reference to U(3,3) for atom i. U is the anisotropic thermal factor tensor. |
u12(i) --> Get reference to U(1,2) for atom i. U is the anisotropic thermal factor tensor. |
u13(i) --> Get reference to U(1,3) for atom i. U is the anisotropic thermal factor tensor. |
u23(i) --> Get reference to U(2,3) for atom i. U is the anisotropic thermal factor tensor. |
pscale() --> Get reference to pscale. pscale is the fraction of the total structure that the current phase represents. |
pfrac() --> Deprecated reference to pscale. pscale is the fraction of the total structure that the current phase represents. |
spdiameter() --> Get reference to spdiameter. Diameter value for the spherical particle PDF correction. Spherical envelope is not applied when spdiameter equals 0. |
stepcut() --> Get reference to stepcut. stepcut is cutoff radius for empirical step-function PDF envelope. Step cutoff is not applied when stepcut equals 0. Non-refineable variable. |
sratio() --> Get reference to sigma ratio. The sigma ratio determines the reduction in the Debye-Waller factor for distances below rcut. |
srat() --> Deprecated reference to sigma ratio. The sigma ratio determines the reduction in the Debye-Waller factor for distances below rcut. |
delta2() --> Get reference to delta2 The phenomenological correlation constant in the Debye-Waller factor. The (1/R^2) peak sharpening factor. |
dscale() --> Get reference to dscale. The data scale factor. |
qsig() --> Deprecated reference to qdamp. instrument q-resolution factor. |
qdamp() --> Get reference to qdamp. instrument q-resolution factor. |
qalp() --> Deprecated reference to qbroad. Quadratic peak sharpening factor. |
qbroad() --> Get reference to qbroad. Quadratic peak sharpening factor. |
rcut() --> Get reference to rcut. rcut is the value of r below which peak sharpening, defined by the sigma ratio (sratio), applies. |
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0beta1 on Fri Apr 10 19:11:01 2009 | http://epydoc.sourceforge.net |