Changeset 4072


Ignore:
Timestamp:
Jul 26, 2019 8:37:07 AM (2 years ago)
Author:
vondreele
Message:

fix a missing G2frame.PickId? problem in G2imgGUI
fix SAS plotting issues with background subtraction
fix SAS errors in Spheroid, Schulz & Gauss models
fix of fxye export for TOF data

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIimgGUI.py

    r4034 r4072  
    368368        finally:
    369369            dlg.Destroy()
    370             G2frame.GPXtree.SelectItem(G2frame.PickId)
     370            if G2frame.PickId: G2frame.GPXtree.SelectItem(G2frame.PickId)
    371371           
    372372    def OnCopySelected(event):
  • trunk/GSASIIplot.py

    r4070 r4072  
    18441844            Page.plotStyle['WgtDiagnostic'] = not Page.plotStyle.get('WgtDiagnostic',False)
    18451845            newPlot = True
    1846         elif event.key == 'b':
     1846        elif event.key == 'b' and plottype not in ['SASD','REFD']:
    18471847            G2frame.SubBack = not G2frame.SubBack
    1848 #            if not G2frame.SubBack:
    1849 #                G2frame.SinglePlot = True               
    18501848        elif event.key == 'n':
    18511849            if G2frame.Contour:
  • trunk/GSASIIsasd.py

    r3136 r4072  
    9191    else:
    9292        cth = np.linspace(0,1.,NP)
    93         Rct = R[:,np.newaxis]*np.sqrt(1.+(AR**2-1.)*cth**2)
     93        try:
     94            Rct = R[:,np.newaxis]*np.sqrt(1.+(AR**2-1.)*cth**2)
     95        except:
     96            Rct = R*np.sqrt(1.+(AR**2-1.)*cth**2)
    9497        return np.sqrt(np.sum(SphereFF(Q[:,np.newaxis],Rct,0)**2,axis=2)/NP)
    9598           
     
    14031406        pos = distDict['Mean']
    14041407        args = [distDict['StdDev']]
    1405         step = 0.02*distDict['StdDev']
    14061408        mode = distDict['Mean']
    1407         minX = np.fmax([mode-4.*distDict['StdDev'],1.])
    1408         maxX = np.fmin([mode+4.*distDict['StdDev'],1.e5])
     1409        minX = np.max([mode-4.*distDict['StdDev'],1.])
     1410        maxX = np.min([mode+4.*distDict['StdDev'],1.e5])
    14091411    elif 'LSW' in DistName:
    14101412        distFxn = 'LSWDist'
     
    14181420        pos = distDict['Mean']
    14191421        args = [distDict['StdDev']]
    1420         minX = np.fmax([1.,pos-4.*distDict['StdDev']])
    1421         maxX = np.fmin([pos+4.*distDict['StdDev'],1.e5])
     1422        minX = np.max([1.,pos-4.*distDict['StdDev']])
     1423        maxX = np.min([pos+4.*distDict['StdDev'],1.e5])
    14221424    nP = 500
    14231425    Diam = np.logspace(0.,5.,nP,True)
  • trunk/exports/G2export_pwdr.py

    r4071 r4072  
    7272        self.Write(TreeName[5:])
    7373        if prmname: self.Write('Instrument parameter file:'+os.path.split(prmname)[1])
    74         x = 100*np.array(histblk['Data'][0])
     74        x = np.array(histblk['Data'][0])
     75        if 'C' in histblk['Instrument Parameters'][0]['Type'][0]:
     76            x *= 100.
     77        else:
     78            cw = np.diff(x)
     79            x[:-1] += cw
    7580        # convert weights to sigmas; use largest weight as minimum esd
    7681        s = np.sqrt(np.maximum(0.,np.array(histblk['Data'][2])))
Note: See TracChangeset for help on using the changeset viewer.