Opened 8 years ago

Closed 8 years ago

#826 closed defect (fixed)

dQ data is not handled properly when loaded from CanSAS1D and NXcanSAS

Reported by: smk78 Owned by: krzywon
Priority: blocker Milestone: SasView 4.1.0
Component: SasView Keywords:
Cc: Work Package: SasView Bug Fixing

Description

The ISIS SANS interface in Mantid now permits the calculation of Qres (dQ) data which can then be written to CanSAS1D XML or NXcanSAS. In testing compatibility with SasView I have observed the following:

Loading from CanSAS1D:

SasView 4.0.1 - works fine! On selecting a model and checking Use dQ Data the dQ data range is displayed. Fitting proceeds ok.

SasView 4.1 local build - On opening a file containing dQ data SasView throws the error:

2016-12-15 15:48:45 : The following errors occured whilst loading
41951_1D_qres.xml:
Error:
The loaded xml file, 41951_1D_qres.xml does not fully meet the CanSAS
v1.x specification. SasView loaded as much of the data as possible.
Element '{urn:cansas1d:1.1}name': This element is not expected.
Expected is one of ( {urn:cansas1d:1.1}length,
{urn:cansas1d:1.1}aperture )., line 136

The data is still read and can be sent to fitting but the dQ data is not available.

Loading from NXcanSAS:

SasView 4.0.1 - The data is read and can be sent to fitting but the dQ data is not available to SasView.

SasView 4.1 local build - The data is read and can be sent to fitting but the dQ data is not available to SasView.

Attachments (4)

41951_1D_noqres.xml (14.7 KB) - added by smk78 8 years ago.
CanSAS1D without dQ values
41951_1D_qres.xml (15.3 KB) - added by smk78 8 years ago.
CanSAS1D with dQ values
41951_1D_noqres.h5 (35.6 KB) - added by smk78 8 years ago.
NXcanSAS without dQ values
41951_1D_qres.h5 (38.1 KB) - added by smk78 8 years ago.
NXcanSAS with dQ values

Download all attachments as: .zip

Change History (17)

Changed 8 years ago by smk78

CanSAS1D without dQ values

Changed 8 years ago by smk78

CanSAS1D with dQ values

Changed 8 years ago by smk78

NXcanSAS without dQ values

Changed 8 years ago by smk78

NXcanSAS with dQ values

comment:1 Changed 8 years ago by smk78

  • Summary changed from dQ data is not handled properly when loaded from NXcanSAS to dQ data is not handled properly when loaded from CanSAS1D and NXcanSAS

comment:2 Changed 8 years ago by krzywon

  • Owner set to krzywon
  • Status changed from new to accepted

Looking at the XML data you have given, it seems the <SASCollimation> entry is not to the CanSAS v1.1 standard. The <name>, <X>, and <Y> elements should be held within an <aperture> element but are directly within <SASCollimation>. I've modified the reader since the release of 4.0.1 to display XML errors when they are found, so not displaying the error before was a bug.

The SasView HDF reader is not reading in the Qdev data. I'll get a fix in today.

comment:3 Changed 8 years ago by krzywon

In bbd0f37aa83b3764868742835a730122ba826585/sasview:

#826: CanSAS HDF5 reader reads in the Qdev data now.

comment:4 Changed 8 years ago by krzywon

Rereading the original note, the handling of dQ data from the XML is not right. I'm looking into it.

comment:5 Changed 8 years ago by krzywon

In 67b0a99ce9f69a9dfef035e8e4a06588c9f1602f/sasview:

#761: Constrained fit pages are now deleted if they no longer have any data in them when other data sets are deleted. #826: Fixed a bug where dQ smearing option was unavailable for 1D data sets.

comment:6 Changed 8 years ago by krzywon

This should be fixed as of the latest build on Jenkins. Please test and confirm the dQ is handled properly for both the XML and HDF5 CanSAS data.

comment:7 Changed 8 years ago by smk78

Have just pulled and built SasView locally, and downloaded Jenkins build 621. Both versions LOAD the XML and H5 datasets but DO NOT appear to use the dQ data - although the 'Use dQ' radio button is checked, no dQ values appear in the FitPage.

comment:8 Changed 8 years ago by krzywon

In 24fd27a2f35f316c4971c10c5c3a317dd9357597/sasview:

#826: Smearing should now be applied to 1D data with dQ data present. This was an issue for all 1D data.

comment:9 Changed 8 years ago by krzywon

A fix for this is now in master and should be tested when possible.

comment:10 Changed 8 years ago by smk78

Pulled and built on Win7.

XML & H5 datasets load and can be fitted. Use dQ is automatically selected and fitting with it enabled does generate a slightly better fit than if it is not enabled.

However, loading the XML still throws the error in the original ticket. But you can OK and continue.

comment:11 Changed 8 years ago by krzywon

The XML loading error won't be going away. The XML files attached to this ticket do not meet the CanSAS specification which is where this error message is coming from. I mentioned the issue with them in comment2. It seems wherever these files are from (Mantid?), the <SAScollimation> element is not being generated properly.

comment:12 Changed 8 years ago by smk78

Mantid team will endeavour to fix the CanSAS1D XML issue for v3.9.0 in Feb.

comment:13 Changed 8 years ago by krzywon

  • Resolution set to fixed
  • Status changed from accepted to closed
Note: See TracTickets for help on using tickets.