Changeset 5664


Ignore:
Timestamp:
Sep 30, 2023 9:39:55 AM (20 months ago)
Author:
vondreele
Message:

dlg.Update for wxProgress must be int for newest wx - it was np.float64.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified trunk/GSASIIstrMath.py

    r5663 r5664  
    46344634            dMdvh *= Wt
    46354635            if dlg:
    4636                 GoOn = dlg.Update(Histogram['Residuals']['wR'],newmsg='Hessian for histogram %d\nAll data Rw=%8.3f%s'%(hId,Histogram['Residuals']['wR'],'%'))
     4636                GoOn = dlg.Update(int(Histogram['Residuals']['wR']),newmsg='Hessian for histogram %d\nAll data Rw=%8.3f%s'%(hId,Histogram['Residuals']['wR'],'%'))
    46374637                if type(GoOn) is tuple:
    46384638                    if not GoOn[0]:
     
    46634663
    46644664            if dlg:
    4665                 GoOn = dlg.Update(Histogram['Residuals']['wR'],newmsg='Hessian for histogram %d Rw=%8.3f%s'%(hId,Histogram['Residuals']['wR'],'%'))
     4665                GoOn = dlg.Update(int(Histogram['Residuals']['wR']),newmsg='Hessian for histogram %d Rw=%8.3f%s'%(hId,Histogram['Residuals']['wR'],'%'))
    46664666                if type(GoOn) is tuple:
    46674667                    if not GoOn[0]:
     
    47564756            Histogram['Residuals']['wRmin'] = min(100.,100.*ma.sqrt(Histogram['Residuals']['Nobs']/Histogram['Residuals']['sumwYo']))
    47574757            if dlg:
    4758                 GoOn = dlg.Update(Histogram['Residuals']['wR'],newmsg='For histogram %d Rw=%8.3f%s'%(hId,Histogram['Residuals']['wR'],'%'))
     4758                GoOn = dlg.Update(int(Histogram['Residuals']['wR']),newmsg='For histogram %d Rw=%8.3f%s'%(hId,Histogram['Residuals']['wR'],'%'))
    47594759                if type(GoOn) is tuple:
    47604760                    if not GoOn[0]:
     
    49064906            Next += next
    49074907            if dlg:
    4908                 GoOn = dlg.Update(Histogram['Residuals']['wR'],newmsg='For histogram %d Rw=%8.3f%s'%(hId,Histogram['Residuals']['wR'],'%'))
     4908                GoOn = dlg.Update(int(Histogram['Residuals']['wR']),newmsg='For histogram %d Rw=%8.3f%s'%(hId,Histogram['Residuals']['wR'],'%'))
    49094909                if type(GoOn) is tuple:
    49104910                    if not GoOn[0]:
     
    49234923    if dlg:
    49244924        if hasattr(dlg,'SetHistogram'): dlg.SetHistogram(-1,'overall')
    4925         GoOn = dlg.Update(Rw,newmsg='%s%8.3f%s'%('All data Rw =',Rw,'%'))
     4925        GoOn = dlg.Update(int(Rw),newmsg='%s%8.3f%s'%('All data Rw =',Rw,'%'))
    49264926        if type(GoOn) is tuple:
    49274927            if not GoOn[0]:
     
    49444944        Nobs += len(pVals)
    49454945        M = np.concatenate((M,np.sqrt(pWt)*pVals))
    4946         GoOn = dlg.Update(100*pSum/np.sum(M**2),newmsg='Restraints')
     4946        GoOn = dlg.Update(int(100.*pSum/np.sum(M**2)),newmsg='Restraints')
    49474947    Histograms['RestraintSum'] = pSum
    49484948    Histograms['RestraintTerms'] = len(pVals)
Note: See TracChangeset for help on using the changeset viewer.