Changeset be577e7 in sasview
- Timestamp:
- Dec 30, 2013 2:20:27 PM (11 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:
- 1ce36f37
- Parents:
- 17a25d4
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sans/dataloader/data_info.py
rffbe487 rbe577e7 401 401 return _str 402 402 403 class TransmissionSpectrum: 404 """ 405 Class that holds information about transmission spectrum 406 for white beams and spallation sources. 407 """ 408 name = '' 409 timestamp = '' 410 ## Wavelength (float) [A] 411 wavelength = None 412 wavelength_unit = 'A' 413 ## Transmission (float) [unit less] 414 transmission = None 415 transmission_unit = '' 416 ## Transmission Deviation (float) [unit less] 417 transmission_deviation = None 418 transmission_deviation_unit = '' 419 420 def __init__(self): 421 self.wavelength = [] 422 self.transmission = [] 423 self.transmission_deviation = [] 424 425 def __str__(self): 426 _str = "Transmission Spectrum:\n" 427 _str += " Name: {0}".format(self.name) 428 _str += " Timestamp: {1}".format(self.timestamp) 429 _str += " Wavelength [{0}] | Transmission [{1}] | Trans Dev [{2}]\n".format(self.wavelength_unit, self.transmission_unit, self.transmission_deviation_unit) 430 for i in range(len(self.wavelength)): 431 _str += " {0}, {1}".format(self.wavelength[i], self.transmission[i]) 432 if len(self.transmission_deviation > i): 433 _str += ", {0}".format(self.transmission_deviation[i]) 434 _str += "\n" 435 return _str 436 403 437 404 438 class DataInfo: … … 431 465 ## Collimation information 432 466 collimation = None 467 ## Transmission Spectrum INfo 468 trans_spectrum = None 433 469 ## Additional meta-data 434 470 meta_data = None … … 461 497 ## Collimation information 462 498 self.collimation = [] 499 ## Transmission Spectrum 500 self.trans_spectrum = TransmissionSpectrum() 463 501 ## Additional meta-data 464 502 self.meta_data = {} -
test/sansguiframe/test/cansas1d.xml
r5777106 rbe577e7 49 49 50 50 </SASsample> 51 <SASinstrument name="TEST instrument">51 <SASinstrument> 52 52 <name>canSAS instrument</name> 53 53 <SASsource name="source name"> … … 85 85 4.150 86 86 </SDD> 87 <orientation> 87 <offset> 88 <x unit="mm">1</x> 89 <y unit="mm">2</y> 90 </offset> 91 <orientation> 88 92 <roll unit="degree">1.00</roll> 89 93 <pitch unit="degree">0.00</pitch> 90 94 <yaw unit="degree">0.00</yaw> 91 95 </orientation> 92 <offset>93 <x unit="mm">1</x>94 <y unit="mm">2</y>95 </offset>96 96 <beam_center> 97 97 <x unit="mm">322.64</x> … … 135 135 <term name="ABS:IZERO">230.09</term> 136 136 <term name="ABS:XSECT" unit="mm">1</term> 137 <SASprocessnote />137 <SASprocessnote>No Information</SASprocessnote> 138 138 </SASprocess> 139 139 <SASnote /> -
test/sansguiframe/test/utest_manipulations.py
r5777106 rbe577e7 15 15 16 16 def setUp(self): 17 self.data = Loader().load("cansas1d.xml") 17 data = Loader().load("cansas1d.xml") 18 self.data = data[0] 18 19 19 20 def test_clone1D(self): … … 29 30 30 31 def setUp(self): 31 self.data = Loader().load("cansas1d.xml") 32 data = Loader().load("cansas1d.xml") 33 self.data = data[0] 32 34 33 35 def test_clone_theory1D(self): -
test/sansinvariant/test/utest_data_handling.py
r5777106 rbe577e7 92 92 """ 93 93 def setUp(self): 94 self.data = Loader().load("latex_smeared_slit.xml") 94 data = Loader().load("latex_smeared_slit.xml") 95 self.data = data[0] 95 96 self.data.dxl = None 96 97 -
test/sansmodels/test/cansas1d_slit.xml
r5777106 rbe577e7 14 14 <I unit="1/cm">1000</I> 15 15 <Idev unit="1/cm">3</Idev> 16 <dQw unit="1/A">0.001</dQw> 16 17 <dQl unit="1/A">0.005</dQl> 17 <dQw unit="1/A">0.001</dQw> 18 <Shadowfactor><!-- Shadowfactor is optional --></Shadowfactor> 18 <Shadowfactor><!-- Shadowfactor is optional --></Shadowfactor> 19 19 </Idata> 20 20 <Idata> … … 22 22 <I unit="1/cm">1001</I> 23 23 <Idev unit="1/cm">4</Idev> 24 <dQw unit="1/A">0.001</dQw> 24 25 <dQl unit="1/A">0.005</dQl> 25 <dQw unit="1/A">0.001</dQw> 26 <Shadowfactor><!-- Shadowfactor is optional --></Shadowfactor> 26 <Shadowfactor><!-- Shadowfactor is optional --></Shadowfactor> 27 27 </Idata> 28 28 </SASdata> … … 49 49 50 50 </SASsample> 51 <SASinstrument name="TEST instrument">51 <SASinstrument> 52 52 <name>canSAS instrument</name> 53 53 <SASsource name="source name"> … … 85 85 4.150 86 86 </SDD> 87 <orientation> 87 <offset> 88 <x unit="mm">1</x> 89 <y unit="mm">2</y> 90 </offset> 91 <orientation> 88 92 <roll unit="degree">1.00</roll> 89 93 <pitch unit="degree">0.00</pitch> 90 94 <yaw unit="degree">0.00</yaw> 91 95 </orientation> 92 <offset>93 <x unit="mm">1</x>94 <y unit="mm">2</y>95 </offset>96 96 <beam_center> 97 97 <x unit="mm">322.64</x> -
test/sansmodels/test/utest_smearing.py
r5777106 rbe577e7 16 16 17 17 def setUp(self): 18 self.data = Loader().load("cansas1d_slit.xml") 18 data = Loader().load("cansas1d_slit.xml") 19 self.data = data[0] 19 20 20 21 x = 0.001*numpy.arange(1,11)
Note: See TracChangeset
for help on using the changeset viewer.