Changeset 2308
- Timestamp:
- Jun 5, 2016 12:57:24 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIobj.py
r2062 r2308 1343 1343 'Diameter' : 'Cylinder/disk diameter', 1344 1344 'Thickness' : 'Disk thickness', 1345 'Shell thickness' : 'Multiplier to get inner(<1) or outer(>1) sphere radius', 1345 1346 'Dist' : 'Interparticle distance', 1346 1347 'VolFr' : 'Dense scatterer volume fraction', -
trunk/GSASIIplot.py
r2307 r2308 1622 1622 # if plottype == 'PWDR': # avoids a very nasty clash with KILL_FOCUS in SASD TextCtrl? 1623 1623 # Page.SetFocus() 1624 G2frame.G2plotNB.skipPageChange = True #to keep Stress/Strain data tab visible1624 # G2frame.G2plotNB.skipPageChange = True #to keep Stress/Strain data tab visible 1625 1625 G2frame.G2plotNB.status.DestroyChildren() 1626 1626 if G2frame.Contour: … … 1744 1744 Plot.set_ylabel(r'$S(Q)=I*Q^{4}$',fontsize=16) 1745 1745 else: 1746 Plot.set_ylabel(r'$Intensity, cm^{-1}$',fontsize=16)1746 Plot.set_ylabel(r'$Intensity,\ cm^{-1}$',fontsize=16) 1747 1747 else: 1748 1748 if G2frame.plotStyle['sqrtPlot']: … … 3235 3235 Page.Choice = None 3236 3236 G2frame.G2plotNB.RaisePageNoRefresh(Page) 3237 G2frame.G2plotNB.skipPageChange = True 3237 3238 G2frame.G2plotNB.status.SetFields(['','']) 3238 3239 G2frame.G2plotNB.status.SetStatusWidths([150,-1]) -
trunk/GSASIIpwdGUI.py
r2211 r2308 4035 4035 shapes = {'Spheroid':' Aspect ratio: ','Cylinder':' Diameter ','Cylinder AR':' Aspect ratio: ', 4036 4036 'Unified sphere':'','Unified rod':' Diameter: ','Unified rod AR':' Aspect ratio: ', 4037 'Unified disk':' Thickness: ' }4037 'Unified disk':' Thickness: ', 'Spherical shell': ' Shell thickness'} 4038 4038 partsh = wx.ComboBox(G2frame.dataDisplay,value=str(data['Size']['Shape'][0]),choices=shapes.keys(), 4039 4039 style=wx.CB_READONLY|wx.CB_DROPDOWN) … … 4091 4091 'Unified rod':{'Length':[100.,False]},'Unified rod AR':{'Aspect ratio':[1.0,False]}, 4092 4092 'Unified disk':{'Thickness':[100.,False]}, 4093 'Unified tube':{'Length':[100.,False],'Thickness':[10.,False]},} 4093 'Unified tube':{'Length':[100.,False],'Thickness':[10.,False]}, 4094 'Spherical shell':{'Shell thickness':[1.5,False] }, } 4094 4095 4095 4096 StructureFactors = {'Dilute':{},'Hard sphere':{'VolFr':[0.1,False],'Dist':[100.,False]}, … … 4100 4101 ffDistChoices = ['Sphere','Spheroid','Cylinder','Cylinder diam', 4101 4102 'Cylinder AR','Unified sphere','Unified rod','Unified rod AR', 4102 'Unified disk','Unified tube', ]4103 'Unified disk','Unified tube','Spherical shell',] 4103 4104 4104 4105 ffMonoChoices = ['Sphere','Spheroid','Cylinder','Cylinder AR',] … … 4249 4250 parmSizer.Add(parmSldr,1,wx.EXPAND) 4250 4251 if level['Controls']['DistType'] not in ['Bragg']: 4251 parmOrder = ['Aspect ratio','Length','Diameter','Thickness','VolFr','Dist','epis','Sticky','Depth','Width' ]4252 parmOrder = ['Aspect ratio','Length','Diameter','Thickness','VolFr','Dist','epis','Sticky','Depth','Width','Shell thickness',] 4252 4253 fTypes = ['FF ','SF '] 4253 4254 for iarg,Args in enumerate([FFargs,SFargs]): -
trunk/GSASIIsasd.py
r1743 r2308 72 72 return (3./(QR**3))*(np.sin(QR)-(QR*np.cos(QR))) 73 73 74 def SphericalShellFF(Q,R,args=()): 75 ''' Compute spherical shell form factor - can use numpy arrays 76 param float Q: Q value array (usually in A-1) 77 param float R: sphere radius (Usually in A - must match Q-1 units) 78 param array args: [float r]: controls the shell thickness: R_inner = min(r*R,R), R_outer = max(r*R,R) 79 returns float: form factors as array as needed 80 Contributed by: L.A. Avakyan, Southern Federal University, Russia 81 ''' 82 r = args[0] 83 if r < 0: # truncate to positive value 84 r = 0 85 if r < 1: # r controls inner sphere radius 86 return SphereFF(Q,R) - SphereFF(Q,R*r) 87 else: # r controls outer sphere radius 88 return SphereFF(Q,R*r) - SphereFF(Q,R) 89 74 90 def SpheroidFF(Q,R,args): 75 91 ''' Compute form factor of cylindrically symmetric ellipsoid (spheroid) … … 226 242 ''' 227 243 return (4./3.)*np.pi*R**3 244 245 def SphericalShellVol(R,args): 246 ''' Compute volume of spherical shell 247 - numpy array friendly 248 param float R: sphere radius 249 param array args: [float r]: controls shell thickness, see SphericalShellFF description 250 returns float: volume 251 ''' 252 r = args[0] 253 if r < 0: 254 r = 0 255 if r < 1: 256 return SphereVol(R) - SphereVol(R*r) 257 else: 258 return SphereVol(R*r) - SphereVol(R) 228 259 229 260 def SpheroidVol(R,args): … … 1023 1054 'Unified rod':[UniRodFF,UniRodVol],'Unified rod AR':[UniRodARFF,UniRodARVol], 1024 1055 'Unified disk':[UniDiskFF,UniDiskVol],'Sphere':[SphereFF,SphereVol], 1025 'Cylinder diam':[CylinderDFF,CylinderDVol]} 1056 'Cylinder diam':[CylinderDFF,CylinderDVol], 1057 'Spherical shell': [SphericalShellFF, SphericalShellVol]} 1026 1058 Shape = data['Size']['Shape'][0] 1027 1059 SlitLen = Sample.get('SlitLen',0.0) … … 1072 1104 'Unified rod':[UniRodFF,UniRodVol],'Unified rod AR':[UniRodARFF,UniRodARVol], 1073 1105 'Unified disk':[UniDiskFF,UniDiskVol],'Sphere':[SphereFF,SphereVol], 1074 'Unified tube':[UniTubeFF,UniTubeVol],'Cylinder diam':[CylinderDFF,CylinderDVol]} 1106 'Unified tube':[UniTubeFF,UniTubeVol],'Cylinder diam':[CylinderDFF,CylinderDVol], 1107 'Spherical shell':[SphericalShellFF,SphericalShellVol]} 1075 1108 1076 1109 sfxns = {'Dilute':DiluteSF,'Hard sphere':HardSpheresSF,'Square well':SquareWellSF, … … 1080 1113 'PkInt','PkPos','PkSig','PkGam',] 1081 1114 1082 FFparmOrder = ['Aspect ratio','Length','Diameter','Thickness' ]1115 FFparmOrder = ['Aspect ratio','Length','Diameter','Thickness','Shell thickness'] 1083 1116 1084 1117 SFparmOrder = ['Dist','VolFr','epis','Sticky','Depth','Width'] … … 1174 1207 FFargs = [] 1175 1208 SFargs = [] 1176 for item in [cid+'Aspect ratio',cid+'Length',cid+'Thickness',cid+'Diameter' ]:1209 for item in [cid+'Aspect ratio',cid+'Length',cid+'Thickness',cid+'Diameter',cid+'Shell thickness']: 1177 1210 if item in parmDict: 1178 1211 FFargs.append(parmDict[item]) … … 1206 1239 FFargs = [] 1207 1240 SFargs = [] 1208 for item in [cid+'Aspect ratio',cid+'Length',cid+'Thickness',cid+'Diameter', ]:1241 for item in [cid+'Aspect ratio',cid+'Length',cid+'Thickness',cid+'Diameter',cid+'Shell thickness']: 1209 1242 if item in parmDict: 1210 1243 FFargs.append(parmDict[item]) … … 1283 1316 'Unified rod':[UniRodFF,UniRodVol],'Unified rod AR':[UniRodARFF,UniRodARVol], 1284 1317 'Unified disk':[UniDiskFF,UniDiskVol],'Sphere':[SphereFF,SphereVol], 1285 'Unified tube':[UniTubeFF,UniTubeVol],'Cylinder diam':[CylinderDFF,CylinderDVol]} 1318 'Unified tube':[UniTubeFF,UniTubeVol],'Cylinder diam':[CylinderDFF,CylinderDVol], 1319 'Spherical shell':[SphericalShellFF,SphericalShellVol]} 1286 1320 sfxns = {'Dilute':DiluteSF,'Hard sphere':HardSpheresSF,'Square well':SquareWellSF, 1287 1321 'Sticky hard sphere':StickyHardSpheresSF,'InterPrecipitate':InterPrecipitateSF,} … … 1316 1350 if item in controls.get('SFargs',{}): 1317 1351 SFargs.append(controls['SFargs'][item][0]) 1318 for item in ['Aspect ratio','Length','Thickness','Diameter', ]:1352 for item in ['Aspect ratio','Length','Thickness','Diameter','Shell thickness']: 1319 1353 if item in controls['FFargs']: 1320 1354 FFargs.append(controls['FFargs'][item][0]) … … 1357 1391 if item in controls.get('SFargs',{}): 1358 1392 SFargs.append(controls['SFargs'][item][0]) 1359 for item in ['Aspect ratio','Length','Thickness','Diameter', ]:1393 for item in ['Aspect ratio','Length','Thickness','Diameter','Shell thickness']: 1360 1394 if item in controls['FFargs']: 1361 1395 FFargs.append(controls['FFargs'][item][0])
Note: See TracChangeset
for help on using the changeset viewer.