Changeset 8f882fe in sasview for src/sas/sascalc/dataloader/file_reader_base_class.py
- Timestamp:
- Jul 6, 2018 12:23:21 PM (6 years ago)
- Branches:
- master, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, unittest-saveload
- Children:
- eb6abab
- Parents:
- 058f6c3
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sascalc/dataloader/file_reader_base_class.py
r058f6c3 r8f882fe 175 175 # Normalize the units for 176 176 data.x_unit = self.format_unit(data.x_unit) 177 data._xunit = data.x_unit 177 178 data.y_unit = self.format_unit(data.y_unit) 179 data._yunit = data.y_unit 178 180 # Sort data by increasing x and remove 1st point 179 181 ind = np.lexsort((data.y, data.x)) … … 206 208 elif isinstance(data, Data2D): 207 209 # Normalize the units for 208 data.x_unit = self.format_unit(data.Q_unit) 209 data.y_unit = self.format_unit(data.I_unit) 210 data.Q_unit = self.format_unit(data.Q_unit) 211 data.I_unit = self.format_unit(data.I_unit) 212 data._xunit = data.Q_unit 213 data._yunit = data.Q_unit 214 data._zunit = data.I_unit 210 215 data.data = data.data.astype(np.float64) 211 216 data.qx_data = data.qx_data.astype(np.float64) … … 318 323 try: 319 324 data.x = data_conv_x(data.x, units=default_q_unit) 325 data._xunit = default_q_unit 326 data.x_unit = default_q_unit 320 327 if data.dx is not None: 321 328 data.dx = data_conv_x(data.dx, units=default_q_unit) … … 330 337 try: 331 338 data.y = data_conv_y(data.y, units=default_i_unit) 339 data._yunit = default_i_unit 340 data.y_unit = default_i_unit 332 341 if data.dy is not None: 333 342 data.dy = data_conv_y(data.dy, units=default_i_unit)
Note: See TracChangeset
for help on using the changeset viewer.