mantid icon indicating copy to clipboard operation
mantid copied to clipboard

Focus uses SaveGSS with Append=True

Open DanielMurphy22 opened this issue 2 years ago • 0 comments

Found while designing new GSASII tab for Engineering Diffraction interface

Describe the bug If the same focus routine is run multiple times, then the output .gss file will end up with too many banks. I think this is because SaveGSS() has the default Append=True. If this was set to false when this algorithm is called in EnggUtils.py then the immediate problem maybe be solved.

I have put this one-line fix into my local branch 33048_GSAS_scripting, but I wonder if this behaviour is in anyway relied upon in anyway. I think this appending of extra banks of data is only a problem for the .gss files as SaveFocusedXYE has the default Append = False (a little annoying these similar algorithms are not aligned, but maybe for a good reason??)

To Reproduce Open Engineering Diffraction interface Set the RB number in the top left to Append_banks_bug Create a new calibration with cycle_19_1/ENGINX00305738.nxs Run a focus with

  • sample: cycle_19_1/ENGINX00305761.nxs
  • vanadium: cycle_19_1/ENGINX00307521.nxs Check your output folder (save location in settings) Engineering_Mantid/User/Append_banks_bug/Focus and open the .gss file in there -> open the all_banks file in a text editor and there should be BANK 1 and BANK 2. Run the focus again. And check the .gss file contents again -> there is BANK 1 BANK 2 BANK1 BANK 2.

This problem is also reproduced with a cropped calibration (say to north bank and looking at the bank_1.gss file.

Expected behavior all_banks .gss file gets BANK 1 and BANK 2, individual bank focused .gss files get either BANK 1 or BANK 2

Platform/Version (please complete the following information):

  • OS: All
  • OS Version:
  • Mantid Version my local branch is probably old from before 6.4

DanielMurphy22 avatar Aug 04 '22 12:08 DanielMurphy22