Ticket #6929 (closed: fixed)

Opened 7 years ago

Last modified 5 years ago

Use sanCAS v1.1 in SANS isis reduction

Reported by: Gesner Passos Owned by: Peter Peterson
Priority: major Milestone: Release 2.6
Component: SANS Keywords: SANS
Cc: Blocked By: #6839
Blocking: Tester: Mathieu Doucet

Description (last modified by Nick Draper) (diff)

The way I would envisage the new SaveCansas1D algorithm working is that when called to write a reduced 1D data workspace, Mantid checks to see if either or both of the transmissions (sample & can) used to calculate that data have been generated as part of the reduction process. If they have then they should be automatically inserted into the XML file. If they are not present (eg, the user has chosen to reduce data without transmisisons or has deleted both of the transmission workspaces associated with the reduction before choosing to write the file) then the file is written without any SAStransmission_spectrum blocks.

Attachments

for_can_sas_test.csv (194 bytes) - added by Gesner Passos 7 years ago.
input for testing

Change History

comment:1 Changed 7 years ago by Gesner Passos

  • Blocked By 6839 removed

(In #6839) This ticket will only implement the second version of load and save canSAS. It will let the introduction of this new feature inside the Reduction to the ticked #6929

comment:2 Changed 7 years ago by Gesner Passos

  • Status changed from new to accepted

comment:3 Changed 7 years ago by Gesner Passos

  • Blocked By 6839 added

comment:4 Changed 7 years ago by Nick Draper

  • Milestone changed from Release 2.5 to Release 2.6

Moved to r2.6 at the end of r2.5

comment:5 Changed 7 years ago by Gesner Passos

Add the transmission information to the reduced workspace

Due to some limitations imposed by the way the Singleton is used, there is no way to get the transmission workspaces after the reduction is finished from the user interface, except using the attempt to guess the name of the transmission workspaces (what we should not do). So, I propose here keeping the information about the workspaces of the transmission at the SampleLog of the Reduced workspace. This information will be them available whenever is necessary. It would even allow us to use this information inside the SaveCan algorithm itself. But, I think it would seem a litle bit of magic. So, i prefer to use it outside.

re #6929

Changeset: e1e05575f99bc5659c2a61e1b809d65f25b056f5

comment:6 Changed 7 years ago by Gesner Passos

Extend SANSBatchMode to use the transmission workspace for CanSAS

It will pass on the parameters to SaveCanSAS1D if they are available.

re #6929

Changeset: 424db0d8700aedf2ef8f8bf2fec2d48aeae4aca9

comment:7 Changed 7 years ago by Gesner Passos

Extend SingleMode to use the transmission workspace for CanSAS

It will pass on the parameters to SaveCanSAS1D if they are available. Changes on SANSRunWindow.cpp

re #6929

Changeset: 747c82c73d31e3287bf47bd2c30bd5f9e43b9f94

comment:8 Changed 7 years ago by Gesner Passos

Merge branch 'feature/6929_use_sancas_v1_1' into develop

comment:9 Changed 7 years ago by Gesner Passos

Current limitations of using SaveCanSAS in ISIS SANS:

  • Reduction in single mode, selecting both detector, will allow you to save only the Front reduction using the SaveResult on the interface. (Because you save just the last reduced workspace)
  • Reduction in single mode or batch mode, selecting merged detector, will not allow you to save transmission workspaces

I'm discussing with the interested people to decide if these limitations are acceptable.

comment:10 Changed 7 years ago by Gesner Passos

For the first issue (Both detectors selected), the user said:

I do not like this current behaviour because it could easily catch a User out.

I think what I would suggest is this: only populate the Filename box with a 
workspace name if a single detector has been reduced (front/rear/main/hab) 
**or** if it is the MERGED workspace. In the case of BOTH, leave it empty and 
force the User to select a Save algorithm.

For the second item, the merged option, the problem was that we have 2 sample and 2 transmisison, so, it was not clear which to choose. But, the user explained that they are both the same, and they have the same value. So, we can use any one we want to add as transmission values.

comment:11 Changed 7 years ago by Gesner Passos

Add the transmission information to the reduced workspace

Due to some limitations imposed by the way the Singleton is used, there is no way to get the transmission workspaces after the reduction is finished from the user interface, except using the attempt to guess the name of the transmission workspaces (what we should not do). So, I propose here keeping the information about the workspaces of the transmission at the SampleLog of the Reduced workspace. This information will be them available whenever is necessary. It would even allow us to use this information inside the SaveCan algorithm itself. But, I think it would seem a litle bit of magic. So, i prefer to use it outside.

re #6929

Changeset: e1e05575f99bc5659c2a61e1b809d65f25b056f5

comment:12 Changed 7 years ago by Gesner Passos

Extend SANSBatchMode to use the transmission workspace for CanSAS

It will pass on the parameters to SaveCanSAS1D if they are available.

re #6929

Changeset: 424db0d8700aedf2ef8f8bf2fec2d48aeae4aca9

comment:13 Changed 7 years ago by Gesner Passos

Extend SingleMode to use the transmission workspace for CanSAS

It will pass on the parameters to SaveCanSAS1D if they are available. Changes on SANSRunWindow.cpp

re #6929

Changeset: 747c82c73d31e3287bf47bd2c30bd5f9e43b9f94

comment:14 Changed 7 years ago by Gesner Passos

correct the number of bins at transmission

Correct a wrong implementation of saving cansas that does not take the correct number of values to save them.

re #6929 re #6839

Changeset: a542e0b51658f4f324fbf0ac649aed3380469fd7

comment:15 Changed 7 years ago by Gesner Passos

Implement the saving transmission and transmissioncan to merged option

add the properties transmission and transmissioncan to the merged workspace this allows the savecansas to save those values.

re #6929

Changeset: c34499bb41bbf1995a0652b4720934d88de4da8f

comment:16 Changed 7 years ago by Gesner Passos

Correct the Transmission and TransmissionCan to take the unfitted data

saves the unfitted data and not the fitted one.

re #6929

Changeset: 0b091ba7ef3d14cfce9d09a8172a1f7541e7d991

comment:17 Changed 7 years ago by Gesner Passos

Correct the unit test to adjust the units

the commit a542e0b51658f4f324fbf0ac649aed3380469fd7 changed the units, and this commit, updates the unit test.

re #6929 re #6839

Changeset: 94126a9398bef8b9c69d796fee5ca48ab0c7a508

Changed 7 years ago by Gesner Passos

input for testing

comment:18 Changed 7 years ago by Gesner Passos

Tester if you do not have access to the isis data, them, you can only test this:

  • Select LOQ instrument
  • Select user file: systemtests/Data/LOQ/MASK.094AA
  • change to batch mode and select the file for_can_sas_test.csv (do not forget to add Data/LOQ to the directory manager)
  • select the output CanSAS at the bottom right.
  • change again to the Single mode (the batch mode does not allow you to reduce .raw data).
  • press Reduce (it will save the file 54431main_1D_2.2_10.0.xml at your output directory)
  • You can load these files using the LoadCanSAS1D algorithm to see if it is correct as well.
  • check that there is a SAStransmission_spectrum entry inside the xml file.
  • There is not much more you can do, because it will produce some exceptions that are not directly related to this ticket.

If you have access to the ISIS data, then, you may:

  • Open ISIS Sans interface
  • Select SANS2D instrument
  • Set the searching directories to cycle_13_1
  • Open the Mask at: ndxsans2d/user/Masks/MASKSANS2D_131L_4m_12mm_Lakey_B.txt
  • Load for_can_sas_sans2d.csv in batch mode
  • Select the CanSAS as output format.
  • Press Reduce it will save: 4m_12mm_lakey_rear.xml
  • check that there is a SAStransmission_spectrum inside
  • change to single mode and press reduce
  • It will save 18617rear_1D_1.75_16.5.xml file
  • check that there is a SAStransmission_spectrum inside
  • Change at the Reduction Settings the detector to front-detector and to merged
  • make sure that the SAStransmission_spectrum is still there.
  • Finally, check that in both mode, the batch mode will save two files, while in single mode, you will not have the opportunity to save no file. (the reason is defined in comment:10)

comment:19 Changed 7 years ago by Gesner Passos

Disable saving output on both & single mode

user request:

only populate the Filename box with a workspace name if a single detector has been reduced (front/rear/main/hab) or if it is the MERGED workspace. In the case of BOTH, leave it empty and force the User to select a Save algorithm.

re #6929

Changeset: e44a880a94ec5138105bdc552a7806bf23e2ec19

comment:20 Changed 7 years ago by Gesner Passos

  • Status changed from accepted to verify
  • Resolution set to fixed

comment:21 Changed 7 years ago by Mathieu Doucet

  • Status changed from verify to verifying
  • Tester set to Mathieu Doucet

comment:22 Changed 7 years ago by Mathieu Doucet

  • Status changed from verifying to reopened
  • Resolution fixed deleted

Reopening ticket to get rid of warning, as agreed.

comment:23 Changed 7 years ago by Mathieu Doucet

Re #6929 Remove warning as agreed

Changeset: 922789aa5b42d62bbd02b440e7a3cf722fcbeeec

comment:24 Changed 7 years ago by Mathieu Doucet

  • Owner changed from Gesner Passos to Mathieu Doucet
  • Status changed from reopened to accepted

comment:25 Changed 7 years ago by Mathieu Doucet

  • Status changed from accepted to verify
  • Resolution set to fixed

comment:26 Changed 7 years ago by Mathieu Doucet

Fixed the warning as agreed with the developer and closing the ticket after successful testing.

comment:27 Changed 7 years ago by Mathieu Doucet

  • Owner changed from Mathieu Doucet to Gesner Passos
  • Status changed from verify to assigned

comment:28 Changed 7 years ago by Peter Peterson

  • Owner changed from Gesner Passos to Peter Peterson
  • Status changed from assigned to accepted

comment:29 Changed 7 years ago by Peter Peterson

  • Status changed from accepted to verify

Mathieu told me to "close" this.

comment:30 Changed 7 years ago by Mathieu Doucet

  • Status changed from verify to verifying

comment:31 Changed 7 years ago by Mathieu Doucet

  • Status changed from verifying to closed

comment:32 Changed 7 years ago by Nick Draper

  • Component changed from Mantid to Framework

comment:33 Changed 7 years ago by Nick Draper

  • Component changed from Framework to SANS
  • Description modified (diff)

comment:34 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 7775

Note: See TracTickets for help on using tickets.