Changeset 1111


Ignore:
Timestamp:
Oct 16, 2013 3:44:32 PM (10 years ago)
Author:
vondreele
Message:

small change to FF calc in GSASIIstrMath.py
add a bit of doc test to testDeriv.py

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIstrMath.py

    r1110 r1111  
    572572            else:       #'X'
    573573                refDict['FF'][iref] = G2el.getFFvalues(FFtables,SQ)
    574         for i,El in enumerate(Tdata):
    575             FF[i] = refDict['FF'][iref][El]           
     574        FF = [refDict['FF'][iref][El] for El in Tdata]         
    576575        Uniq = np.inner(H,SGMT)
    577576        Phi = np.inner(H,SGT)
     
    628627        dBabdA = np.exp(-parmDict[phfx+'BabU']*SQfactor)
    629628        Bab = parmDict[phfx+'BabA']*dBabdA
    630         for i,El in enumerate(Tdata):           
    631             FF[i] = refDict['FF'][iref][El]           
     629        FF = [refDict['FF'][iref][El] for El in Tdata]         
    632630        Uniq = np.inner(H,SGMT)
    633631        Phi = np.inner(H,SGT)
  • trunk/testDeriv.py

    r1077 r1111  
    1 #testGSASIIstruct.py
     1# -*- coding: utf-8 -*-
     2#testDeriv.py
     3'''
     4Use this to check derivatives used in structure least squares refinement. To use set DEBUG=True
     5in GSASIIstrMain.py (line 22 as of version 1110), run the least squares - one cycle is sufficient.
     6Do the "Save Results"; this will write the file testDeriv.dat in the local directory7.
     7Run this program to see plots of derivatives for all parameters refined in the last least squares.
     8Shown will be numerical derivatives generated over all observations (including penalty terms) and the
     9corresponding analytical ones produced in the least squares. They should match.
     10-----------------------------------------
     11'''
    212
    313import os
     
    126136        Size[1] = max(Size[1],290) + 35
    127137        self.testDerivPanel.SetScrollbars(10,10,Size[0]/10-4,Size[1]/10-1)
    128         print Size
    129138        self.testDerivPanel.SetSize(Size)
    130139
Note: See TracChangeset for help on using the changeset viewer.