Changeset 8f12385 in sasview for DataLoader
- Timestamp:
- Mar 29, 2011 4:57:49 PM (14 years ago)
- 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:
- ddeeb02
- Parents:
- 21969a4a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
DataLoader/manipulations.py
r729bcf6 r8f12385 418 418 self.bin_width = bin_width 419 419 420 def __call__(self, data2D ):420 def __call__(self, data2D, ismask=False): 421 421 """ 422 422 Perform circular averaging on the data … … 431 431 qx_data = data2D.qx_data[numpy.isfinite(data2D.data)] 432 432 err_data = data2D.err_data[numpy.isfinite(data2D.data)] 433 mask_data = data2D.mask[numpy.isfinite(data2D.data)] 433 434 434 435 dq_data = None … … 489 490 y_counts = numpy.zeros(nbins) 490 491 491 for npt in range(len(data)): 492 for npt in range(len(data)): 493 494 if ismask and not mask_data[npt]: 495 continue 496 492 497 frac = 0 493 498 … … 540 545 x = x / y_counts 541 546 idx = (numpy.isfinite(y)) & (numpy.isfinite(x)) 547 542 548 if err_x != None: 543 549 d_x = err_x[idx] / y_counts[idx]
Note: See TracChangeset
for help on using the changeset viewer.