Changeset 4588 for trunk/GSASIIstrIO.py


Ignore:
Timestamp:
Oct 11, 2020 12:07:42 PM (13 months ago)
Author:
toby
Message:

use G2VarObj for param limits; add more info to seq. ref. done dialog; show Frozen in show LS parameters

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIstrIO.py

    r4534 r4588  
    658658    :param dict RigidBodies: dictionary of rigid bodies
    659659    :param dict CovData: dictionary of refined variables, varyList, & covariance matrix
    660     :param list parmFrozenList: list of parameters that are frozen due to limits
    661     :param bool makeBack: True if new backup of .gpx file is to be made; else use the last one made
    662 
     660    :param list parmFrozenList: list of parameters (as str) that are frozen
     661      due to limits; converted to :class:`GSASIIobj.G2VarObj` objects.
     662    :param bool makeBack: True if new backup of .gpx file is to be made; else
     663      use the last one made
    663664    '''
    664665                       
     
    689690            if 'parmFrozen' not in Controls:
    690691                Controls['parmFrozen'] = {}
    691             Controls['parmFrozen']['FrozenList'] = parmFrozenList
     692            Controls['parmFrozen']['FrozenList'] = [G2obj.G2VarObj(i) for i in parmFrozenList]
    692693        try:
    693694            histogram = Histograms[datum[0]]
     
    772773    :param dict CovData: dictionary of refined variables, varyList, & covariance matrix
    773774    :param dict parmFrozen: dict with frozen parameters for all phases
     775      and histograms (specified as str values)
    774776    '''
    775777                       
     
    852854    name,CovData = cPickleLoad(fp)[0] # 2nd block in file should be Covariance
    853855    name,RigidBodies = cPickleLoad(fp)[0] # 3rd block in file should be Rigid Bodies
    854     name,parmFrozen = cPickleLoad(fp)[0] # 4th block in file should be frozen parameters
     856    name,parmFrozenDict = cPickleLoad(fp)[0] # 4th block in file should be frozen parameters
    855857    fp.close()
    856858    GPXhist = os.path.splitext(GPXfile)[0]+'.seqHist'
     
    887889            Controls = data[0][1]
    888890            Controls['Copy2Next'] = False
    889             Controls['parmFrozen'] = parmFrozen
     891            for key in parmFrozenDict:
     892                Controls['parmFrozen'][key] = [
     893                    i if type(i) is G2obj.G2VarObj
     894                    else G2obj.G2VarObj(i)
     895                    for i in parmFrozenDict[key]]
    890896        elif datum[0] in histIndex:
    891897            hist.seek(histIndex[datum[0]])
     
    930936    pFile.write(80*'*'+'\n')
    931937
    932 def ShowControls(Controls,pFile=None,SeqRef=False):
     938def ShowControls(Controls,pFile=None,SeqRef=False,preFrozenCount=0):
    933939    'Print controls information'
    934940    pFile.write(' Least squares controls:\n')
     
    944950        pFile.write(' Copy of histogram results to next: %s\n'%(Controls['Copy2Next']))
    945951        pFile.write(' Process histograms in reverse order: %s\n'%(Controls['Reverse Seq']))
     952    if preFrozenCount:
     953        pFile.write('\n Starting refinement with {} Frozen variables\n\n'.format(preFrozenCount))
    946954   
    947955def GetPawleyConstr(SGLaue,PawleyRef,im,pawleyVary):
Note: See TracChangeset for help on using the changeset viewer.