Ticket #6285 (closed: fixed)

Opened 8 years ago

Last modified 5 years ago

Modify UpdateInstrumentFromFile to accept Ascii file

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

Description

UpdateInstrumentFromFile currently only accepts RAW & NeXus. Modify it to accept an ASCII file where an additional property specifies to format like so:

spectrum,theta,t0,-,R

or

id,theta,t0,-,R

where the "-" indicates skip this column and the R,theta,phi have special meaning and link to the corresponding detector values. An additional named columns will be attached as detector parameters.

This is required for supporting the VESUVIO work.

Change History

comment:1 Changed 8 years ago by Martyn Gigg

  • Status changed from new to accepted

comment:2 Changed 8 years ago by Martyn Gigg

Allow UpdateInstrumentFromFile to accept an ASCII file. Refs #6285

Changeset: 4d2b8225bd8b309fa8dda95ba8d73e093d964867

comment:3 Changed 8 years ago by Martyn Gigg

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

Tester: The UpdateInstrumentFromFile algorithm now accepts a ISIS RAW, ISIS NeXus or an ASCII file and should throw an error if given a file of a different type so please check that this occurs.

An example file for this is attached to ticket #6286 where the columns are:

spectrum,theta,t0,l1,l2

Please try different combinations of ignoring columns and check that those not labeled R,theta,phi or skipped get added as instrument parameters. You can do this from python using

det = ws.getDetector(0) # make sure you set the correct wsindex
print det.getDoubleParameter("t0") # Should give a single-element list with the correct value

comment:4 Changed 8 years ago by Martyn Gigg

Put the try...catch block back in the correct place. Refs #6285

Changeset: 6aeedb9775901f8c933a0e87493ee379c8b80585

comment:5 Changed 8 years ago by Martyn Gigg

Allow UpdateInstrumentFromFile to accept an ASCII file. Refs #6285

Changeset: deeda1474db2a291f8a23d4b8addfd1c01e9ddc1

comment:6 Changed 8 years ago by Martyn Gigg

Put the try...catch block back in the correct place. Refs #6285

Changeset: e4ccd9f7d9ce55ceca5198b2c3810a1aa20d8727

comment:7 Changed 8 years ago by Martyn Gigg

  • Status changed from verify to reopened
  • Resolution fixed deleted

comment:8 Changed 8 years ago by Martyn Gigg

There is a minor correction required to properly skip lines if they are not columns of numbers as some files may have a header line with text.

comment:9 Changed 8 years ago by Martyn Gigg

UpdateInstrumentFromFile can now skip ascii headers. Refs #6285

Changeset: 48b8f33e42be50f80c2bee5772cf76fd4069a8b1

comment:10 Changed 8 years ago by Martyn Gigg

  • Status changed from reopened to accepted

comment:11 Changed 8 years ago by Martyn Gigg

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

Tester: As well as the tests above please alter the file to have a text header and check that it is still read correctly.

comment:12 Changed 8 years ago by Karl Palmen

  • Status changed from verify to verifying
  • Tester set to Karl Palmen

comment:13 Changed 8 years ago by Karl Palmen

  • Status changed from verifying to reopened
  • Resolution fixed deleted

The wiki http://www.mantidproject.org/UpdateInstrumentFromFile is not up to date and the properties listed do not correspond to those in the dialog box for the algorithm. In particular, ignore Phi and Ascii Header are missing. These need to be added and explained. Then testing should be easier. Some example ASCII files might be helpful for this.

comment:14 Changed 8 years ago by Martyn Gigg

  • Status changed from reopened to accepted

comment:15 Changed 8 years ago by Martyn Gigg

Update wiki doc for UpdateInstrumentFromFile. Refs #6285

Changeset: a2b20c72a51d5739a38ffa5b8150cd665031b6e5

comment:16 Changed 8 years ago by Martyn Gigg

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

Documentation should be better now.

comment:17 Changed 8 years ago by Karl Palmen

  • Status changed from verify to verifying

comment:18 Changed 8 years ago by Karl Palmen

The error message got from attempting to update from a Nexus File other than ISIS Nexus states that ".nxs" is not a valid file type, yet it works with a .nxs file that is an ISIS Nexus file. A more informative error message is needed and also .nxs is needed in the filetype menu of the browser. I'll make this issue into a separate ticket.

Last edited 8 years ago by Karl Palmen (previous) (diff)

comment:19 Changed 8 years ago by Karl Palmen

  • Status changed from verifying to closed

comment:20 Changed 8 years ago by Martyn Gigg

Update wiki doc for UpdateInstrumentFromFile. Refs #6285

Changeset: a2b20c72a51d5739a38ffa5b8150cd665031b6e5

comment:21 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 7131

Note: See TracTickets for help on using tickets.