Ignore:
Timestamp:
Apr 10, 2017 4:01:46 AM (8 years ago)
Author:
Piotr Rozyczko <rozyczko@…>
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.
Message:

Merge branch 'master' into ESS_GUI

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sascalc/dataloader/readers/cansas_reader_HDF5.py

    r1b06e13a r9687d58  
    2323 
    2424    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 
    2530 
    2631    :Dependencies: 
     
    7681                ## Add the last data set to the list of outputs 
    7782                self.add_data_set() 
     83                ## Close the data file 
     84                self.raw_data.close() 
    7885        ## Return data set(s) 
    7986        return self.output 
     
    189196 
    190197                    ## 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 
    192201                        self.current_datainfo.sample.name = data_point 
    193202                    elif key == u'thickness' and self.parent_class == u'SASsample': 
     
    213222                    elif key == u'name' and self.parent_class == u'SASprocess': 
    214223                        self.process.name = data_point 
    215                     elif key == u'Title' and self.parent_class == u'SASprocess': 
    216                         self.process.name = data_point 
    217224                    elif key == u'description' and self.parent_class == u'SASprocess': 
    218225                        self.process.description = data_point 
     
    230237                        self.trans_spectrum.wavelength.append(data_point) 
    231238 
    232                     ## Other Information 
     239                    ## Source 
    233240                    elif key == u'wavelength' and self.parent_class == u'SASdata': 
    234241                        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 
    236263                    elif key == u'radiation' and self.parent_class == u'SASsource': 
    237264                        self.current_datainfo.source.radiation = data_point 
Note: See TracChangeset for help on using the changeset viewer.