Changeset 88d85c6 in sasview
- Timestamp:
- Aug 17, 2016 11:55:19 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:
- 1ddf8f0
- Parents:
- 54ba66e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sascalc/dataloader/readers/cansas_reader_HDF5.py
r54ba66e r88d85c6 184 184 elif key == u'Title' and self.parent_class == u'SASsample': 185 185 self.current_datainfo.sample.name = data_point 186 elif key == u'name' and self.parent_class == u'SASsample': 187 self.current_datainfo.sample.name = data_point 186 188 elif key == u'thickness' and self.parent_class == u'SASsample': 187 189 self.current_datainfo.sample.thickness = data_point … … 207 209 self.process.name = data_point 208 210 elif key == u'Title' and self.parent_class == u'SASprocess': 211 self.process.name = data_point 212 elif key == u'name' and self.parent_class == u'SASprocess': 209 213 self.process.name = data_point 210 214 elif key == u'description' and self.parent_class == u'SASprocess': … … 433 437 sample_entry = sasentry.create_group('sassample') 434 438 sample_entry.attrs['canSAS_class'] = 'SASsample' 435 sample_entry.attrs['name'] = data_info.sample.name 436 sample_entry['ID'] = _h5_string(data_info.sample.name) 439 sample_entry['name'] = _h5_string(data_info.sample.name) 437 440 sample_attrs = ['thickness', 'temperature'] 438 441 for key in sample_attrs: 439 442 if getattr(data_info.sample, key) is not None: 440 443 sample_entry.create_dataset(key, data=np.array([getattr(data_info.sample, key)])) 441 # sample_entry[key] = np.array(getattr(data_info.sample, key),442 # dtype=np.float32)443 444 444 445 instrument_entry = sasentry.create_group('sasinstrument') … … 472 473 detector_entry = instrument_entry.create_group( 473 474 'sasdetector{0:0=2d}'.format(i)) 474 detector_entry.attrs['ca snSAS_class'] = 'SASdetector'475 detector_entry.attrs['canSAS_class'] = 'SASdetector' 475 476 if det_info.distance is not None: 476 477 detector_entry['SDD'] = det_info.distance … … 482 483 else: 483 484 detector_entry = instrument_entry.create_group('sasdetector01') 484 detector_entry.attrs['ca snSAS_class'] = 'SASdetector'485 detector_entry.attrs['canSAS_class'] = 'SASdetector' 485 486 detector_entry.attrs['name'] = '' 486 487
Note: See TracChangeset
for help on using the changeset viewer.