Changeset 1646 for trunk/GSASIImath.py
 Timestamp:
 Feb 11, 2015 1:33:27 PM (8 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/GSASIImath.py
r1645 r1646 2080 2080 return mapData,map4DData 2081 2081 2082 def SearchMap(generalData,drawingData ):2082 def SearchMap(generalData,drawingData,Neg=False): 2083 2083 '''Does a search of a density map for peaks meeting the criterion of peak 2084 2084 height is greater than mapData['cutOff']/100 of mapData['rhoMax'] where 2085 2085 mapData is data['General']['mapData']; the map is also in mapData. 2086 2086 2087 :param data: the phase data structure 2087 :param generalData: the phase data structure; includes the map 2088 :param drawingData: the drawing data structure 2089 :param Neg: if True then search for negative peaks (i.e. Hatoms & neutron data) 2088 2090 2089 2091 :returns: (peaks,mags,dzeros) where … … 2158 2160 mapData = generalData['Map'] 2159 2161 contLevel = mapData['cutOff']*mapData['rhoMax']/100. 2160 rho = copy.copy(mapData['rho']) #don't mess up original 2162 if Neg: 2163 rho = copy.copy(mapData['rho']) #flip +/ 2164 else: 2165 rho = copy.copy(mapData['rho']) #don't mess up original 2161 2166 mapHalf = np.array(rho.shape)/2 2162 2167 res = mapData['Resolution'] … … 2193 2198 rho = rollMap(rho,ind) 2194 2199 dzeros = np.sqrt(np.sum(np.inner(Amat,peaks)**2,axis=0)) 2195 return np.array(peaks),np.array([mags,]).T,np.array([dzeros,]).T 2200 if Neg: #want negative magnitudes for negative peaks 2201 return np.array(peaks),np.array([mags,]).T,np.array([dzeros,]).T 2202 else: 2203 return np.array(peaks),np.array([mags,]).T,np.array([dzeros,]).T 2196 2204 2197 2205 def sortArray(data,pos,reverse=False):
Note: See TracChangeset
for help on using the changeset viewer.