Changeset 01fb70b in sasview for DataLoader/invariant.py
- Timestamp:
- Oct 11, 2009 4:51:40 PM (15 years ago)
- Branches:
- master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 08f6993
- Parents:
- d38d2230
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
DataLoader/invariant.py
rcfbcb6a r01fb70b 197 197 return 2*math.pi*self.volume*(1- self.volume)*float(pConst)/self.q_star 198 198 199 200 if __name__=="__main__": 201 # test the module 202 #x=[1,2,3,4,10] 203 #y=[2,3,4,5,6] 204 x=[2,3] 205 y=[4,3] 206 dxl=[0.01,0.01] 207 # compute invariant with smear information 208 from DataLoader.data_info import Data1D 209 data = Data1D(x=x,y=y ) 210 I= InvariantCalculator( data= data) 211 print "invariant initialized only with data:", I 212 print "invariant q_star",I.q_star 213 print "invariant volume",I.volume 214 print "Invariant surface",I.surface 215 print 216 217 print "invariant initialized __call__:", I(contrast=5.3e-6, pConst=20) 218 print "invariant q_star",I.q_star 219 print "invariant volume",I.volume 220 print "Invariant surface",I.surface 221 print 222 # compute invariant with smear information 223 from sans.guiframe.dataFitting import Data1D 224 data= Data1D(x=x,y=y ) 225 data.dxl =dxl 226 I= InvariantCalculator( data= data, contrast=2, pConst=20) 227 print "invariant initialize with data, contrast,pConst:", I 228 print "invariant q_star",I.q_star 229 print "invariant volume",I.volume 230 print "Invariant surface",I.surface 231 print 232 print "invariant error" 233 # compute invariant with smear information 234 from danse.common.plottools.plottables import Data1D 235 data= Data1D(x=x,y=y ) 236 I= InvariantCalculator( data= data, contrast=2, pConst=20) 237 238 print "invariant q_star",I.q_star 239 print "invariant volume",I.volume 240 print "Invariant surface",I.surface 241 print 242 243 244 245 199
Note: See TracChangeset
for help on using the changeset viewer.