Changeset 3329


Ignore:
Timestamp:
Mar 30, 2018 2:25:41 PM (4 years ago)
Author:
vondreele
Message:

fix 2 integer divide errors in the Omit map routine
fix error detection for missing structure factors for fourier & charge flip routines

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIImath.py

    r3318 r3329  
    30713071    M = np.mgrid[0:4,0:4,0:4]
    30723072    blkIds = np.array(list(zip(M[0].flatten(),M[1].flatten(),M[2].flatten())))
    3073     iBeg = blkIds*rho0.shape/4
    3074     iFin = (blkIds+1)*rho0.shape/4
     3073    iBeg = blkIds*rho0.shape//4
     3074    iFin = (blkIds+1)*rho0.shape//4
    30753075    rho_omit = np.zeros_like(rho0)
    30763076    nBlk = 0
  • trunk/GSASIIphsGUI.py

    r3325 r3329  
    87258725            G2frame.ErrorDialog('Fourier map error','Fourier map type not defined')
    87268726            return
    8727         if not len(reflNames):
     8727        if not reflNames[0]:
    87288728            G2frame.ErrorDialog('Fourier map error','No reflections defined for Fourier map')
    87298729            return
    87308730        phaseName = generalData['Name']
    87318731        ReflData = GetReflData(G2frame,phaseName,reflNames)
    8732         if ReflData == None: return
     8732        if ReflData == None:
     8733            G2frame.ErrorDialog('Fourier map error','No reflections defined for Fourier map')
     8734            return
    87338735        if 'Omit' in mapData['MapType']:
    87348736            dim = '3D '
     
    88238825        flipData = generalData['Flip']
    88248826        reflNames = flipData['RefList']
    8825         if not len(reflNames):
     8827        if not reflNames[0]:
    88268828            G2frame.ErrorDialog('Charge flip error','No reflections defined for charge flipping')
    88278829            return
    88288830        phaseName = generalData['Name']
    88298831        ReflData = GetReflData(G2frame,phaseName,reflNames)
    8830         if ReflData == None: return
     8832        if ReflData == None:
     8833            G2frame.ErrorDialog('Charge flip error','No reflections defined for charge flipping')
     8834            return
    88318835        pgbar = wx.ProgressDialog('Charge flipping','Residual Rcf =',101.0,
    88328836            style = wx.PD_ELAPSED_TIME|wx.PD_AUTO_HIDE|wx.PD_CAN_ABORT)
     
    88598863        flipData = generalData['Flip']
    88608864        reflNames = flipData['RefList']
    8861         if not len(reflNames):
     8865        if not reflNames[0]:
    88628866            G2frame.ErrorDialog('Charge flip error','No reflections defined for charge flipping')
    88638867            return
    88648868        phaseName = generalData['Name']
    88658869        ReflData = GetReflData(G2frame,phaseName,reflNames)
    8866         if ReflData == None: return
     8870        if ReflData == None:
     8871            G2frame.ErrorDialog('Charge flip error','No reflections defined for charge flipping')
     8872            return
    88678873        pgbar = wx.ProgressDialog('Charge flipping','Residual Rcf =',101.0,
    88688874            style = wx.PD_ELAPSED_TIME|wx.PD_AUTO_HIDE|wx.PD_CAN_ABORT)
Note: See TracChangeset for help on using the changeset viewer.