- Timestamp:
- Aug 29, 2019 12:06:10 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/GSASIIscriptable.py ¶
r4119 r4120 685 685 686 686 Note that the parameters must match the object type and method (phase vs. histogram vs. HAP). 687 687 688 ================================= 688 689 Code Examples … … 1269 1270 return output, names 1270 1271 1272 def GenerateReflections(spcGrp,cell,Qmax=None,dmin=None,TTmax=None,wave=None): 1273 import GSASIIlattice as G2lat 1274 if len(cell) != 6: 1275 raise G2ScriptException("GenerateReflections: Invalid unit cell:" + str(cell)) 1276 opts = (Qmax is not None) + (dmin is not None) + (TTmax is not None) 1277 if Qmax: 1278 dmin = 2 * np.pi / Qmax 1279 #print('Q,d',Qmax,dmin) 1280 elif TTmax and wave is None: 1281 raise G2ScriptException("GenerateReflections: specify a wavelength with TTmax") 1282 elif TTmax: 1283 dmin = wave / (2.0 * np.sin(np.pi*TTmax/360.)) 1284 #print('2theta,d',TTmax,dmin) 1285 if opts != 1: 1286 raise G2ScriptException("GenerateReflections: specify one Qmax, dmin or TTmax") 1287 err,SGData = G2spc.SpcGroup(spcGrp) 1288 if err != 0: 1289 print('GenerateReflections space group error:',G2spc.SGErrors(err)) 1290 raise G2ScriptException("GenerateReflections: Invalid space group: " + str(spcGrp)) 1291 A = G2lat.cell2A(cell) 1292 return G2lat.GenHLaue(dmin,SGData,A) 1271 1293 1272 1294 class G2ImportException(Exception):
Note: See TracChangeset
for help on using the changeset viewer.