Ticket #4197 (closed: fixed)
SANS: intepolation bug
Reported by: | Anders Markvardsen | Owned by: | Anders Markvardsen |
---|---|---|---|
Priority: | major | Milestone: | Release 2.0 |
Component: | Mantid | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Tester: | Karl Palmen |
Description
1) Put attached files in the same directory 1) Open ISIS SANS GUI 2) select mask file from directory
From
isis\inst$\NDXSANS2D\Instrument\data\cycle_11_2
select runs from GUI: Scattering sample=9694 Transmission sample=9694 Direct sample=9694
3) Hit load button 4) hit Reduce 1D button
After a little while you get the error:
Error in rebin function: At least one x-value to intepolate to is outside the range of the original data Error in execution of algorithm InterpolatingRebin: At least one x-value to intepolate to is outside the range of the original data
You can get around this error by in the Analysis Detail tab un-select for transmission intepolate.
Understand this bug and fix it
Attachments
Change History
Changed 9 years ago by Anders Markvardsen
- Attachment MASKSANS2D_112ii_6m_commissioning_M1_M4.txt added
Changed 9 years ago by Anders Markvardsen
- Attachment directM1_9672_6m_08Aug11.DAT added
file required by mask file
comment:1 Changed 9 years ago by Anders Markvardsen
The error is associated with a maximum wavelength picked in user interface of 15.75 AA which is bigger than the maximum wavelength of monitor 1 equal 15.6555 AA. Sarah will come back to me with some more data about this.
Meanwhile tried to cutoff interpolation if the above is the case with
if self.interpolate:
inX = tmpWS.readX() outX = tmpWS.readX() if outX[0] < inX[0] or outX[len(outX)-1] > inX[len(inX)-1]:
InterpolatingRebin(tmpWS, tmpWS, wavbining)
else:
_printMessage('\n\nKKKKKKKKKKKKKKKKKKKKKKKKKK\n\n') Rebin(tmpWS, tmpWS, wavbining)
although with this do Rebin now some other python exception is thrown somewhere else...
Question to be put forward to scientists is 1) can I truncate analysis to shorter wavelength full stop? 2) or should InterporationRebin algorithm be extended to interpolate outside data range?
For now put this ticket to medium priority
comment:3 Changed 9 years ago by Anders Markvardsen
Improve error message when interpolation fails. Re #4197
Changeset: 7075e290a93415c247c5c65c9f405ae8b91647d2
comment:4 Changed 9 years ago by Anders Markvardsen
- Status changed from new to accepted
From discussion with Sarah decision for now was let InterpolateRebin keep throwing an exception of range to interpolate to larger than original data range, but with an improved error message to user. So if ran
1) Put attached files in the same directory
1) Open ISIS SANS GUI
2) select mask file from directory
3) From isis\inst$\NDXSANS2D\Instrument\data\cycle_11_2 select runs from GUI: Scattering sample=9694 Transmission sample=9694 Direct sample=9694
3) Hit load button
4) hit Reduce 1D button
Still get an error message but now explains why this is in results log.
comment:5 Changed 9 years ago by Anders Markvardsen
- Status changed from accepted to verify
- Resolution set to fixed
comment:6 Changed 9 years ago by Robert Whitley
- Status changed from verify to verifying
- Tester set to Robert Whitley
comment:7 Changed 9 years ago by Robert Whitley
- Status changed from verifying to verify
- Tester Robert Whitley deleted
comment:8 Changed 9 years ago by Karl Palmen
- Status changed from verify to verifying
- Tester set to Karl Palmen
comment:9 Changed 9 years ago by Karl Palmen
- Status changed from verifying to verify
- Tester Karl Palmen deleted
When I attempt to do what is described at the start of the ticket, I get script error. The result log also has error messages some of which suggest that (one of) the attached files has been corrupted by trac (reference to this ticket found).
comment:10 Changed 9 years ago by Karl Palmen
- Status changed from verify to verifying
- Tester set to Karl Palmen
comment:11 Changed 9 years ago by Karl Palmen
- Status changed from verifying to reopened
- Resolution fixed deleted
Test worked when run numbers were changed to 9649, 9649, 9648. Reported bug occurred
Error in rebin function: At least one x-value to interpolate to is outside the range of the original data. original data range: 0.00078277511540932238 to 15.655502308186447 range to try to interpolate to 1.75 to 15.75 Error in execution of algorithm InterpolatingRebin: At least one x-value to interpolate to is outside the range of the original data. original data range: 0.00078277511540932238 to 15.655502308186447 range to try to interpolate to 1.75 to 15.75
comment:13 Changed 9 years ago by Anders Markvardsen
- Status changed from accepted to verify
- Resolution set to fixed
The above is exactly what I have hoped the user would see
comment:14 Changed 9 years ago by Karl Palmen
- Status changed from verify to verifying
This error massage was what was required and not the bug.
comment:16 Changed 5 years ago by Stuart Campbell
This ticket has been transferred to github issue 5044
mask file