Ticket #10442 (closed: fixed)
save GSS overlapping output numbers
Reported by: | Raquel Alvarez Banos | Owned by: | Raquel Alvarez Banos |
---|---|---|---|
Priority: | minor | Milestone: | Release 3.3 |
Component: | Diffraction | Keywords: | |
Cc: | anders.markvardsen@… | Blocked By: | |
Blocking: | Tester: | Dan Nixon |
Description
To reproduce the error:
- Load spectrum 5 from dataset https://github.com/mantidproject/mantid/blob/master/Test/AutoTestData/LOQ25654.RAW
- Execute SaveGSS algorithm with the options "SplitFiles" and "MultiplyByBinWidth" ticked, and RALF format
- Check the output file. X and Y values in lines 81 and 109 are overlapped.
A subsequent execution of LoadGSS algorithm on the above file will produce an entirely different spectrum.
Change History
comment:2 Changed 6 years ago by Raquel Alvarez Banos
- Status changed from assigned to inprogress
Re #10442 SaveGSS overlapping output numbers
Changeset: 236ab1e1d8ec1bda28ddb7327b32565315e5c3c3
comment:3 Changed 6 years ago by Raquel Alvarez Banos
Re #10442 Attempting to fix cppcheck_develop errors
Changeset: dde281e9fd19bd76dcd635b3dadf7fcb171b5602
comment:4 Changed 6 years ago by Raquel Alvarez Banos
- Status changed from inprogress to verify
- Resolution set to fixed
The output overlapping numbers are caused by std::setw(18) output width in SaveGSS. When spectra have a high number of counts the output width is not enough and numbers from different columns overlap. So far, I have not been able to figure out if setw(18) is required in GSS format. If it were not, the best solution would be to set the output width to a higher value in SaveGSS. However, as I am not sure and could not find the answer in the GSAS manual, I modified LoadGSS so that rows are read as strings and then converted into double (see lines 347-351 in LoadGSS.cpp).
Tester:
- Load spectrum 1 in dataset https://github.com/mantidproject/mantid/blob/master/Test/AutoTestData/LOQ25654.RAW
- Run SaveGSS
- On the master branch, if you load the file you have just created with LoadGSS and plot the spectrum, it will be quite different from the original one.
- On this branch, both spectra will look the same.
- Try a SaveGSS/LoadGSS round trip on different datasets and check that spectra stay the same
comment:5 Changed 6 years ago by Dan Nixon
- Status changed from verify to verifying
- Tester set to Dan Nixon
comment:6 Changed 6 years ago by Dan Nixon
- Status changed from verifying to closed
Merge remote-tracking branch 'origin/bugfix/10442_SaveGSS_overlapping_output_numbers'
Full changeset: 582b3068d87f6f9fcfbf59f3a86a0d2f95cc635a