Ignore:
Timestamp:
Aug 29, 2018 8:01:23 AM (6 years ago)
Author:
Piotr Rozyczko <rozyczko@…>
Branches:
ESS_GUI, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc
Children:
9463ca2
Parents:
ce30949
git-author:
Piotr Rozyczko <rozyczko@…> (08/29/18 07:59:56)
git-committer:
Piotr Rozyczko <rozyczko@…> (08/29/18 08:01:23)
Message:

cherry picking sascalc changes from master SASVIEW-996
minor unit test fixes

File:
1 edited

Legend:

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

    rcee5c78 rb8080e1  
    157157        # Store all data 
    158158        # Store wavelength 
    159         if has_converter == True and self.current_datainfo.source.wavelength_unit != 'A': 
     159        if has_converter and self.current_datainfo.source.wavelength_unit != 'A': 
    160160            conv = Converter('A') 
    161161            wavelength = conv(wavelength, 
     
    164164 
    165165        # Store distance 
    166         if has_converter == True and detector.distance_unit != 'm': 
     166        if has_converter and detector.distance_unit != 'm': 
    167167            conv = Converter('m') 
    168168            distance = conv(distance, units=detector.distance_unit) 
     
    170170 
    171171        # Store pixel size 
    172         if has_converter == True and detector.pixel_size_unit != 'mm': 
     172        if has_converter and detector.pixel_size_unit != 'mm': 
    173173            conv = Converter('mm') 
    174174            pixel = conv(pixel, units=detector.pixel_size_unit) 
     
    191191        x_vals = np.tile(x_vals, (size_y, 1)).flatten() 
    192192        y_vals = np.tile(y_vals, (size_x, 1)).T.flatten() 
    193         if (np.all(self.current_dataset.err_data is None) 
     193        if (np.all(self.current_dataset.err_data == None) 
    194194                or np.any(self.current_dataset.err_data <= 0)): 
    195195            new_err_data = np.sqrt(np.abs(self.current_dataset.data)) 
Note: See TracChangeset for help on using the changeset viewer.