Changeset 109afbd in sasview for src/sas/sascalc
- Timestamp:
- Nov 30, 2018 12:35:08 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
- Children:
- d96744de
- Parents:
- c7c8143
- Location:
- src/sas/sascalc
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sascalc/dataloader/readers/cansas_reader_HDF5.py
rc7c8143 r109afbd 573 573 * dataset.qx_data 574 574 + dataset.qy_data 575 * dataset.qy_data) 575 * dataset.qy_data).flatten() 576 576 except: 577 577 dataset.q_data = None -
src/sas/sascalc/file_converter/nxcansas_writer.py
rc7c8143 r109afbd 328 328 (n_rows, n_cols) = (len(data.y_bins), len(data.x_bins)) 329 329 330 if ((n_rows == 0 and n_cols == 0) 331 or (n_cols*n_rows != len(data.data.flatten()))): 330 if (n_rows == 0 and n_cols == 0) or (n_cols*n_rows != data.data.size): 332 331 # Calculate rows and columns, assuming detector is square 333 332 # Same logic as used in PlotPanel.py _get_bins … … 348 347 qy_entry = data_entry.create_dataset('Qy', data=qy) 349 348 qy_entry.attrs['units'] = data.Q_unit 350 if data.err_data is not None and not all(data.err_data == [None]): 349 if (data.err_data is not None 350 and not all(v is None for v in data.err_data)): 351 351 d_i = np.reshape(data.err_data, (n_rows, n_cols)) 352 352 i_entry.attrs['uncertainties'] = 'Idev' 353 353 i_dev_entry = data_entry.create_dataset('Idev', data=d_i) 354 354 i_dev_entry.attrs['units'] = data.I_unit 355 if data.dqx_data is not None and not all(data.dqx_data == [None]): 355 if (data.dqx_data is not None 356 and not all(v is None for v in data.dqx_data)): 356 357 qx_entry.attrs['resolutions'] = 'dQx' 357 358 dqx_entry = data_entry.create_dataset('dQx', data=data.dqx_data) 358 359 dqx_entry.attrs['units'] = data.Q_unit 359 if data.dqy_data is not None and not all(data.dqy_data == [None]): 360 if (data.dqy_data is not None 361 and not all(v is None for v in data.dqy_data)): 360 362 qy_entry.attrs['resolutions'] = 'dQy' 361 363 dqy_entry = data_entry.create_dataset('dQy', data=data.dqy_data) 362 364 dqy_entry.attrs['units'] = data.Q_unit 363 if data.mask is not None and not all( data.mask == [None]):365 if data.mask is not None and not all(v is None for v in data.mask): 364 366 data_entry.attrs['mask'] = "mask" 365 367 mask = np.invert(np.asarray(data.mask, dtype=bool))
Note: See TracChangeset
for help on using the changeset viewer.