Changeset fc51d06 in sasview for src/sas/sascalc/file_converter/nxcansas_writer.py
- Timestamp:
- Jul 9, 2018 2:51:03 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:
- b799f09
- Parents:
- b011ecb
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sascalc/file_converter/nxcansas_writer.py
r369ed11d rfc51d06 297 297 298 298 intensity = np.reshape(data.data, (n_rows, n_cols)) 299 d_i = None300 if not all(data.err_data == [None]):301 d_i = np.reshape(data.err_data, (n_rows, n_cols))302 299 qx = np.reshape(data.qx_data, (n_rows, n_cols)) 303 300 qy = np.reshape(data.qy_data, (n_rows, n_cols)) … … 309 306 qy_entry = data_entry.create_dataset('Qy', data=qy) 310 307 qy_entry.attrs['units'] = data.Q_unit 311 if d_i: 308 if data.err_data is not None and not all(data.err_data == [None]): 309 d_i = np.reshape(data.err_data, (n_rows, n_cols)) 312 310 i_entry.attrs['uncertainties'] = 'Idev' 313 311 i_dev_entry = data_entry.create_dataset('Idev', data=d_i) 314 312 i_dev_entry.attrs['units'] = data.I_unit 315 if not all(data.dqx_data == [None]):313 if data.dqx_data is not None and not all(data.dqx_data == [None]): 316 314 qx_entry.attrs['resolutions'] = 'dQx' 317 315 dqx_entry = data_entry.create_dataset('dQx', data=data.dqx_data) 318 316 dqx_entry.attrs['units'] = data.Q_unit 319 if not all(data.dqy_data == [None]):317 if data.dqy_data is not None and not all(data.dqy_data == [None]): 320 318 qy_entry.attrs['resolutions'] = 'dQy' 321 319 dqy_entry = data_entry.create_dataset('dQy', data=data.dqy_data)
Note: See TracChangeset
for help on using the changeset viewer.