Ticket #6107 (closed: fixed)

Opened 8 years ago

Last modified 5 years ago

Option for SaveAscii to exclude header

Reported by: Martyn Gigg Owned by: Karl Palmen
Priority: major Milestone: Release 2.4
Component: Mantid Keywords:
Cc: Blocked By:
Blocking: Tester: Wenduo Zhou

Description

From R. Dalgliesh

This is a very minor change request and not urgent.
Can a new option be added to the end of the SaveAscii routine to disable the column captions.
i.e. no header.
 
Thanks
 
Rob

Change History

comment:1 Changed 8 years ago by Nick Draper

  • Owner set to Karl Palmen
  • Status changed from new to assigned

comment:2 Changed 8 years ago by Karl Palmen

I take this to mean the addition of a property to the algorithm,

11 | ColumnHeaders | Input | Boolean | True | If true, put column headers into file.

comment:3 Changed 8 years ago by Karl Palmen

It seems that LoadAscii should also be able to read such a file without column headers.

comment:4 Changed 8 years ago by Karl Palmen

The unit test is LoadSaveAsciiTest. It creates a file from a workspace created by the test. This should be a scoped file. When I modify the test for this ticket, I can also modify to use scoped files. I'll modify to create two files one with headers (by default) and one without and check that both are read correctly.

comment:5 Changed 8 years ago by Karl Palmen

LoadAscii can read a file from which the column headers have been removed, so does not need modifying.

comment:6 Changed 8 years ago by Karl Palmen

  • Status changed from assigned to accepted

comment:7 Changed 8 years ago by Karl Palmen

The change to the unit test described above would not test this ticket, because LoadAscii would read the file regradless of whether it had a header and ignores the content of the header. A unit test that checks the content of the saved file independently of LoadAscii is needed hence ticket #6243.

comment:8 Changed 8 years ago by Karl Palmen

Make necessary change to code algorithm re #6107

Signed-off-by: Karl Palmen <karl.palmen@…>

Changeset: f9cca0a11a894ac4b2f81e5a7fbec97ba219448c

comment:9 Changed 8 years ago by Karl Palmen

To test load a workspace, run SaveAscii on it selecting a narrow range of spectra. Inspect saved file see it has column headers. Run SaveAsccii again check that there is a ColumnHeader checkbox already ticked. Untick it change output file name and execute. Check that second file is the same as first, but with no column headers.

comment:10 Changed 8 years ago by Karl Palmen

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

comment:11 Changed 8 years ago by Karl Palmen

I've found out that as similar change was made to SaveFocusedXYE in ticket #1143 . It is not tested in SaveFocussedXYETest.

comment:12 Changed 8 years ago by Karl Palmen

Make necessary change to code algorithm re #6107

Signed-off-by: Karl Palmen <karl.palmen@…>

Changeset: f9cca0a11a894ac4b2f81e5a7fbec97ba219448c

comment:13 Changed 8 years ago by Wenduo Zhou

  • Status changed from verify to verifying
  • Tester set to Wenduo Zhou

comment:14 Changed 8 years ago by Wenduo Zhou

  • Status changed from verifying to closed

comment:15 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 6953

Note: See TracTickets for help on using tickets.