- Timestamp:
- May 18, 2017 12:07:12 PM (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:
- 9e2535e
- Parents:
- 8e15dce
- git-author:
- Jeff Krzywon <krzywon@…> (05/18/17 12:07:12)
- git-committer:
- krzywon <krzywon@…> (05/18/17 12:07:12)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sascalc/dataloader/manipulations.py
r8e15dce re0ebd56 430 430 z_max = max(data2D.q_data) 431 431 z_min = min(data2D.q_data) 432 dqx_at_z_max = data2D.dqx_data[np.argmax(data2D.q_data)]433 dqx_at_z_min = data2D.dqx_data[np.argmin(data2D.q_data)]434 dqy_at_z_max = data2D.dqy_data[np.argmax(data2D.q_data)]435 dqy_at_z_min = data2D.dqy_data[np.argmin(data2D.q_data)]432 x_max = data2D.dqx_data[data2D.q_data[z_max]] 433 x_min = data2D.dqx_data[data2D.q_data[z_min]] 434 y_max = data2D.dqy_data[data2D.q_data[z_max]] 435 y_min = data2D.dqy_data[data2D.q_data[z_min]] 436 436 # Find qdx at q = 0 437 dq_overlap_x = (( dqx_at_z_min * z_max - dqx_at_z_max * z_min) /437 dq_overlap_x = ((x_min * z_max - x_max * z_min) / 438 438 (z_max - z_min)) 439 439 # when extrapolation goes wrong … … 442 442 dq_overlap_x *= dq_overlap_x 443 443 # Find qdx at q = 0 444 dq_overlap_y = (( dqy_at_z_min * z_max - dqy_at_z_max * z_min) /444 dq_overlap_y = ((y_min * z_max - y_max * z_min) / 445 445 (z_max - z_min)) 446 446 # when extrapolation goes wrong … … 453 453 # Final protection of dq 454 454 if dq_overlap < 0: 455 dq_overlap = dqy_at_z_min455 dq_overlap = y_min 456 456 dqx_data = data2D.dqx_data[np.isfinite(data2D.data)] 457 457 dqy_data = data2D.dqy_data[np.isfinite(data2D.data)] - dq_overlap … … 787 787 z_max = max(data2D.q_data) 788 788 z_min = min(data2D.q_data) 789 dqx_at_z_max = data2D.dqx_data[np.argmax(data2D.q_data)]790 dqx_at_z_min = data2D.dqx_data[np.argmin(data2D.q_data)]791 dqy_at_z_max = data2D.dqy_data[np.argmax(data2D.q_data)]792 dqy_at_z_min = data2D.dqy_data[np.argmin(data2D.q_data)]789 x_max = data2D.dqx_data[data2D.q_data[z_max]] 790 x_min = data2D.dqx_data[data2D.q_data[z_min]] 791 y_max = data2D.dqy_data[data2D.q_data[z_max]] 792 y_min = data2D.dqy_data[data2D.q_data[z_min]] 793 793 # Find qdx at q = 0 794 dq_overlap_x = (( dqx_at_z_min * z_max - dqx_at_z_max * z_min) /794 dq_overlap_x = ((x_min * z_max - x_max * z_min) / 795 795 (z_max - z_min)) 796 796 # when extrapolation goes wrong … … 799 799 dq_overlap_x *= dq_overlap_x 800 800 # Find qdx at q = 0 801 dq_overlap_y = (( dqy_at_z_min * z_max - dqy_at_z_max * z_min) /801 dq_overlap_y = ((y_min * z_max - y_max * z_min) / 802 802 (z_max - z_min)) 803 803 # when extrapolation goes wrong … … 809 809 dq_overlap = np.sqrt((dq_overlap_x + dq_overlap_y) / 2.0) 810 810 if dq_overlap < 0: 811 dq_overlap = dqy_at_z_min811 dq_overlap = y_min 812 812 dqx_data = data2D.dqx_data[np.isfinite(data2D.data)] 813 813 dqy_data = data2D.dqy_data[np.isfinite(data2D.data)] - dq_overlap
Note: See TracChangeset
for help on using the changeset viewer.