Ticket #9391 (new)

Opened 6 years ago

Last modified 5 years ago

New algorithm to save json data from workspace

Reported by: Peter Peterson Owned by: Stuart Campbell
Priority: major Milestone: Backlog
Component: Framework Keywords:
Cc: doucetm@… Blocked By:
Blocking: Tester:

Description

This will be used with auto-reduction to write out data for interactive visualization in http://monitor.sns.gov/.

For a single curve

{
 "type": "Curve",
 "xlabel":"x-axis (x-units)",
 "ylable":"y-axis (y-units)",
 "curve":
    {"title":"Label for this curve",
     "data": [ [x1,y1,dy1], [x2,d2,dy2], ...]}
}

For more than one curve on a single plot

{
 "type": "ArrayOfCurves",
 "xlabel":"x-axis (x-units)",
 "ylable":"y-axis (y-units)",
 "curves":[
    {"title":"Label for this curve",
     "data": [ [x1,y1,dy1], [x2,d2,dy2], ...]},
    {"title":"Label for this curve",
     "data": [ [x1,y1,dy1], [x2,d2,dy2], ...]}
           ]
}

There still needs to be a way to have multiple sub-plots (e.g. stacked frames for S(Q) and G(r))

Change History

comment:1 Changed 6 years ago by Owen Arnold

  • Status changed from new to infoneeded

Does this ticket provide a full schema for the JSON? Should we capture the schema somewhere?

Also, I'm not sure if there's a portable JSON generator/parser for C++ that would help you here.

comment:2 Changed 6 years ago by Stuart Campbell

comment:3 Changed 6 years ago by Nick Draper

  • Status changed from infoneeded to new

Stuart forgot to "Clarify"

comment:4 Changed 6 years ago by Nick Draper

  • Status changed from new to infoneeded

Of course I suspect we want something at the framework level, not the UI, so QT is probably out.

JSON is used in the Script Library and the remote algorithms

Take a look at MantidRemote/src/simplejson.cpp

Also the script repo uses <boost/property_tree/json_parser.hpp> in ScriptRepository\src\ScriptRepositoryImpl.cpp

Could you take a look at these to see if they fit the bill?

comment:5 Changed 6 years ago by Nick Draper

  • Milestone changed from Release 3.2 to Backlog

Moved to Backlog at the code freeze of release 3.2

comment:6 Changed 6 years ago by Nick Draper

  • Status changed from infoneeded to new

Set to new at the end of Triage

comment:7 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 10234

Note: See TracTickets for help on using tickets.