Changeset 76cd1ae in sasview for src/sans/dataloader/data_info.py
- Timestamp:
- Jan 14, 2014 3:53:36 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:
- 16bd5ca
- Parents:
- 083e993
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sans/dataloader/data_info.py
rbe577e7 r76cd1ae 425 425 def __str__(self): 426 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" 427 _str += " Name: \t{0}\n".format(self.name) 428 _str += " Timestamp: \t{0}\n".format(self.timestamp) 429 _str += " Wavelength unit: \t{0}\n".format(self.wavelength_unit) 430 _str += " Transmission unit:\t{0}\n".format(self.transmission_unit) 431 _str += " Trans. Dev. unit: \t{0}\n".format(\ 432 self.transmission_deviation_unit) 433 length_list = [len(self.wavelength), len(self.transmission), \ 434 len(self.transmission_deviation)] 435 _str += " Number of Pts: \t{0}\n".format(max(length_list)) 435 436 return _str 436 437 … … 498 499 self.collimation = [] 499 500 ## Transmission Spectrum 500 self.trans_spectrum = TransmissionSpectrum()501 self.trans_spectrum = [] 501 502 ## Additional meta-data 502 503 self.meta_data = {} … … 533 534 for item in self.notes: 534 535 _str += "%s\n" % str(item) 535 536 for item in self.trans_spectrum: 537 _str += "%s\n" % str(item) 536 538 return _str 537 539 … … 757 759 clone = Data1D(x, y, dx=dx, dy=dy) 758 760 759 clone.title = self.title 760 clone.run = self.run 761 clone.filename = self.filename 762 clone.instrument = self.instrument 763 clone.notes = deepcopy(self.notes) 764 clone.process = deepcopy(self.process) 765 clone.detector = deepcopy(self.detector) 766 clone.sample = deepcopy(self.sample) 767 clone.source = deepcopy(self.source) 768 clone.collimation = deepcopy(self.collimation) 769 clone.meta_data = deepcopy(self.meta_data) 770 clone.errors = deepcopy(self.errors) 761 clone.title = self.title 762 clone.run = self.run 763 clone.filename = self.filename 764 clone.instrument = self.instrument 765 clone.notes = deepcopy(self.notes) 766 clone.process = deepcopy(self.process) 767 clone.detector = deepcopy(self.detector) 768 clone.sample = deepcopy(self.sample) 769 clone.source = deepcopy(self.source) 770 clone.collimation = deepcopy(self.collimation) 771 clone.trans_spectrum = deepcopy(self.trans_spectrum) 772 clone.meta_data = deepcopy(self.meta_data) 773 clone.errors = deepcopy(self.errors) 771 774 772 775 return clone
Note: See TracChangeset
for help on using the changeset viewer.