Changeset 2627 for trunk/GSASIIimage.py


Ignore:
Timestamp:
Jan 12, 2017 1:22:19 PM (5 years ago)
Author:
vondreele
Message:

remove progress bar stuff from image Integrate
put progress bar around integrate all
put wx.BusyCursor? around individual integrations & autointegrate

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIimage.py

    r2620 r2627  
    862862    return tax,tay,taz,tad,tabs
    863863   
    864 def ImageIntegrate(image,data,masks,blkSize=128,dlg=None,returnN=False):
     864def ImageIntegrate(image,data,masks,blkSize=128,returnN=False):
    865865    'Integrate an image; called from OnIntegrateAll and OnIntegrate in G2imgGUI'    #for q, log(q) bins need data['binType']
    866866    import histogram2d as h2d
     
    890890    tbeg = time.time()
    891891    Nup = 0
    892     if dlg:
    893         dlg.Update(Nup)
    894892    times = [0,0,0,0,0]
    895893    for iBlk in range(nYBlks):
     
    902900            TA,tam = Make2ThetaAzimuthMap(data,masks,(iBeg,iFin),(jBeg,jFin),times)           #2-theta & azimuth arrays & create position mask
    903901            Nup += 1
    904 #            if dlg and jBlk == 0:                    #update progress bar on each row
    905 #                pause = dlg.Update(Nup)
    906 #                if not pause[0]: CancelPressed = True
    907902            Block = image[iBeg:iFin,jBeg:jFin]
    908903            t0 = time.time()
     
    911906            times[2] += time.time()-t0
    912907            Nup += 1
    913 #            if dlg and jBlk == 0:                    #update progress bar on each row
    914 #                pause = dlg.Update(Nup)
    915 #                if not pause[0]: CancelPressed = True
    916908            tax = np.where(tax > LRazm[1],tax-360.,tax)                 #put azm inside limits if possible
    917909            tax = np.where(tax < LRazm[0],tax+360.,tax)
     
    934926            Nup += 1
    935927            del tax; del tay; del taz; del tad; del tabs
    936             if dlg and jBlk == 0:                    #update progress bar on each row
    937                 pause = dlg.Update(Nup)
    938                 if not pause[0]: CancelPressed = True
    939928    t0 = time.time()
    940929    NST = np.array(NST,dtype=np.float)
     
    959948        H0 /= np.array([G2pwd.Polarization(data['PolaVal'][0],H2[:-1],Azm=azm-90.)[0] for azm in (H1[:-1]+np.diff(H1)/2.)])
    960949    Nup += 1
    961     if dlg:
    962         pause = dlg.Update(Nup)
    963         if not pause[0]: CancelPressed = True
    964950    times[4] += time.time()-t0
    965951    print 'Step times: \n apply masks  %8.3fs xy->th,azm   %8.3fs fill map     %8.3fs \
Note: See TracChangeset for help on using the changeset viewer.