- Timestamp:
- Aug 19, 2016 4: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
- Location:
- src/sas
- Files:
-
- 2 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 -
src/sas/sasgui/perspectives/file_converter/converter_panel.py
redf0e06 r346d56e 364 364 for key, value in metadata.iteritems(): 365 365 setattr(dataset[0], key, value) 366 if self.run != []: 367 run_number = self.run[0] 368 dataset[0].run_name[run_number] = self.run_name 366 369 367 370 w = NXcanSASWriter() … … 463 466 self.q_input.SetPath("") 464 467 self.q_input.Disable() 465 # self.radiation_input.Disable()466 # self.metadata_section.Collapse()467 # self.on_collapsible_pane(None)468 # self.metadata_section.Disable()469 468 self.output.SetWildcard("NXcanSAS HDF5 File (*.h5)|*.h5") 470 469 else:
Note: See TracChangeset
for help on using the changeset viewer.