- Timestamp:
- Jul 21, 2020 12:41:16 PM (3 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIdataGUI.py
r4525 r4531 4855 4855 if Phase['Histograms'][hist]['Use'] and phase not in Phases: 4856 4856 Phases[phase] = Phase 4857 if hist not in Histogramsand Phase['Histograms'][hist]['Use']:4857 if (hist not in Histograms) and Phase['Histograms'][hist]['Use']: 4858 4858 if hist not in histIdList: 4859 4859 if badnum == 0: … … 8678 8678 data = G2frame.GPXtree.GetItemPyData(item) 8679 8679 G2pdG.UpdateLimitsGrid(G2frame,data,datatype) 8680 G2plt.PlotPatterns(G2frame,plotType=datatype )8680 G2plt.PlotPatterns(G2frame,plotType=datatype,newPlot=True) 8681 8681 elif G2frame.GPXtree.GetItemText(item) == 'Instrument Parameters': 8682 8682 G2frame.PatternId = G2frame.GPXtree.GetItemParent(item) -
trunk/GSASIIlattice.py
r4519 r4531 854 854 def func(d,pos,Inst): 855 855 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] 857 857 N = 0 858 858 while True: #successive approximations -
trunk/GSASIIplot.py
r4530 r4531 1858 1858 wx.CallAfter(G2gd.UpdatePWHKPlot,G2frame,plottype,G2frame.PatternId) 1859 1859 return 1860 elif event.key == 'q' :1860 elif event.key == 'q' and not ifLimits: 1861 1861 newPlot = True 1862 1862 if 'PWDR' in plottype: … … 1867 1867 elif plottype in ['SASD','REFD']: 1868 1868 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: 1870 1870 if G2frame.Contour: 1871 1871 G2frame.TforYaxis = not G2frame.TforYaxis … … 2733 2733 Page.tickDict = {} 2734 2734 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 2735 2742 if G2frame.Contour: 2736 2743 Page.Choice = (' key press','b: toggle subtract background', … … 2749 2756 else: 2750 2757 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'] 2754 2765 if Page.plotStyle['sqrtPlot'] or Page.plotStyle['logPlot']: 2755 2766 del Page.Choice[1] … … 2779 2790 G2frame.cid = None 2780 2791 Page.keyPress = OnPlotKeyPress 2781 PickId = G2frame.PickId2782 PatternId = G2frame.PatternId2783 2792 try: 2784 2793 colors = GSASIIpath.GetConfigValue('Plot_Colors').split() … … 2867 2876 if G2frame.SubBack: 2868 2877 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: 2870 2879 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: 2872 2881 xLabel = r'$d, \AA$' 2873 2882 else: … … 2943 2952 if not G2frame.Contour: 2944 2953 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: 2946 2955 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: 2948 2957 X = G2lat.Pos2dsp(Parms,xye0) 2949 2958 else: … … 3029 3038 limits = np.array(G2frame.GPXtree.GetItemPyData(LimitId)) 3030 3039 lims = limits[1] 3031 if Page.plotStyle['qPlot'] and 'PWDR' in plottype :3040 if Page.plotStyle['qPlot'] and 'PWDR' in plottype and not ifLimits: 3032 3041 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: 3034 3043 lims = G2lat.Pos2dsp(Parms,lims) 3035 3044 Lines.append(Plot.axvline(lims[0],color='g',dashes=(5,5),picker=3.)) … … 3626 3635 datnum += 1 3627 3636 fp.write("@type xy\n") 3637 # fp.write("-1 -1\n".format(x,y)) 3628 3638 fp.write("-1 -1\n") 3629 fp.write("&\n")3630 3639 fp.write(linedef1.format( 3631 3640 "s"+str(datnum),glbl,gc,float(plotOpt['tickSiz'])/8.,mkwid)) -
trunk/GSASIIstrMath.py
r4521 r4531 1607 1607 HM = np.inner(uAmat,HP.T) #put into cartesian space X||H,Z||H*L; uAmat better than uBmat 1608 1608 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; Cartesian1611 # Q = np.inner(QC,uBmat.T) #crystal space; Nref,Ntau,Nop,Natm,xyz .T?1612 1609 1613 1610 fam0 = 0. … … 1623 1620 H[3,i]*MmodB*cosm[i,nxs,:,:,nxs]),0.) for i in range(mRef)]) #Nref,Ntau,Nops,Natm,Mxyz 1624 1621 1625 if not SGData['SGGray']: 1622 if not SGData['SGGray']: 1626 1623 fams += fam0[:,nxs,:,:,:] 1627 1624 fbms += fbm0[:,nxs,:,:,:]
Note: See TracChangeset
for help on using the changeset viewer.