Changeset 1241


Ignore:
Timestamp:
Mar 8, 2014 11:19:45 AM (8 years ago)
Author:
vondreele
Message:

copy next now allows reverse & skipped histograms

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIstrMain.py

    r1240 r1241  
    105105                        del(varyList[ipvt-1])
    106106                        break
     107        G2stMth.GetFobsSq(Histograms,Phases,parmDict,calcControls)
    107108    return Rvals,result,covMatrix,sig
    108 
    109 
    110109
    111110def Refine(GPXfile,dlg):
     
    177176        rigidbodyDict,parmDict,varyList,calcControls,pawleyLookup,ifPrint,printFile,dlg)
    178177       
    179     G2stMth.GetFobsSq(Histograms,Phases,parmDict,calcControls)
    180178    sigDict = dict(zip(varyList,sig))
    181179    newCellDict = G2stMth.GetNewCellParms(parmDict,varyList)
     
    349347            rigidbodyDict,parmDict,varyList,calcControls,pawleyLookup,ifPrint,printFile,dlg)
    350348           
    351         G2stMth.GetFobsSq(Histo,Phases,parmDict,calcControls)
    352349        sigDict = dict(zip(varyList,sig))
    353350        newCellDict = copy.deepcopy(G2stMth.GetNewCellParms(parmDict,varyList))
     
    367364        NewparmDict = {}
    368365        if Controls['Copy2Next']:
    369             for parm in parmDict:
    370                 items = parm.split(':',2)
    371                 if str(ihst) in items[1] and parm in varyList:
    372                     items[1] = str(ihst+1)  #not correct! needs to point to next (or prev) histogram
    373                     newparm = ':'.join(items)
    374                     NewparmDict[newparm] = parmDict[parm]
     366            hId = Histo[histogram]['hId']
     367            try:
     368                nexthId = Histograms[histNames[ihst+1]]['hId']
     369                for parm in parmDict:
     370                    items = parm.split(':',2)
     371                    if str(hId) in items[1] and parm in varyList:
     372                        items[1] = str(nexthId)
     373                        newparm = ':'.join(items)
     374                        NewparmDict[newparm] = parmDict[parm]
     375            except IndexError:
     376                pass
    375377    G2stIO.SetSeqResult(GPXfile,Histograms,SeqResult)
    376378    printFile.close()
Note: See TracChangeset for help on using the changeset viewer.