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

Fix LOQ Batch reduction issues #18888

Merged
merged 7 commits into from Feb 23, 2017
Merged

Conversation

AntonPiccardoSelg
Copy link
Contributor

@AntonPiccardoSelg AntonPiccardoSelg commented Feb 16, 2017

Fixes a set of batch mode related issues found by Steve King.

The fix here adresses:

  • FileFinder being sensitive to file extensions
  • Wrong file suffix for output workspace
  • Missing geometry options for SaveCanSAS1D

The fixes are being validated by Steve King -- Steve King wrote:

So I hereby validate the three issues in the ticket… but I have discovered a new, or perhaps it is unsolved, issue that explains the mysterious Q-range…

The subsequent issue is addressed here: #18926

To test:

Test LOQ

Steve King's LOQ instrument was having the issues so, let's test this first.
The test data can be found here: \\olympic\Babylon5\Scratch\Anton\LOQ_Batch_BUG_2
Make sure it is in your Mantid path

  1. Open the ISIS SANS GUI
  2. Set the instrument to LOQ
  3. Set the user file to USER_LOQ_165B_M3_XinXpress_4mm_Changer_MAIN.txt
  4. In the save options enable CanSAS (1D)
  5. Select the Batch mode button
  6. Click browse and select the csv file: reduce-nimrod-check-samples-main.csv
    • Confirm that the entries in user_file column don't have a .txt extension
  7. Press 1DReduce
    • Confirm that there are no errors
    • Confirm that the output of the reduction, ie workspaces with the name Sample1_600C_* contain the suffix main. You will see it twice here since the output name was specified as Sample1_600C_main which then gets a suffix _main. The important bit is that there is a suffix _main
  8. Load the batch file reduce-nimrod-check-samples-hab.csv
    • Confirm that the entries in user_file column don't have a .txt extension
  9. Press 1DReduce
    • Confirm that there are no errors
    • Confirm that the output of the reduction, ie workspaces with the name Sample1_600C_hab* contain the suffix _hab. You will see it twice here since the output name was specified as Sample1_600C_hab which then gets a suffix _hab. The important bit is that there is a suffix _hab
  10. Create a plot for Sample1_600C_main_main and Sample1_600C_hab_hab.
  • Confirm the q-range for Sample1_600C_main_main is .007 to 0.255
  • Confirm the q-range for Sample1_600C_hab_hab is .1125 to 1.4
  1. The results were saved out in the CanSAS1D format. Open the file Sample1_600C_hab_hab.xml in a text editor.
  • Confirm that there is an entry
<SAScollimation>
  <aperture name="Disc">
    <size>
      <x unit="mm">4.000000</x>
      <y unit="mm">4.000000</y>
    </size>
   </aperture>
</SAScollimation>
  • Confirm that there is an entry:
<SASsample>
  <ID>Xin_Sample1_1200_2h_BQ_600C_2h_BQ_4mm_SANS</ID>
  <thickness unit="mm">1.550000</thickness>
</SASsample>

Test SANS2D

Please find the releveant test data here: \olympic\Babylon5\Scratch\Anton\SANS2DTUBES_Batch_BUG
Please make sure that the data is in your path.

  1. Open the ISIS SANS GUI
  2. Set the instrument to SANS2DTUBES
  3. Set the user file to: USER_SANS2D_154E_2p4_4m_M3_Xpress_8mm_SampleChanger.txt
  4. Select the Batch mode button
  5. Click browse and select the csv file: batchTest.csv
    • Confirm that the entries in user_file column don't have a .txt extension
  6. Press 1DReduce
    • Confirm that there are no errors
    • Confirm that the output of the reduction with the name test_file_rear exists. The important thing here is the suffix _rear.
  7. Load the batch file batchTestFront.csv
    • Confirm that the entries in user_file column don't have a .txt extension
  8. Press 1DReduce
    • Confirm that there are no errors
    • Confirm that the output of the reduction with the name test_file_front exists. The important thing here is the suffix _front.
  9. The results were saved out in the CanSAS1D format. Open the file test_file_rear.xml in a text editor.
  • Confirm that there is an entry
<SAScollimation>
  <aperture name="Disc">
    <size>
      <x unit="mm">8.000000</x>
      <y unit="mm">8.000000</y>
    </size>
   </aperture>
</SAScollimation>
  • Confirm that there is an entry:
<SASsample>
  <ID>XB1690177 1 Lipo _SANS</ID>
  <thickness unit="mm">2.000000</thickness>
</SASsample>

Fixes #18877

Release notes

Please see here


Reviewer

Please comment on the following (full description):

Code Review
  • Is the code of an acceptable quality?
  • Does the code conform to the coding standards? Is it well structured with small focussed classes/methods/functions?
  • Are there unit/system tests in place? Are the unit tests small and test the a class in isolation?
  • If there are changes in the release notes then do they describe the changes appropriately?
Functional Tests
  • Do changes function as described? Add comments below that describe the tests performed?

  • How do the changes handle unexpected situations, e.g. bad input?

  • Has the relevant documentation been added/updated?

  • Is user-facing documentation written in a user-friendly manner?

  • Has developer documentation been updated if required?

  • Does everything look good? Comment with the ship it emoji but don't merge. A member of @mantidproject/gatekeepers will take care of it.

@AntonPiccardoSelg AntonPiccardoSelg added SANS Issues and pull requests related to SANS Bug Issues and pull requests that are regressions or would be considered a bug by users (e.g. crashing) Patch Candidate Urgent issues that must be included in a patch following a release State: In Progress labels Feb 16, 2017
@AntonPiccardoSelg AntonPiccardoSelg added this to the Release 3.10 milestone Feb 16, 2017
@AntonPiccardoSelg AntonPiccardoSelg added High Priority An issue or pull request that if not addressed is severe enough to postponse a release. and removed State: In Progress labels Feb 17, 2017
@martyngigg martyngigg self-assigned this Feb 21, 2017
@martyngigg
Copy link
Member

Code checks out and the functionality works as expected. The workspace names are now appropriate to what has been reduced and allow easier working with multiple instruments.

I looked at the produced CanSAS files and the geometry information is now there too.

:shipit:

@AndreiSavici
Copy link
Member

@AntonPiccardoSelg please check merge conflicts

@peterfpeterson peterfpeterson merged commit bc7aed4 into master Feb 23, 2017
@peterfpeterson peterfpeterson deleted the 18877_fix_user_file_finding branch February 23, 2017 15:27
martyngigg added a commit that referenced this pull request Feb 23, 2017
Refs #18877 Add handling of missing file extension

(cherry picked from commit 6977e9e)

Refs #18877 Add correct workspace name for batch reduce

(cherry picked from commit 78de78b)

Refs #18877 Add metadata to saving

(cherry picked from commit c517eb0)

Refs #18877 Fix trailing white space

(cherry picked from commit d135f78)

Refs #188877 Grab geom info at right point

(cherry picked from commit bc7aed4)

Add patch release note
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. Patch Candidate Urgent issues that must be included in a patch following a release SANS Issues and pull requests related to SANS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

User file not detected in batch reduction mode when extension is missing in ISIS SANS GUI
4 participants