Ticket #1122 (closed: fixed)

Opened 11 years ago

Last modified 5 years ago

SaveCanSAS1D refinements

Reported by: Russell Taylor Owned by: Sofia Antony
Priority: critical Milestone: Iteration 23
Component: Keywords:
Cc: Blocked By:
Blocking: Tester:

Description (last modified by Nick Draper) (diff)

From Steve King:

  • it needs to invoke the canSAS style sheet: cansasxml-html.xsl for formatting and to allow programs like Excel to load the data and metadata in a sensible manner;
  • although I realize that XML ignores line breaks, canSAS took a conscious decision that all the values associated with a given data point would be formatted on one line in the XML file. So whereas you have
 <Idata>
	<Q unit="1/A">0.011</Q>
	<I unit="a.u">212.981</I>
	<Idev unit="a.u">2.99406</Idev>
 </Idata>

we write

<Idata><Q unit="1/A">0.011</Q><I unit="a.u">212.981</I><Idev unit="a.u">2.99406</Idev></Idata>


This is to aid human-readability of the file;

  • the I and Idev data are not always 'a.u.'! If Mantid has properly reduced the data (which means detector efficiency files, transmissions, direct beams, scale factor, etc) have all been specified then these parameters will have units of '1/cm'.

I also notice that it's not picking out the name of the detector bank correctly, or the source-detector distance (it's just using the first detector pixel).

Change History

comment:1 Changed 11 years ago by Russell Taylor

  • Status changed from new to accepted

comment:2 Changed 11 years ago by Russell Taylor

(In [3878]) Add stylesheet heading to saved CanSAS files. Have unit written out to be contents of YUnitLabel field. Re #1122.

comment:3 Changed 11 years ago by Russell Taylor

(In [3880]) Update the test. Fix the sample-detector distance to reflect the detector bank as a whole rather than just an individual pixel. Re #1122.

comment:4 Changed 11 years ago by Russell Taylor

(In [3886]) Add a method to IComponent which returns a list of all the component's direct ancestors. Use this within SaveCanSAS1D to get the name of the detector bank. Re #1122.

comment:5 Changed 11 years ago by Russell Taylor

  • Status changed from accepted to assigned
  • Owner changed from Russell Taylor to Sofia Antony

This is all done except for the second point (the formatting of the data point lines). According to Steve:

Formatting difficulty acknowledged, but I’m afraid this is a canSAS ‘line in the sand’! We argued the pro’s and con’s for weeks...

comment:6 Changed 10 years ago by Nick Draper

  • Priority changed from minor to critical
  • Description modified (diff)

comment:7 Changed 10 years ago by Sofia Antony

(In [4442]) re #1122 Idata node is formatted on one line.This is done by creating the CanSAS1D XML string using std::string and then writing the string to the file.I can't see a way to remove line breaks using Poco::XML Added a method to replace XML special characters with entity reference (e.g."&" with "&amp;") Also added <SASprocess> node with entries <name><date> <term name=”svn”> <term name="user_file"> to the CanSAS1D xml.

comment:8 Changed 10 years ago by Sofia Antony

(In [4779]) re #1122 minor changes to searchandreplaceSpecialChars method.

comment:9 Changed 10 years ago by Sofia Antony

  • Status changed from assigned to testing
  • Resolution set to fixed

comment:10 Changed 10 years ago by Russell Taylor

  • Status changed from testing to closed

comment:11 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 1970

Note: See TracTickets for help on using tickets.