Changeset 7432acb in sasview for src/sas/sascalc/dataloader/manipulations.py
- Timestamp:
- Apr 9, 2017 6:11:31 AM (8 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.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 45dffa69
- Parents:
- ac07a3a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sascalc/dataloader/manipulations.py
r235f514 r7432acb 422 422 423 423 # Get the dq for resolution averaging 424 if data2D.dqx_data != None and data2D.dqy_data !=None:424 if data2D.dqx_data is not None and data2D.dqy_data is not None: 425 425 # The pinholes and det. pix contribution present 426 426 # in both direction of the 2D which must be subtracted when … … 508 508 else: 509 509 err_y[i_q] += frac * frac * err_data[npt] * err_data[npt] 510 if dq_data !=None:510 if dq_data is not None: 511 511 # To be consistent with dq calculation in 1d reduction, 512 512 # we need just the averages (not quadratures) because … … 523 523 err_y[n] = -err_y[n] 524 524 err_y[n] = math.sqrt(err_y[n]) 525 #if err_x !=None:525 #if err_x is not None: 526 526 # err_x[n] = math.sqrt(err_x[n]) 527 527 … … 532 532 idx = (numpy.isfinite(y)) & (numpy.isfinite(x)) 533 533 534 if err_x !=None:534 if err_x is not None: 535 535 d_x = err_x[idx] / y_counts[idx] 536 536 else: … … 777 777 778 778 # Get the dq for resolution averaging 779 if data2D.dqx_data != None and data2D.dqy_data !=None:779 if data2D.dqx_data is not None and data2D.dqy_data is not None: 780 780 # The pinholes and det. pix contribution present 781 781 # in both direction of the 2D which must be subtracted when … … 895 895 y_err[i_bin] += frac * frac * err_data[n] * err_data[n] 896 896 897 if dq_data !=None:897 if dq_data is not None: 898 898 # To be consistent with dq calculation in 1d reduction, 899 899 # we need just the averages (not quadratures) because … … 925 925 y_err[y_err == 0] = numpy.average(y_err) 926 926 idx = (numpy.isfinite(y) & numpy.isfinite(y_err)) 927 if x_err !=None:927 if x_err is not None: 928 928 d_x = x_err[idx] / y_counts[idx] 929 929 else:
Note: See TracChangeset
for help on using the changeset viewer.