Ticket #6839 (closed: fixed)

Opened 8 years ago

Last modified 5 years ago

Implement v1.1 of CanSAS standard in SaveCansas1D and LoadCansas1D

Reported by: Martyn Gigg Owned by: Gesner Passos
Priority: blocker Milestone: Release 2.5
Component: Mantid Keywords:
Cc: anders.markvardsen@… Blocked By:
Blocking: #6929 Tester: Anders Markvardsen

Description

V1.1 of the canSAS XML reduced data file standard is now released (see link below).

http://www.cansas.org/svn/1dwg/trunk/doc/cansas-1d-1_1-manual.pdf

Please could the necessary changes to SaveCansas1D be ticketed, please.

I also attach a non-Mantid-generated example output file to show what the revised data files should look like.

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.

Note that it would be perfectly acceptable for a file to ONLY contain a sample transmission or a can transmission; though the latter case would indeed be odd, it is not forbidden; the former case would be quite common (a reduction without any can subtraction).

Any chance these changes could make it into the May release?

Attachments

samdata_WITHTX.xml (36.2 KB) - added by Martyn Gigg 8 years ago.
reducted_data.nxs (1.1 MB) - added by Gesner Passos 7 years ago.
The reduced data.
transmission_sample_data.nxs (289.8 KB) - added by Gesner Passos 7 years ago.
The transmission sample data
transmission_can_data.nxs (264.6 KB) - added by Gesner Passos 7 years ago.
the transmission can data.

Change History

Changed 8 years ago by Martyn Gigg

comment:1 Changed 7 years ago by Anders Markvardsen

  • Status changed from new to assigned
  • Owner changed from Anders Markvardsen to Gesner Passos

comment:2 Changed 7 years ago by Gesner Passos

  • Status changed from assigned to accepted

comment:3 Changed 7 years ago by Gesner Passos

  • Summary changed from Implement v1.1 of CanSAS standard in SaveCansas1D to Implement v1.1 of CanSAS standard in SaveCansas1D and LoadCansas1D

comment:4 Changed 7 years ago by Gesner Passos

Render SaveCanSAS1D extendable

Make protected methods and chose some methods to be virtual.

re #6839

Changeset: 447cc308bf146fcd5b0cc1fdf0aad2b4acfe2bd0

comment:5 Changed 7 years ago by Gesner Passos

Introduction of SaveCanSAS1D2.

This algorithm implements the CanSAS version 1.1

re #6839

Changeset: 2441d60e53432887c149f21175c235dcd589844c

comment:6 Changed 7 years ago by Gesner Passos

Add unit test to SaveCanSAS1D2

re #6839

Changeset: d09ac84d8897a16e2f86ec529bf26a6add1123aa

comment:7 Changed 7 years ago by Gesner Passos

Add LoadCanSAS1D2 the second version

it allows to load cansas version 1.1

re #6839

Changeset: 621e3ab8e701d28a71675b0a4751d3606fe609d2

comment:8 Changed 7 years ago by Gesner Passos

There was one note at the description:

Note that it would be perfectly acceptable for a file to ONLY contain a sample transmission or a can transmission; though the latter case would indeed be odd, it is not forbidden; the former case would be quite common (a reduction without any can subtraction).

I've considered this an invalid request. Mainly because it breaks the xml-schema. Speaking about the required SASentryType, it says that SASdata (the reduction data) must occur at least 1 (minOccurs). So, we can not save only transmission data.

<element name="SASdata" minOccurs="1" maxOccurs="unbounded" type="tns:SASdataType" />

comment:9 Changed 7 years ago by Gesner Passos

  • Blocking 6929 added

comment:9 Changed 7 years ago by Gesner Passos

  • Blocking 6929 removed

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

Changed 7 years ago by Gesner Passos

The reduced data.

Changed 7 years ago by Gesner Passos

The transmission sample data

Changed 7 years ago by Gesner Passos

the transmission can data.

comment:10 Changed 7 years ago by Gesner Passos

  • Cc anders.markvardsen@… added

Tester:

The version 1.1 introduced the possibility to add transmission data correlated to reduced data. These new values are optionals. So, I suggest you to try the following. Load the three nexus files attached to this ticket (reduced_data, transmission_sample_dta, transmission_can_data). Then, apply the SaveCanSAS some times:

SaveCanSAS('reduced_data','/tmp/reduced_data_only.xml')
SaveCanSAS('reduced_data','/tmp/reduced_with_sample.xml', 'transmission_sample_data')
SaveCanSAS('reduced_dta','/tmp/all_three.xml','transsmission_sample_data','transmission_can_data')

You can then, check that all these files are conformed the xml-schema:

xmllint --schema http://www.cansas.org/svn/1dwg/trunk/cansas1d.xsd /tmp/reduced_data_only.xml  --noout

Finally, you may Load all these files (enabling the LoadTransmission flag) to check if the Load can load all these files correctly.

One test that will not pass is to check the workspace with the one loaded from nexus. The reason is that CanSAS does not define bins, but single position for the pixels, and it was choosen to set the center of the bin as its position. So, the X values are different.

comment:11 Changed 7 years ago by Gesner Passos

You must add the entry DetectorNames=HAB for Saving SaveCanSAS

comment:12 Changed 7 years ago by Gesner Passos

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

comment:13 Changed 7 years ago by Gesner Passos

  • Blocking 6929 added

comment:14 Changed 7 years ago by Gesner Passos

branch feature/6839_cansas_v1.1

comment:16 Changed 7 years ago by Gesner Passos

Render SaveCanSAS1D extendable

Make protected methods and chose some methods to be virtual.

re #6839

Changeset: 447cc308bf146fcd5b0cc1fdf0aad2b4acfe2bd0

comment:17 Changed 7 years ago by Gesner Passos

Introduction of SaveCanSAS1D2.

This algorithm implements the CanSAS version 1.1

re #6839

Changeset: 2441d60e53432887c149f21175c235dcd589844c

comment:18 Changed 7 years ago by Gesner Passos

Add unit test to SaveCanSAS1D2

re #6839

Changeset: d09ac84d8897a16e2f86ec529bf26a6add1123aa

comment:19 Changed 7 years ago by Gesner Passos

Add LoadCanSAS1D2 the second version

it allows to load cansas version 1.1

re #6839

Changeset: 621e3ab8e701d28a71675b0a4751d3606fe609d2

comment:20 Changed 7 years ago by Anders Markvardsen

  • Status changed from verify to verifying
  • Tester set to Anders Markvardsen

comment:21 Changed 7 years ago by Anders Markvardsen

Tested by using sans2d run 11109 where I saved cansas and loaded in again. also tested that i could load in old format

comment:22 Changed 7 years ago by Anders Markvardsen

  • Status changed from verifying to closed

comment:23 Changed 7 years ago by Gesner Passos

Render SaveCanSAS1D extendable

Make protected methods and chose some methods to be virtual.

re #6839

Changeset: 447cc308bf146fcd5b0cc1fdf0aad2b4acfe2bd0

comment:24 Changed 7 years ago by Gesner Passos

Introduction of SaveCanSAS1D2.

This algorithm implements the CanSAS version 1.1

re #6839

Changeset: 2441d60e53432887c149f21175c235dcd589844c

comment:25 Changed 7 years ago by Gesner Passos

Add unit test to SaveCanSAS1D2

re #6839

Changeset: d09ac84d8897a16e2f86ec529bf26a6add1123aa

comment:26 Changed 7 years ago by Gesner Passos

Add LoadCanSAS1D2 the second version

it allows to load cansas version 1.1

re #6839

Changeset: 621e3ab8e701d28a71675b0a4751d3606fe609d2

comment:27 Changed 7 years ago by Gesner Passos

Render SaveCanSAS1D extendable

Make protected methods and chose some methods to be virtual.

re #6839

Changeset: 447cc308bf146fcd5b0cc1fdf0aad2b4acfe2bd0

comment:28 Changed 7 years ago by Gesner Passos

Introduction of SaveCanSAS1D2.

This algorithm implements the CanSAS version 1.1

re #6839

Changeset: 2441d60e53432887c149f21175c235dcd589844c

comment:29 Changed 7 years ago by Gesner Passos

Add unit test to SaveCanSAS1D2

re #6839

Changeset: d09ac84d8897a16e2f86ec529bf26a6add1123aa

comment:30 Changed 7 years ago by Gesner Passos

Add LoadCanSAS1D2 the second version

it allows to load cansas version 1.1

re #6839

Changeset: 621e3ab8e701d28a71675b0a4751d3606fe609d2

comment:31 Changed 7 years ago by Gesner Passos

Render SaveCanSAS1D extendable

Make protected methods and chose some methods to be virtual.

re #6839

Changeset: 447cc308bf146fcd5b0cc1fdf0aad2b4acfe2bd0

comment:32 Changed 7 years ago by Gesner Passos

Introduction of SaveCanSAS1D2.

This algorithm implements the CanSAS version 1.1

re #6839

Changeset: 2441d60e53432887c149f21175c235dcd589844c

comment:33 Changed 7 years ago by Gesner Passos

Add unit test to SaveCanSAS1D2

re #6839

Changeset: d09ac84d8897a16e2f86ec529bf26a6add1123aa

comment:34 Changed 7 years ago by Gesner Passos

Add LoadCanSAS1D2 the second version

it allows to load cansas version 1.1

re #6839

Changeset: 621e3ab8e701d28a71675b0a4751d3606fe609d2

comment:35 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:36 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

comment:37 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 7685

Note: See TracTickets for help on using tickets.