Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strange NaN issues with Stitch1D #10797

Closed
1 task done
OwenArnold opened this issue Jul 17, 2014 · 1 comment
Closed
1 task done

Strange NaN issues with Stitch1D #10797

OwenArnold opened this issue Jul 17, 2014 · 1 comment
Assignees
Labels
Framework Issues and pull requests related to components in the Framework High Priority An issue or pull request that if not addressed is severe enough to postponse a release.
Milestone

Comments

@OwenArnold
Copy link
Contributor

This ticket is blocked by :

The following is a script reported by an scientist.

#!python
# Load SURF00110504, SURF00110503. SURF00110505 from ICAT
RenameWorkspace('SURF00110504', OutputWorkspace='_110504')
RenameWorkspace('SURF00110503', OutputWorkspace='_110503')
RenameWorkspace('SURF00110505', OutputWorkspace='_110505')
CreateSingleValuedWorkspace(OutputWorkspace='__tmp_binary_operation_double')
Plus(LHSWorkspace='__tmp_binary_operation_double',RHSWorkspace='_110504',OutputWorkspace='__python_op_tmp0')
ConvertUnits(InputWorkspace='__python_op_tmp0',OutputWorkspace='sum_wavelength',Target='Wavelength',AlignBins='1')
CropWorkspace(InputWorkspace='sum_wavelength',OutputWorkspace='_monitor_ws',StartWorkspaceIndex='1',EndWorkspaceIndex='1')
CloneWorkspace(InputWorkspace='sum_wavelength',OutputWorkspace='_in_rng')
CropWorkspace(InputWorkspace='_in_rng',OutputWorkspace='_in_rng',StartWorkspaceIndex='2',EndWorkspaceIndex='2')
CropWorkspace(InputWorkspace='_in_rng',OutputWorkspace='_detector_ws',XMin='0.5',XMax='9')
CalculateFlatBackground(InputWorkspace='_monitor_ws',OutputWorkspace='_monitor_ws',StartX='7.5999999999999996',EndX='8.5',WorkspaceIndexList='0')
RebinToWorkspace(WorkspaceToRebin='_monitor_ws',WorkspaceToMatch='_detector_ws',OutputWorkspace='_I0P')
Integration(InputWorkspace='_I0P',OutputWorkspace='_monInt',RangeLower='4',RangeUpper='6')
Divide(LHSWorkspace='_detector_ws',RHSWorkspace='_monInt',OutputWorkspace='IvsLam')
CreateSingleValuedWorkspace(OutputWorkspace='__tmp_binary_operation_double')
Plus(LHSWorkspace='__tmp_binary_operation_double',RHSWorkspace='_110503',OutputWorkspace='__python_op_tmp1')
ConvertUnits(InputWorkspace='__python_op_tmp1',OutputWorkspace='sum_wavelength',Target='Wavelength',AlignBins='1')
CropWorkspace(InputWorkspace='sum_wavelength',OutputWorkspace='_monitor_ws',StartWorkspaceIndex='1',EndWorkspaceIndex='1')
CloneWorkspace(InputWorkspace='sum_wavelength',OutputWorkspace='_in_rng')
CropWorkspace(InputWorkspace='_in_rng',OutputWorkspace='_in_rng',StartWorkspaceIndex='2',EndWorkspaceIndex='2')
CropWorkspace(InputWorkspace='_in_rng',OutputWorkspace='_detector_ws',XMin='0.5',XMax='9')
CalculateFlatBackground(InputWorkspace='_monitor_ws',OutputWorkspace='_monitor_ws',StartX='7.5999999999999996',EndX='8.5',WorkspaceIndexList='0')
RebinToWorkspace(WorkspaceToRebin='_monitor_ws',WorkspaceToMatch='_detector_ws',OutputWorkspace='_i0p_trans')
Integration(InputWorkspace='_i0p_trans',OutputWorkspace='_mon_int_trans',RangeLower='4',RangeUpper='6')
Divide(LHSWorkspace='_detector_ws',RHSWorkspace='_mon_int_trans',OutputWorkspace='transWS')
RebinToWorkspace(WorkspaceToRebin='transWS',WorkspaceToMatch='IvsLam',OutputWorkspace='_i_vs_lam_trans')
Divide(LHSWorkspace='IvsLam',RHSWorkspace='_i_vs_lam_trans',OutputWorkspace='_i_vs_lam_corrected')
RenameWorkspace(InputWorkspace='_i_vs_lam_corrected',OutputWorkspace='IvsLam')
MoveInstrumentComponent(Workspace='IvsLam',ComponentName='point-detector',Y='0.031287739139067995',Z='11.43',RelativePosition='0')
ConvertUnits(InputWorkspace='IvsLam',OutputWorkspace='IvsQ',Target='MomentumTransfer')
RenameWorkspace(InputWorkspace='IvsQ',OutputWorkspace='110504_IvsQ')
CreateSingleValuedWorkspace(OutputWorkspace='__tmp_binary_operation_double')
Plus(LHSWorkspace='__tmp_binary_operation_double',RHSWorkspace='_110505',OutputWorkspace='__python_op_tmp0')
ConvertUnits(InputWorkspace='__python_op_tmp0',OutputWorkspace='sum_wavelength',Target='Wavelength',AlignBins='1')
CropWorkspace(InputWorkspace='sum_wavelength',OutputWorkspace='_monitor_ws',StartWorkspaceIndex='1',EndWorkspaceIndex='1')
CloneWorkspace(InputWorkspace='sum_wavelength',OutputWorkspace='_in_rng')
CropWorkspace(InputWorkspace='_in_rng',OutputWorkspace='_in_rng',StartWorkspaceIndex='2',EndWorkspaceIndex='2')
CropWorkspace(InputWorkspace='_in_rng',OutputWorkspace='_detector_ws',XMin='0.5',XMax='9')
CalculateFlatBackground(InputWorkspace='_monitor_ws',OutputWorkspace='_monitor_ws',StartX='7.5999999999999996',EndX='8.5',WorkspaceIndexList='0')
RebinToWorkspace(WorkspaceToRebin='_monitor_ws',WorkspaceToMatch='_detector_ws',OutputWorkspace='_I0P')
Integration(InputWorkspace='_I0P',OutputWorkspace='_monInt',RangeLower='4',RangeUpper='6')
Divide(LHSWorkspace='_detector_ws',RHSWorkspace='_monInt',OutputWorkspace='IvsLam')
RebinToWorkspace(WorkspaceToRebin='transWS',WorkspaceToMatch='IvsLam',OutputWorkspace='_i_vs_lam_trans')
Divide(LHSWorkspace='IvsLam',RHSWorkspace='_i_vs_lam_trans',OutputWorkspace='_i_vs_lam_corrected')
RenameWorkspace(InputWorkspace='_i_vs_lam_corrected',OutputWorkspace='IvsLam')
MoveInstrumentComponent(Workspace='IvsLam',ComponentName='point-detector',Y='0.058102261279893055',Z='11.43',RelativePosition='0')
ConvertUnits(InputWorkspace='IvsLam',OutputWorkspace='IvsQ',Target='MomentumTransfer')
RenameWorkspace(InputWorkspace='IvsQ',OutputWorkspace='110505_IvsQ')
Rebin(InputWorkspace='110504_IvsQ',OutputWorkspace='110504_IvsQ_binned',Params='0.011,-0.0376509,0.051')
Rebin(InputWorkspace='110505_IvsQ',OutputWorkspace='110505_IvsQ_binned',Params='0.02,-0.0376509,0.142471')
CloneWorkspace(InputWorkspace='110504_IvsQ_binned',OutputWorkspace='currentSum')
Stitch1D(LHSWorkspace='currentSum',RHSWorkspace='110505_IvsQ_binned',OutputWorkspace='currentSum')
RenameWorkspace(InputWorkspace='currentSum',OutputWorkspace='110504_50')
plotSpectrum('110504_50')

The plot is bad because of the first y-value in 110505, which is a NAN. We should be ignoring this! Anyway, changing

#!python
Rebin(InputWorkspace='110505_IvsQ',OutputWorkspace='110505_IvsQ_binned',Params='0.02,-0.0376509,0.142471')

to

#!python
Rebin(InputWorkspace='110505_IvsQ',OutputWorkspace='110505_IvsQ_binned',Params='0.0206,-0.0376509,0.142471')

Fixes the issue of the discontinuity at the intersection, but we should really be keeping Nans post processing.

@OwenArnold
Copy link
Contributor Author

This issue was originally trac ticket 9955

@OwenArnold OwenArnold added High Priority An issue or pull request that if not addressed is severe enough to postponse a release. Framework Issues and pull requests related to components in the Framework labels Jun 3, 2015
@OwenArnold OwenArnold self-assigned this Jun 3, 2015
@OwenArnold OwenArnold added this to the Release 3.2.1 milestone Jun 3, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Framework Issues and pull requests related to components in the Framework High Priority An issue or pull request that if not addressed is severe enough to postponse a release.
Projects
None yet
Development

No branches or pull requests

1 participant