Changeset 346d56e in sasview for src/sas/sascalc/file_converter
- Timestamp:
- Aug 19, 2016 6:43:06 AM (8 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, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- a14fa99
- Parents:
- 995f4eb
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sascalc/file_converter/nxcansas_writer.py
r9f4d891 r346d56e 62 62 run_name = data_info.run_name[run_number] 63 63 64 import pdb; pdb.set_trace() 65 64 66 f = h5py.File(filename, 'w') 65 67 sasentry = f.create_group('sasentry01') … … 90 92 if getattr(data_info.sample, key) is not None: 91 93 sample_entry.create_dataset(key, 92 data= np.array([getattr(data_info.sample, key)]))94 data=_h5_float(getattr(data_info.sample, key))) 93 95 94 96 instrument_entry = sasentry.create_group('sasinstrument') … … 183 185 I = np.reshape(data.data, (n_rows, n_cols)) 184 186 dI = np.zeros((n_rows, n_cols)) 185 # import pdb; pdb.set_trace()186 187 if not all(data.err_data == [None]): 187 188 dI = np.reshape(data.err_data, (n_rows, n_cols)) 188 189 qx = np.reshape(data.qx_data, (n_rows, n_cols)) 189 190 qy = np.reshape(data.qy_data, (n_rows, n_cols)) 191 190 192 I_entry = data_entry.create_dataset('I', data=I) 191 193 I_entry.attrs['units'] = data.I_unit
Note: See TracChangeset
for help on using the changeset viewer.