Changeset 4026380 in sasview for DataLoader/data_info.py


Ignore:
Timestamp:
Nov 14, 2009 10:33:21 AM (15 years ago)
Author:
Mathieu Doucet <doucetm@…>
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, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
fd6b789
Parents:
c13b8cc
Message:

dataloader: improved invariant

File:
1 edited

Legend:

Unmodified
Added
Removed
  • DataLoader/data_info.py

    rfe78c7b r4026380  
    564564        return _str 
    565565 
     566    def is_slit_smeared(self): 
     567        """ 
     568            Check whether the data has slit smearing information 
     569             
     570            @return: True is slit smearing info is present, False otherwise 
     571        """ 
     572        def _check(v):             
     573            if (v.__class__==list or v.__class__==numpy.ndarray) \ 
     574                and len(v)>0 and min(v)>0: 
     575                return True 
     576             
     577            return False 
     578         
     579        return _check(self.dxl) or _check(self.dxw) 
     580         
    566581    def clone_without_data(self, length=0, clone=None): 
    567582        """ 
Note: See TracChangeset for help on using the changeset viewer.