Changeset 948


Ignore:
Timestamp:
Jun 11, 2013 10:47:27 AM (8 years ago)
Author:
toby
Message:

update/reformat comments

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIImath.py

    r945 r948  
    17361736    Available ones are 'fast', 'cauchy', 'boltzmann'
    17371737
    1738     Parameters
    1739     ----------
    1740     func : callable f(x, *args)
     1738    :param callable func: f(x, \*args)
    17411739        Function to be optimized.
    1742     x0 : ndarray
     1740    :param ndarray x0:
    17431741        Initial guess.
    1744     args : tuple
     1742    :param tuple args:
    17451743        Extra parameters to `func`.
    1746     schedule : base_schedule
     1744    :param base_schedule schedule:
    17471745        Annealing schedule to use (a class).
    1748     full_output : bool
     1746    :param bool full_output:
    17491747        Whether to return optional outputs.
    1750     T0 : float
     1748    :param float T0:
    17511749        Initial Temperature (estimated as 1.2 times the largest
    17521750        cost-function deviation over random points in the range).
    1753     Tf : float
     1751    :param float Tf:
    17541752        Final goal temperature.
    1755     maxeval : int
     1753    :param int maxeval:
    17561754        Maximum function evaluations.
    1757     maxaccept : int
     1755    :param int maxaccept:
    17581756        Maximum changes to accept.
    1759     maxiter : int
     1757    :param int maxiter:
    17601758        Maximum cooling iterations.
    1761     learn_rate : float
     1759    :param float learn_rate:
    17621760        Scale constant for adjusting guesses.
    1763     boltzmann : float
     1761    :param float boltzmann:
    17641762        Boltzmann constant in acceptance test
    17651763        (increase for less stringent test at each temperature).
    1766     feps : float
     1764    :param float feps:
    17671765        Stopping relative error tolerance for the function value in
    17681766        last four coolings.
    1769     quench, m, n : float
     1767    :param float quench,m,n:
    17701768        Parameters to alter fast_sa schedule.
    1771     lower, upper : float or ndarray
     1769    :param float/ndarray lower,upper:
    17721770        Lower and upper bounds on `x`.
    1773     dwell : int
     1771    :param int dwell:
    17741772        The number of times to search the space at each temperature.
    1775     slope : float
     1773    :param float slope:
    17761774        Parameter for log schedule
    17771775
    1778     Returns
    1779     -------
    1780     xmin : ndarray
    1781         Point giving smallest value found.
    1782     Jmin : float
    1783         Minimum value of function found.
    1784     T : float
    1785         Final temperature.
    1786     feval : int
    1787         Number of function evaluations.
    1788     iters : int
    1789         Number of cooling iterations.
    1790     accept : int
    1791         Number of tests accepted.
    1792     retval : int
    1793         Flag indicating stopping condition::
    1794 
    1795                 0 : Points no longer changing
    1796                 1 : Cooled to final temperature
    1797                 2 : Maximum function evaluations
    1798                 3 : Maximum cooling iterations reached
    1799                 4 : Maximum accepted query locations reached
    1800                 5 : Final point not the minimum amongst encountered points
    1801 
    1802     Notes
    1803     -----
     1776    :returns: (xmin, Jmin, T, feval, iters, accept, retval) where
     1777
     1778     * xmin (ndarray): Point giving smallest value found.
     1779     * Jmin (float): Minimum value of function found.
     1780     * T (float): Final temperature.
     1781     * feval (int): Number of function evaluations.
     1782     * iters (int): Number of cooling iterations.
     1783     * accept (int): Number of tests accepted.
     1784     * retval (int): Flag indicating stopping condition:
     1785
     1786              *  0: Points no longer changing
     1787              *  1: Cooled to final temperature
     1788              *  2: Maximum function evaluations
     1789              *  3: Maximum cooling iterations reached
     1790              *  4: Maximum accepted query locations reached
     1791              *  5: Final point not the minimum amongst encountered points
     1792
     1793    *Notes*:
    18041794    Simulated annealing is a random algorithm which uses no derivative
    18051795    information from the function being optimized. In practice it has
  • trunk/GSASIIobj.py

    r946 r948  
    268268            of centers. Will always have at least one row:
    269269            ``np.array([[0, 0, 0]])``
    270 SGOps       symmetry operations as a list in form
    271             [[M1,T1],[M2,T2,...] where Mn is a 3x3 np.array
    272             and T is a length 3 np.array.
     270SGOps       symmetry operations as a list of form
     271            ``[[M1,T1], [M2,T2],...]``
     272            where :math:`M_n` is a 3x3 np.array
     273            and :math:`T_n` is a length 3 np.array.
    273274            Atom coordinates are transformed where the
    274             Asymmetric unit coordinates [X=(x,y,z)] are
    275             transformed using ``M*X+T ==> X'``
     275            Asymmetric unit coordinates [X is (x,y,z)]
     276            are transformed using
     277            :math:`X\prime = M_n*X+T_n`
    276278SGSys       symmetry unit cell: type one of
    277279            'triclinic', 'monoclinic', 'orthorhombic',
Note: See TracChangeset for help on using the changeset viewer.