Changeset 1049
- Timestamp:
- Sep 4, 2013 10:19:20 AM (10 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASII.py
r1048 r1049 1367 1367 Data['calibrant'] = '' 1368 1368 Data['GonioAngles'] = [0.,0.,0.] 1369 Data['DetDepth'] = 0. 1370 Data['DetDepthRef'] = False 1369 1371 else: 1370 1372 Data['type'] = 'PWDR' … … 1382 1384 Data['ellipses'] = [] 1383 1385 Data['GonioAngles'] = [0.,0.,0.] 1386 Data['DetDepth'] = 0. 1387 Data['DetDepthRef'] = False 1384 1388 Data['calibrant'] = '' 1385 1389 Data['IOtth'] = [2.0,5.0] -
trunk/GSASIIimage.py
r939 r1049 744 744 import histogram2d as h2d 745 745 print 'Begin image integration' 746 blkSize = 128 #this seems to be optimal 746 747 LUtth = data['IOtth'] 747 748 LRazm = np.array(data['LRazimuth'],dtype=np.float64) … … 756 757 imageN = len(image) 757 758 Nx,Ny = data['size'] 758 nXBlks = (Nx-1)/ 1024+1759 nYBlks = (Ny-1)/ 1024+1759 nXBlks = (Nx-1)/blkSize+1 760 nYBlks = (Ny-1)/blkSize+1 760 761 Nup = nXBlks*nYBlks*3+3 761 762 dlg = wx.ProgressDialog("Elapsed time","2D image integration",Nup, … … 766 767 dlg.Update(Nup) 767 768 for iBlk in range(nYBlks): 768 iBeg = iBlk* 1024769 iFin = min(iBeg+ 1024,Ny)769 iBeg = iBlk*blkSize 770 iFin = min(iBeg+blkSize,Ny) 770 771 for jBlk in range(nXBlks): 771 jBeg = jBlk* 1024772 jFin = min(jBeg+ 1024,Nx)773 print 'Process map block:',iBlk,jBlk,' limits:',iBeg,iFin,jBeg,jFin772 jBeg = jBlk*blkSize 773 jFin = min(jBeg+blkSize,Nx) 774 # print 'Process map block:',iBlk,jBlk,' limits:',iBeg,iFin,jBeg,jFin 774 775 TA,tam = Make2ThetaAzimuthMap(data,masks,(iBeg,iFin),(jBeg,jFin)) #2-theta & azimuth arrays & create position mask 775 776 … … 784 785 tax = np.where(tax < LRazm[0],tax+360.,tax) 785 786 NST,H0 = h2d.histogram2d(len(tax),tax,tay,taz,numAzms,numChans,LRazm,LUtth,Dazm,Dtth,NST,H0) 786 print 'block done'787 # print 'block done' 787 788 del tax,tay,taz 788 789 Nup += 1 -
trunk/GSASIIimgGUI.py
r989 r1049 45 45 ''' 46 46 import ImageCalibrants as calFile 47 try: 48 import UserCalibrants as userFile 49 calFile.Calibrants.update(userFile.Calibrants) 50 except: 51 pass 47 52 #patch 48 53 if 'GonioAngles' not in data: … … 918 923 Source = name 919 924 Mask = copy.deepcopy(G2frame.PatternTree.GetItemPyData(G2gd.GetPatternTreeItemId(G2frame,id, 'Masks'))) 920 del Mask['Thresholds']921 925 else: 922 926 TextList.append([False,name,id]) … … 936 940 if ifcopy: 937 941 mask = G2frame.PatternTree.GetItemPyData(G2gd.GetPatternTreeItemId(G2frame,id, 'Masks')) 942 Mask['Thresholds'][0] = mask['Thresholds'][0] 943 Mask['Thresholds'][1][1] = min(mask['Thresholds'][1][1],Mask['Thresholds'][1][1]) 938 944 mask.update(Mask) 939 945 G2frame.PatternTree.SetItemPyData(G2gd.GetPatternTreeItemId(G2frame,id, 'Masks'),copy.deepcopy(mask)) … … 964 970 File = open(filename,'r') 965 971 save = {} 972 oldThreshold = data['Thresholds'][0] 966 973 S = File.readline() 967 974 while S: … … 972 979 if key in ['Points','Rings','Arcs','Polygons','Thresholds']: 973 980 save[key] = eval(val) 981 if key == 'Thresholds': 982 save[key][0] = oldThreshold 983 save[key][1][1] = min(oldThreshold[1],save[key][1][1]) 974 984 S = File.readline() 975 985 data.update(save) -
trunk/ImageCalibrants.py
r939 r1049 1 ''' 1 """ 2 2 *ImageCalibrants: Calibration Standards* 3 3 ---------------------------------------- … … 6 6 calibrations for image data. 7 7 8 ''' 9 #GSASII powder calibrants file; dictionary of substances commonly used for powder 10 #calibrations. Each entry consists of: 11 # 'name':(Bravais no,(a,b,c,alpha,beta,gamma),no. lines skipped,(dmin,pixLimit,cutOff) 12 #Useful Bravais nos.: F-cubic=0,I-cubic=1,P-cubic=2,R3/m(hex)=3, P6=4, P4mmm=6 8 Create your own in file UserCalibrants.py following the format shown here; 9 if you use the same names given here your entries will replace the corresponding 10 ones given here. 11 Each entry consists of: 12 'name':(Bravais no,(a,b,c,alpha,beta,gamma),no. lines skipped,(dmin,pixLimit,cutOff) 13 Useful Bravais nos.: F-cubic=0,I-cubic=1,P-cubic=2,R3/m(hex)=3, P6=4, P4mmm=6 14 """ 13 15 Calibrants={ 14 16 '':([0,],[(0,0,0,0,0,0),],0,(0,0,0)),
Note: See TracChangeset
for help on using the changeset viewer.