Changeset a58b5a0 in sasview
- Timestamp:
- Jan 9, 2018 12:13:25 PM (7 years ago)
- 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
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sascalc/dataloader/file_reader_base_class.py
r340291a ra58b5a0 209 209 """ 210 210 Remove data points where nan is loaded 211 :param data: 1D data set212 :return: data with mask=0 for any value of nan in data .x, .y, .dx, .dy211 :param data: 1D or 2D data object 212 :return: data with nan points removed 213 213 """ 214 214 if isinstance(data, Data1D): … … 218 218 else: 219 219 return data 220 # Make array of good points - all others will be removed 220 221 good = np.isfinite(getattr(data, fields[0])) 221 222 for name in fields[1:]: 222 223 array = getattr(data, name) 223 224 if array is not None: 224 # Set mask[i] to 0 when data.<param> is nan225 # Update good points only if not already changed 225 226 good &= np.isfinite(array) 226 227 if not np.all(good):
Note: See TracChangeset
for help on using the changeset viewer.