Changeset 1cad8a4 in sasview for src/sas


Ignore:
Timestamp:
Dec 6, 2016 9:06:16 AM (8 years ago)
Author:
jhbakker
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:
f668101
Parents:
632e2e8
Message:

cosmetic change to qsmearing.py

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sascalc/data_util/qsmearing.py

    r632e2e8 r1cad8a4  
    6161    #if data.dx is not None and data.meta_data['loader']=='SESANS': 
    6262    if data.dx is not None and data.isSesans: 
    63         if data.dx[0] > 0.0: 
     63        #if data.dx[0] > 0.0: 
     64        if numpy.size(data.dx[data.dx <= 0]) == 0: 
    6465            _found_sesans = True 
    65  
     66        #if data.dx[0] <= 0.0: 
     67        if numpy.size(data.dx[data.dx <= 0]) > 0: 
     68            raise ValueError('one or more of your dx values are negative, please check the data file!') 
    6669    if _found_sesans == True: 
    6770        #Pre-compute the Hankel matrix (H) 
     
    120123        self.resolution = resolution 
    121124        if hasattr(self.resolution, 'data'): 
    122             if self.resolution.data.meta_data['loader'] == 'SESANS': 
     125            if self.resolution.data.meta_data['loader'] == 'SESANS': # Always True if file extension is '.ses'! 
    123126                self.offset = 0 
    124127            # This is default behaviour, for future resolution/transform functions this needs to be revisited. 
Note: See TracChangeset for help on using the changeset viewer.