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

Overwriting of datasets in SANS GUI when output name is set on only some rows #37356

Closed
rbauststfc opened this issue May 14, 2024 · 1 comment · Fixed by #37368
Closed

Overwriting of datasets in SANS GUI when output name is set on only some rows #37356

rbauststfc opened this issue May 14, 2024 · 1 comment · Fixed by #37368
Assignees
Labels
Bug Issues and pull requests that are regressions or would be considered a bug by users (e.g. crashing) High Priority An issue or pull request that if not addressed is severe enough to postponse a release. ISIS Team: LSS Issue and pull requests managed by the LSS subteam at ISIS Reported By User Issues that were found or highlighted by a user/scientist SANS Issues and pull requests related to SANS
Milestone

Comments

@rbauststfc
Copy link
Contributor

Original reporter: Dirk from the SANS Group at ISIS

Describe the bug

Data appears to be overwritten for rows in the SANS GUI batch table if an output name is provided for only the last row and then an earlier row is re-processed. This was originally noticed when using a summed run in a reduction, but on further investigation it doesn't appear to be limited to only summed runs.

To Reproduce

  1. Go to Interfaces -> SANS -> ISIS SANS.
  2. Use the Load User File button to load the MaskFile.toml from the TrainingCourseData.
  3. In the first row of the batch table, enter 109638 into the Sample Scatter column.
  4. Add a second row to the batch table and enter 109644 into the Sample Scatter column. In this second row also enter 109644 into the Output Name.
  5. Click Process All to reduce all the data.
  6. Once complete, plot the data from 109638_main_1D... and overplot 109644_main_1D.... You'll see a slight difference between the two curves. Leave this plot open.
  7. Now click the first row to highlight it and click the Process Selected button to re-reduce it.
  8. On the plot, both curves should now be identical and match the output of the re-reduced row.

Expected behavior

The data from the second row should not be overwritten and therefore both curves should stay as they are on the plot.

Platform/Version (please complete the following information):

  • Mantid Version - occurs in 6.7, haven't tested further back than this.
@rbauststfc rbauststfc added Bug Issues and pull requests that are regressions or would be considered a bug by users (e.g. crashing) SANS Issues and pull requests related to SANS ISIS Team: LSS Issue and pull requests managed by the LSS subteam at ISIS Reported By User Issues that were found or highlighted by a user/scientist labels May 14, 2024
@rbauststfc rbauststfc added this to the Release 6.11 milestone May 14, 2024
@rbauststfc rbauststfc self-assigned this May 14, 2024
@rbauststfc
Copy link
Contributor Author

rbauststfc commented May 14, 2024

This seems to be because of this line in the code. Basically the reduction starts by creating a main state object, as a large number of settings will be shared between all rows. Then it starts a loop to create an individual state object for each row. This is done by first copying the main state object and then overwriting any of the values that are different for that individual row. In the case of the output name, we are only overwriting the value if that row has an output name. A couple of things seem to be happening here:

  • When we set the output name on the row state object it also seems to change the value on the main state object.
  • If the main state object has picked up an output name from a previously reduced row then this will be copied across when the individual row state object is first created. If there is no new output name to replace it with then the copied across name will not be cleared. So basically rows with no output name will pick up the output names of other rows that were reduced before them.

At the moment, to ensure data is not overwritten you would need to either set output names for all rows or leave it empty for all rows.

@rbauststfc rbauststfc modified the milestones: Release 6.11, Release 6.10 May 14, 2024
@rbauststfc rbauststfc added the High Priority An issue or pull request that if not addressed is severe enough to postponse a release. label May 14, 2024
@rbauststfc rbauststfc changed the title Overwriting of datasets in SANS GUI when output name is set on only the last row Overwriting of datasets in SANS GUI when output name is set on only some rows May 15, 2024
@rbauststfc rbauststfc linked a pull request May 15, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Issues and pull requests that are regressions or would be considered a bug by users (e.g. crashing) High Priority An issue or pull request that if not addressed is severe enough to postponse a release. ISIS Team: LSS Issue and pull requests managed by the LSS subteam at ISIS Reported By User Issues that were found or highlighted by a user/scientist SANS Issues and pull requests related to SANS
Projects
Status: Done
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant