Changeset 407 for trunk/GSASIIstruct.py


Ignore:
Timestamp:
Nov 5, 2011 5:30:24 PM (10 years ago)
Author:
vondreele
Message:

constraints round 2

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIstruct.py

    r406 r407  
    6363    print ' Minimum delta-M/M for convergence: ','%.2g'%(Controls['min dM/M'])
    6464    print ' Initial shift factor: ','%.3f'%(Controls['shift factor'])
     65   
     66def GetConstraints(GPXfile):
     67    constrList = []
     68    file = open(GPXfile,'rb')
     69    while True:
     70        try:
     71            data = cPickle.load(file)
     72        except EOFError:
     73            break
     74        datum = data[0]
     75        if datum[0] == 'Constraints':
     76            constDict = datum[1]
     77            for item in constDict:
     78                constrList += constDict[item]
     79    file.close()
     80    return constrList
    6581   
    6682def GetPhaseNames(GPXfile):
     
    23482364    Controls = GetControls(GPXfile)
    23492365    ShowControls(Controls)           
     2366    constrList = GetConstraints(GPXfile)
    23502367    Histograms,Phases = GetUsedHistogramsAndPhases(GPXfile)
    23512368    if not Phases:
     
    23692386    parmDict.update(histDict)
    23702387    GetFprime(calcControls,Histograms)
     2388    for item in constrList: print item
    23712389    constrDict,constrFlag,fixedList = G2mv.InputParse([])        #constraints go here?
    23722390    groups,parmlist = G2mv.GroupConstraints(constrDict)
     
    24562474    Controls = GetControls(GPXfile)
    24572475    ShowControls(Controls)           
     2476    constrList = GetConstraints(GPXfile)
    24582477    Histograms,Phases = GetUsedHistogramsAndPhases(GPXfile)
    24592478    if not Phases:
Note: See TracChangeset for help on using the changeset viewer.