Changeset 9687d58 in sasview for src/sas/sascalc/dataloader/readers/cansas_reader_HDF5.py
- Timestamp:
- Apr 10, 2017 4:01:46 AM (8 years ago)
- Branches:
- 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
- Children:
- 6c8fb2c
- Parents:
- 9208346 (diff), c6f3aec (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sascalc/dataloader/readers/cansas_reader_HDF5.py
r1b06e13a r9687d58 23 23 24 24 Any number of SASdata sets may be present in a SASentry and the data within can be either 1D I(Q) or 2D I(Qx, Qy). 25 <<<<<<< HEAD 26 ======= 27 28 Also supports reading NXcanSAS formatted HDF5 files 29 >>>>>>> master 25 30 26 31 :Dependencies: … … 76 81 ## Add the last data set to the list of outputs 77 82 self.add_data_set() 83 ## Close the data file 84 self.raw_data.close() 78 85 ## Return data set(s) 79 86 return self.output … … 189 196 190 197 ## Sample Information 191 elif key == u'Title' and self.parent_class == u'SASsample': 198 elif key == u'Title' and self.parent_class == u'SASsample': # CanSAS 2.0 format 199 self.current_datainfo.sample.name = data_point 200 elif key == u'ID' and self.parent_class == u'SASsample': # NXcanSAS format 192 201 self.current_datainfo.sample.name = data_point 193 202 elif key == u'thickness' and self.parent_class == u'SASsample': … … 213 222 elif key == u'name' and self.parent_class == u'SASprocess': 214 223 self.process.name = data_point 215 elif key == u'Title' and self.parent_class == u'SASprocess':216 self.process.name = data_point217 224 elif key == u'description' and self.parent_class == u'SASprocess': 218 225 self.process.description = data_point … … 230 237 self.trans_spectrum.wavelength.append(data_point) 231 238 232 ## Other Information239 ## Source 233 240 elif key == u'wavelength' and self.parent_class == u'SASdata': 234 241 self.current_datainfo.source.wavelength = data_point 235 self.current_datainfo.source.wavelength.unit = unit 242 self.current_datainfo.source.wavelength_unit = unit 243 elif key == u'incident_wavelength' and self.parent_class == u'SASsource': 244 self.current_datainfo.source.wavelength = data_point 245 self.current_datainfo.source.wavelength_unit = unit 246 elif key == u'wavelength_max' and self.parent_class == u'SASsource': 247 self.current_datainfo.source.wavelength_max = data_point 248 self.current_datainfo.source.wavelength_max_unit = unit 249 elif key == u'wavelength_min' and self.parent_class == u'SASsource': 250 self.current_datainfo.source.wavelength_min = data_point 251 self.current_datainfo.source.wavelength_min_unit = unit 252 elif key == u'wavelength_spread' and self.parent_class == u'SASsource': 253 self.current_datainfo.source.wavelength_spread = data_point 254 self.current_datainfo.source.wavelength_spread_unit = unit 255 elif key == u'beam_size_x' and self.parent_class == u'SASsource': 256 self.current_datainfo.source.beam_size.x = data_point 257 self.current_datainfo.source.beam_size_unit = unit 258 elif key == u'beam_size_y' and self.parent_class == u'SASsource': 259 self.current_datainfo.source.beam_size.y = data_point 260 self.current_datainfo.source.beam_size_unit = unit 261 elif key == u'beam_shape' and self.parent_class == u'SASsource': 262 self.current_datainfo.source.beam_shape = data_point 236 263 elif key == u'radiation' and self.parent_class == u'SASsource': 237 264 self.current_datainfo.source.radiation = data_point
Note: See TracChangeset
for help on using the changeset viewer.