Ticket #1122 (closed: fixed)
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: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 "&") Also added <SASprocess> node with entries <name><date> <term name=â€svnâ€> <term name="user_file"> to the CanSAS1D xml.
comment:9 Changed 10 years ago by Sofia Antony
- Status changed from assigned to testing
- Resolution set to fixed
comment:11 Changed 5 years ago by Stuart Campbell
This ticket has been transferred to github issue 1970