Changeset 3cd95c8 in sasview
- Timestamp:
- Mar 12, 2010 12:36:35 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:
- 095ab1b
- Parents:
- eadf1f9
- Location:
- DataLoader
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
DataLoader/data_info.py
r2733188 r3cd95c8 77 77 ymax = None 78 78 data = None 79 err_data = None 79 qx_data = None 80 qy_data = None 81 q_data = None 82 err_data = None 83 dqx_data = None 84 dqy_data = None 85 mask = None 80 86 81 87 # Units … … 87 93 _zunit = '' 88 94 89 def __init__(self, data=None, err_data=None ):95 def __init__(self, data=None, err_data=None, qx_data=None, qy_data=None, q_data=None,mask=None, dqx_data=None, dqy_data=None): 90 96 self.data = numpy.asarray(data) 97 self.qx_data = numpy.asarray(qx_data) 98 self.qy_data = numpy.asarray(qy_data) 99 self.q_data = numpy.asarray(q_data) 100 self.mask = numpy.asarray(mask) 91 101 self.err_data = numpy.asarray(err_data) 92 102 if dqx_data is not None: self.dqx_data = numpy.asarray(dqx_data) 103 if dqy_data is not None: self.dqy_data = numpy.asarray(dqy_data) 104 93 105 def xaxis(self, label, unit): 94 106 self._xaxis = label … … 688 700 689 701 690 def __init__(self, data=None, err_data=None ):702 def __init__(self, data=None, err_data=None, qx_data=None, qy_data=None, q_data=None, mask=None, dqx_data=None, dqy_data=None): 691 703 self.y_bins = [] 692 704 self.x_bins = [] 693 705 DataInfo.__init__(self) 694 plottable_2D.__init__(self, data, err_data )706 plottable_2D.__init__(self, data, err_data, qx_data, qy_data, q_data,mask, dqx_data, dqy_data) 695 707 if len(self.detector)>0: 696 708 raise RuntimeError, "Data2D: Detector bank already filled at init" … … 705 717 leny = 0 706 718 if len(self.data)>0: 707 leny = len(self.data [0])708 _str += " Length: %g x %g\n" % (len(self.data), leny)719 leny = len(self.data) 720 _str += " Length: %g \n" % (len(self.data)) 709 721 710 722 return _str … … 724 736 data = numpy.zeros(length) 725 737 err_data = numpy.zeros(length) 726 clone = Data2D(data, err_data) 727 738 qx_data = numpy.zeros(length) 739 qy_data = numpy.zeros(length) 740 q_data = numpy.zeros(length) 741 mask = numpy.zeros(length) 742 dqx_data = None 743 dqy_data = None 744 clone = Data2D(data, err_data, qx_data, qy_data, q_data,mask, dqx_data=dqx_data, dqy_data=dqy_data) 745 728 746 clone.title = self.title 729 747 clone.run = self.run
Note: See TracChangeset
for help on using the changeset viewer.