Changeset 7d8094b in sasview
- Timestamp:
- Jun 5, 2009 6:56:17 PM (16 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:
- 1abcb04
- Parents:
- 1b69256
- Location:
- DataLoader
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
DataLoader/data_info.py
rde5c813 r7d8094b 565 565 return _str 566 566 567 def clone_without_data(self, length=0 ):567 def clone_without_data(self, length=0, clone=None): 568 568 """ 569 569 Clone the current object, without copying the data (which … … 572 572 573 573 @param length: length of the data array to be initialized 574 @param clone: if provided, the data will be copied to clone 574 575 """ 575 576 from copy import deepcopy 576 577 577 x = numpy.zeros(length) 578 dx = numpy.zeros(length) 579 y = numpy.zeros(length) 580 dy = numpy.zeros(length) 581 582 clone = Data1D(x, y, dx=dx, dy=dy) 578 if clone is None or not issubclass(clone.__class__, Data1D): 579 x = numpy.zeros(length) 580 dx = numpy.zeros(length) 581 y = numpy.zeros(length) 582 dy = numpy.zeros(length) 583 clone = Data1D(x, y, dx=dx, dy=dy) 584 583 585 clone.title = self.title 584 586 clone.run = self.run … … 694 696 return _str 695 697 696 def clone_without_data(self, length=0 ):698 def clone_without_data(self, length=0, clone=None): 697 699 """ 698 700 Clone the current object, without copying the data (which … … 701 703 702 704 @param length: length of the data array to be initialized 705 @param clone: if provided, the data will be copied to clone 703 706 """ 704 707 from copy import deepcopy 705 708 706 data = numpy.zeros(length) 707 err_data = numpy.zeros(length) 708 709 clone = Data2D(data, err_data) 709 if clone is None or not issubclass(clone.__class__, Data2D): 710 data = numpy.zeros(length) 711 err_data = numpy.zeros(length) 712 clone = Data2D(data, err_data) 713 710 714 clone.title = self.title 711 715 clone.run = self.run -
DataLoader/readers/cansas_reader.py
rb3de3a45 r7d8094b 603 603 """ 604 604 605 if not datainfo.__class__ == Data1D:605 if not issubclass(datainfo.__class__, Data1D): 606 606 raise RuntimeError, "The cansas writer expects a Data1D instance" 607 607
Note: See TracChangeset
for help on using the changeset viewer.