Changeset 4571 for trunk/GSASIIimage.py
 Timestamp:
 Sep 17, 2020 3:50:24 PM (13 months ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/GSASIIimage.py
r4570 r4571 1217 1217 #prepare masked arrays of bins with pixels for interpolation setup 1218 1218 H2msk = [ma.array(H2[:1],mask=np.logical_not(nst)) for nst in NST] 1219 H0msk = [ma.array(np.divide(h0,nst),mask=np.logical_not(nst)) for nst,h0 in zip(NST,H0)] 1219 # H0msk = [ma.array(np.divide(h0,nst),mask=np.logical_not(nst)) for nst,h0 in zip(NST,H0)] 1220 H0msk = [ma.array(h0/nst,mask=np.logical_not(nst)) for nst,h0 in zip(NST,H0)] 1220 1221 #make linear interpolators; outside limits give NaN 1221 1222 H0 = [] … … 1512 1513 ''' 1513 1514 from scipy.optimize import minimize_scalar 1514 Arc = [arcTth,[45.,135.],2.0] 1515 print(' Polarization fit for mask at %.1f deg 2theta'%arcTth) 1516 data = copy.deepcopy(imageData) 1517 data['IOtth'] = [arcTth2.,arcTth+2.] 1518 data['fullIntegrate'] = True 1519 data['LRazimuth'] = [0.,360.] 1520 data['outChannels'] = 200 1521 data['outAzimuths'] = 1 1522 Arc = [arcTth,[85.,95.],2.0] 1523 print(' Integration 2theta test range %.1f  %.1f in 200 steps'%(data['IOtth'][0],data['IOtth'][1])) 1515 1524 Masks = {'Points':[],'Rings':[],'Arcs':[],'Polygons':[],'Frames':[], 1516 1525 'Thresholds':imageData['range'],'SpotMask':{'esdMul':3.,'spotMask':None}} 1517 1526 AMasks = {'Points':[],'Rings':[],'Arcs':[Arc,],'Polygons':[],'Frames':[], 1518 1527 'Thresholds':imageData['range'],'SpotMask':{'esdMul':3.,'spotMask':None}} 1519 data = copy.deepcopy(imageData)1520 1528 1521 1529 def func(p): … … 1524 1532 H0 = ImageIntegrate(ImageZ,data,Masks)[0] 1525 1533 H0A = ImageIntegrate(ImageZ,data,AMasks)[0] 1526 M = np.sum(H0 H0A)1527 print(' polarization %.4f, fxn: %.1f'%(p,M))1534 M = np.sum(H0)np.sum(H0A) 1535 print(' Polarization %.4f, fxn: %.1f'%(p,M)) 1528 1536 return M**2 1529 1537
Note: See TracChangeset
for help on using the changeset viewer.