Changeset a58b5a0 in sasview for src/sas/sascalc


Ignore:
Timestamp:
Jan 9, 2018 12:13:25 PM (7 years ago)
Author:
krzywon
Branches:
master, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
b6b81a3
Parents:
340291a
Message:

Update documentation to match code.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sascalc/dataloader/file_reader_base_class.py

    r340291a ra58b5a0  
    209209        """ 
    210210        Remove data points where nan is loaded 
    211         :param data: 1D data set 
    212         :return: data with mask=0 for any value of nan in data .x, .y, .dx, .dy 
     211        :param data: 1D or 2D data object 
     212        :return: data with nan points removed 
    213213        """ 
    214214        if isinstance(data, Data1D): 
     
    218218        else: 
    219219            return data 
     220        # Make array of good points - all others will be removed 
    220221        good = np.isfinite(getattr(data, fields[0])) 
    221222        for name in fields[1:]: 
    222223            array = getattr(data, name) 
    223224            if array is not None: 
    224                 # Set mask[i] to 0 when data.<param> is nan 
     225                # Update good points only if not already changed 
    225226                good &= np.isfinite(array) 
    226227        if not np.all(good): 
Note: See TracChangeset for help on using the changeset viewer.