Changeset 8db20a9 in sasview for src/sas/sascalc/dataloader/data_info.py
- Timestamp:
- Jan 21, 2019 8:15:40 AM (6 years ago)
- Branches:
- ESS_GUI, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_opencl, ESS_GUI_sync_sascalc
- Children:
- d541324e
- Parents:
- 3ca645bb
- git-author:
- Piotr Rozyczko <piotr.rozyczko@…> (01/21/19 08:12:08)
- git-committer:
- Piotr Rozyczko <piotr.rozyczko@…> (01/21/19 08:15:40)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sascalc/dataloader/data_info.py
rb8080e1 r8db20a9 954 954 _str += "Data:\n" 955 955 _str += " Type: %s\n" % self.__class__.__name__ 956 _str += " X- & Y-axis: %s\t[%s]\n" % (self._yaxis, self._yunit) 956 _str += " X-axis: %s\t[%s]\n" % (self._xaxis, self._xunit) 957 _str += " Y-axis: %s\t[%s]\n" % (self._yaxis, self._yunit) 957 958 _str += " Z-axis: %s\t[%s]\n" % (self._zaxis, self._zunit) 958 959 _str += " Length: %g \n" % (len(self.data)) … … 983 984 qx_data=qx_data, qy_data=qy_data, 984 985 q_data=q_data, mask=mask) 986 987 clone._xaxis = self._xaxis 988 clone._yaxis = self._yaxis 989 clone._zaxis = self._zaxis 990 clone._xunit = self._xunit 991 clone._yunit = self._yunit 992 clone._zunit = self._zunit 993 clone.x_bins = self.x_bins 994 clone.y_bins = self.y_bins 985 995 986 996 clone.title = self.title … … 1153 1163 def combine_data_info_with_plottable(data, datainfo): 1154 1164 """ 1155 A function that combines the DataInfo data in self.current_datainto with a plottable_1D or 2D data object. 1165 A function that combines the DataInfo data in self.current_datainto with a 1166 plottable_1D or 2D data object. 1156 1167 1157 1168 :param data: A plottable_1D or plottable_2D data object … … 1171 1182 final_dataset.yaxis(data._yaxis, data._yunit) 1172 1183 elif isinstance(data, plottable_2D): 1173 final_dataset = Data2D(data.data, data.err_data, data.qx_data, data.qy_data, data.q_data, 1174 data.mask, data.dqx_data, data.dqy_data) 1184 final_dataset = Data2D(data.data, data.err_data, data.qx_data, 1185 data.qy_data, data.q_data, data.mask, 1186 data.dqx_data, data.dqy_data) 1175 1187 final_dataset.xaxis(data._xaxis, data._xunit) 1176 1188 final_dataset.yaxis(data._yaxis, data._yunit) 1177 1189 final_dataset.zaxis(data._zaxis, data._zunit) 1178 if len(data.data.shape) == 2: 1179 n_rows, n_cols = data.data.shape 1180 final_dataset.y_bins = data.qy_data[0::int(n_cols)] 1181 final_dataset.x_bins = data.qx_data[:int(n_cols)] 1190 final_dataset.y_bins = data.y_bins 1191 final_dataset.x_bins = data.x_bins 1182 1192 else: 1183 return_string = "Should Never Happen: _combine_data_info_with_plottable input is not a plottable1d or " + \ 1184 "plottable2d data object" 1193 return_string = ("Should Never Happen: _combine_data_info_with_plottabl" 1194 "e input is not a plottable1d or plottable2d data " 1195 "object") 1185 1196 return return_string 1186 1197
Note: See TracChangeset
for help on using the changeset viewer.