Ticket #10835 (closed: fixed)

Opened 6 years ago

Last modified 5 years ago

Rewrite LoadSPICEAscii as a C++ algorithm

Reported by: Wenduo Zhou Owned by: Wenduo Zhou
Priority: major Milestone: Release 3.4
Component: Framework Keywords:
Cc: Blocked By:
Blocking: #10622 Tester: Steven Hahn

Description (last modified by Wenduo Zhou) (diff)

Besides re-writing with C++, the algorithm should be able to search string for 'date' and 'time' in the sample log and convert the to run_start as a standard Mantid DateAndTime string.

Change History

comment:1 Changed 6 years ago by Wenduo Zhou

Added new algorithm files. Refs #10835.

Changeset: 30edbd8fa29cb0057fd561494a7d2d70a30f4568

comment:2 Changed 6 years ago by Wenduo Zhou

Checkpointing progress of work. Refs #10835.

Changeset: 2f79a292f514b1768572539c7a29cc4249816575

comment:3 Changed 6 years ago by Wenduo Zhou

  • Status changed from new to assigned

comment:4 Changed 6 years ago by Wenduo Zhou

  • Status changed from assigned to inprogress
  • Milestone changed from Backlog to Release 3.4

comment:5 Changed 6 years ago by Wenduo Zhou

Refs #10835. Checkpointing work in progress.

Changeset: a0f5d2cf30696c9ba2fd42cd8cd34e1c9ac3bae2

comment:6 Changed 6 years ago by Wenduo Zhou

Refs #10835. Added unit tests.

Changeset: d091eae4b74b9e163bcbe6ca4c066e25b81de2d1

comment:7 Changed 6 years ago by Wenduo Zhou

Finished the second unit test. Refs #10835.

Changeset: 78ebd067bb86bf2065b8c66fac0e1b0587e285d2

comment:8 Changed 6 years ago by Wenduo Zhou

Refs #10835. Added one more unit test.

Changeset: 44a02af39a04011f204f52b4ccdeff8bb2ec3785

comment:9 Changed 6 years ago by Wenduo Zhou

Refs #10835. Cleaned up the codes.

Changeset: 4233e0a1148046d2372c83e99bc7811a97ab0b26

comment:10 Changed 6 years ago by Wenduo Zhou

Use 1 method to replace 3. Refs #10835.

Changeset: 69913ab6a598b21d7f1cee97d227fe968e6baf17

comment:11 Changed 6 years ago by Wenduo Zhou

Removed python algorithm LoadSPICEAscii. Refs #10835.

Changeset: afe135edf4cedc6b574ff8c68cf2e4ff3d729eb7

comment:12 Changed 6 years ago by Martyn Gigg

Fix ifstream constructor usage for older standard libraries.

Refs #10835

Changeset: fc83d416e77e7f399ac4cbcc1dcf28a023909295

comment:13 Changed 6 years ago by Wenduo Zhou

Corrected the algorithm name in doc. Refs #10835.

Changeset: 26a074585189409df1545621a04989bad3ec4c4c

comment:14 Changed 6 years ago by Wenduo Zhou

Refs #10835. Rename the doc file.

Changeset: 8fa4605991c2ec51ea17303bb1b9769dfe95b35c

comment:15 Changed 6 years ago by Wenduo Zhou

Fixed a bug. Refs #10835.

Changeset: 8eb95f49abf4881ab4f3e783d71613ec77dadd9c

comment:16 Changed 6 years ago by Wenduo Zhou

Refs #10835. Corrected an output error.

Changeset: baf49a667499161b996b8e4cedd865b26ab4d3df

comment:17 Changed 6 years ago by Wenduo Zhou

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

For tester

The purpose of this ticket is to rewrite LoadSPICEAscii in python to LoadSpiceAscii to C++. The only differences are the name of the algorithm and the input property for integer sample log names (changed from IntSampleLogNames to IntegerSampleLogNames).

You can use the test cases listed in ticket 10554 (http://trac.mantidproject.org/mantid/ticket/10554) for this ticket.

For the newly added feature to set up run start time with user specified date and time format, you can look at the unit test for reference.

Last edited 6 years ago by Wenduo Zhou (previous) (diff)

comment:18 Changed 6 years ago by Steven Hahn

  • Status changed from verify to verifying
  • Tester set to Steven Hahn

comment:19 Changed 6 years ago by Wenduo Zhou

  • Status changed from verifying to reopened
  • Resolution fixed deleted

comment:20 Changed 6 years ago by Wenduo Zhou

  • Description modified (diff)

comment:21 Changed 6 years ago by Wenduo Zhou

  • Status changed from reopened to inprogress

Enabled to set up run_start properly. Refs #10835.

Changeset: d3f42c2fba7947510460e0912452261805e2ac58

comment:22 Changed 6 years ago by Wenduo Zhou

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

comment:23 Changed 6 years ago by Steven Hahn

  • Status changed from verify to verifying

comment:24 Changed 6 years ago by Steven Hahn

I was able to successfully read in the two test cases from ticket #10554. After reviewing your code, I had a few questions.

For createRunInfoWS, it is necessary to copy floatlognamelist, intlognamelist and strlognamelist? Would passing by reference be more appropriate?

Unless transferring ownership, I think you want to pass shared pointers by const ref.

Remove commented out code from Code/Mantid/Framework/PythonInterface/test/python/plugins/algorithms/CMakeLists.txt and Code/Mantid/Framework/DataHandling/src/LoadSpiceAscii.cpp

Lastly, please rerun your changed files through clang-format. The address-of operator isn't in the same place.

comment:25 Changed 6 years ago by Wenduo Zhou

Cleaned the codes. Refs #10835.

Changed the input vectors for createRunInfoWS as references according to the comment from the tester.

Changeset: 6757adc2a285c6a1d8a816473e786b13d5eefd1b

comment:26 Changed 6 years ago by Wenduo Zhou

Used binary_search to replace find. Refs #10835.

Changeset: 29d31de2df2fe8cc0ae18e8a1d8728d78332774b

comment:27 Changed 6 years ago by Wenduo Zhou

Changed the data back. Refs #10835.

Changeset: 96cfc3461fc76d244a090ac2ea09db8610e2e9ae

comment:28 Changed 6 years ago by Steven Hahn

  • Status changed from verifying to closed

Merge remote-tracking branch 'origin/feature/10835_rewrite_loadspiceascii'

Full changeset: 093b4cb02bfc7aba10ae52c3ab121a04b6222670

comment:29 Changed 5 years ago by Nick Draper

Somehow these slipped through without a resolution. Set to Fixed.

comment:30 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 11677

Note: See TracTickets for help on using tickets.