Changeset 4531


Ignore:
Timestamp:
Jul 21, 2020 12:41:16 PM (3 years ago)
Author:
vondreele
Message:

remove q-plot & d-plot options for Limits PWDR plot
some cleanup in mag inncom. sf cal

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIdataGUI.py

    r4525 r4531  
    48554855                    if Phase['Histograms'][hist]['Use'] and phase not in Phases:
    48564856                        Phases[phase] = Phase
    4857                     if hist not in Histograms and Phase['Histograms'][hist]['Use']:
     4857                    if (hist not in Histograms) and Phase['Histograms'][hist]['Use']:
    48584858                        if hist not in histIdList:
    48594859                            if badnum == 0:
     
    86788678        data = G2frame.GPXtree.GetItemPyData(item)
    86798679        G2pdG.UpdateLimitsGrid(G2frame,data,datatype)
    8680         G2plt.PlotPatterns(G2frame,plotType=datatype)
     8680        G2plt.PlotPatterns(G2frame,plotType=datatype,newPlot=True)
    86818681    elif G2frame.GPXtree.GetItemText(item) == 'Instrument Parameters':
    86828682        G2frame.PatternId = G2frame.GPXtree.GetItemParent(item)
  • trunk/GSASIIlattice.py

    r4519 r4531  
    854854    def func(d,pos,Inst):       
    855855        return (pos-Inst['difA'][1]*d**2-Inst['Zero'][1]-Inst['difB'][1]/d)/Inst['difC'][1]
    856     dsp0 = np.ones_like(Pos)
     856    dsp0 = Pos/Inst['difC'][1]
    857857    N = 0
    858858    while True:      #successive approximations
  • trunk/GSASIIplot.py

    r4530 r4531  
    18581858            wx.CallAfter(G2gd.UpdatePWHKPlot,G2frame,plottype,G2frame.PatternId)
    18591859            return
    1860         elif event.key == 'q':
     1860        elif event.key == 'q' and not ifLimits:
    18611861            newPlot = True
    18621862            if 'PWDR' in plottype:
     
    18671867            elif plottype in ['SASD','REFD']:
    18681868                Page.plotStyle['sqPlot'] = not Page.plotStyle['sqPlot']
    1869         elif event.key == 't' and 'PWDR' in plottype:
     1869        elif event.key == 't' and 'PWDR' in plottype and not ifLimits:
    18701870            if G2frame.Contour:
    18711871                G2frame.TforYaxis = not G2frame.TforYaxis
     
    27332733    Page.tickDict = {}
    27342734    DifLine = ['']
     2735    PickId = G2frame.PickId
     2736    PatternId = G2frame.PatternId
     2737    ifLimits = False
     2738    if G2frame.GPXtree.GetItemText(PickId) == 'Limits':
     2739        ifLimits = True
     2740        Page.plotStyle['qPlot'] = False
     2741        Page.plotStyle['dPlot'] = False
    27352742    if G2frame.Contour:
    27362743        Page.Choice = (' key press','b: toggle subtract background',
     
    27492756            else:
    27502757                Page.Choice += ['o: add obs, calc,... to legend',]
    2751             Page.Choice += ['q: toggle q plot','s: toggle sqrt plot',
    2752                 't: toggle d-spacing plot','w: toggle (Io-Ic)/sig plot',
    2753                 '+: no selection']
     2758            if ifLimits:
     2759                Page.Choice += ['s: toggle sqrt plot','w: toggle (Io-Ic)/sig plot',
     2760                    '+: no selection']
     2761            else:
     2762                Page.Choice += ['q: toggle q plot','s: toggle sqrt plot',
     2763                    't: toggle d-spacing plot','w: toggle (Io-Ic)/sig plot',
     2764                    '+: no selection']
    27542765            if Page.plotStyle['sqrtPlot'] or Page.plotStyle['logPlot']:
    27552766                del Page.Choice[1]
     
    27792790    G2frame.cid = None
    27802791    Page.keyPress = OnPlotKeyPress   
    2781     PickId = G2frame.PickId
    2782     PatternId = G2frame.PatternId
    27832792    try:
    27842793        colors = GSASIIpath.GetConfigValue('Plot_Colors').split()
     
    28672876    if G2frame.SubBack:
    28682877        Title += ' - background'
    2869     if Page.plotStyle['qPlot'] or plottype in ['SASD','REFD'] and not G2frame.Contour:
     2878    if Page.plotStyle['qPlot'] or plottype in ['SASD','REFD'] and not G2frame.Contour and not ifLimits:
    28702879        xLabel = r'$Q, \AA^{-1}$'
    2871     elif Page.plotStyle['dPlot'] and 'PWDR' in plottype and not G2frame.Contour:
     2880    elif Page.plotStyle['dPlot'] and 'PWDR' in plottype and not G2frame.Contour and not ifLimits:
    28722881        xLabel = r'$d, \AA$'
    28732882    else:
     
    29432952            if not G2frame.Contour:
    29442953                xye0 = ma.masked_outside(xye[0],limits[1][0],limits[1][1],copy=False)            #now mask for limits
    2945         if Page.plotStyle['qPlot'] and 'PWDR' in plottype:
     2954        if Page.plotStyle['qPlot'] and 'PWDR' in plottype and not ifLimits:
    29462955            X = 2.*np.pi/G2lat.Pos2dsp(Parms,xye0)
    2947         elif Page.plotStyle['dPlot'] and 'PWDR' in plottype:
     2956        elif Page.plotStyle['dPlot'] and 'PWDR' in plottype and not ifLimits:
    29482957            X = G2lat.Pos2dsp(Parms,xye0)
    29492958        else:
     
    30293038            limits = np.array(G2frame.GPXtree.GetItemPyData(LimitId))
    30303039            lims = limits[1]
    3031             if Page.plotStyle['qPlot'] and 'PWDR' in plottype:
     3040            if Page.plotStyle['qPlot'] and 'PWDR' in plottype and not ifLimits:
    30323041                lims = 2.*np.pi/G2lat.Pos2dsp(Parms,lims)
    3033             elif Page.plotStyle['dPlot'] and 'PWDR' in plottype:
     3042            elif Page.plotStyle['dPlot'] and 'PWDR' in plottype and not ifLimits:
    30343043                lims = G2lat.Pos2dsp(Parms,lims)
    30353044            Lines.append(Plot.axvline(lims[0],color='g',dashes=(5,5),picker=3.))   
     
    36263635                datnum += 1
    36273636                fp.write("@type xy\n")
     3637#                fp.write("-1 -1\n".format(x,y))
    36283638                fp.write("-1 -1\n")
    3629                 fp.write("&\n")
    36303639                fp.write(linedef1.format(
    36313640                    "s"+str(datnum),glbl,gc,float(plotOpt['tickSiz'])/8.,mkwid))
  • trunk/GSASIIstrMath.py

    r4521 r4531  
    16071607            HM = np.inner(uAmat,HP.T)                    #put into cartesian space X||H,Z||H*L; uAmat better than uBmat
    16081608            eM = (HM/np.sqrt(np.sum(HM**2,axis=0))).T    # normalize  HP  Nref,hkl=Unit vectors || Q
    1609 #            eDotK = np.sum(eM[:,nxs,nxs,nxs,:]*Kdata[nxs,:,:,:,:],axis=-1)
    1610 #            QC = eM[:,nxs,nxs,nxs,:]*eDotK[:,:,:,:,nxs]-Kdata[nxs,:,:,:,:] #Nref,Ntau,Nop,Natm,xyz; Cartesian
    1611 #            Q = np.inner(QC,uBmat.T)    #crystal space; Nref,Ntau,Nop,Natm,xyz .T?
    16121609
    16131610            fam0 = 0.
     
    16231620                H[3,i]*MmodB*cosm[i,nxs,:,:,nxs]),0.) for i in range(mRef)])          #Nref,Ntau,Nops,Natm,Mxyz
    16241621
    1625             if not SGData['SGGray']:
     1622            if not SGData['SGGray']:           
    16261623                fams += fam0[:,nxs,:,:,:]
    16271624                fbms += fbm0[:,nxs,:,:,:]
Note: See TracChangeset for help on using the changeset viewer.