Ticket #4107 (closed: fixed)

Opened 9 years ago

Last modified 5 years ago

Python interface: Add extract methods to MatrixWorkspace to pull out data into numpy

Reported by: Martyn Gigg Owned by: Martyn Gigg
Priority: critical Milestone: Release 2.0
Component: Mantid Keywords:
Cc: Blocked By:
Blocking: Tester: Andrei Savici

Description

The design document requires adding extract methods to MatrixWorkspace so that data can be pulled out into numpy easily.

There will be 3 methods: extract_x, extract_y and extract_e added to MatrixWorkspace. Note that these will have to copy the data as the memory layout of a 2D numpy array does not match the memory layout of a Mantid workspace.

Change History

comment:1 Changed 9 years ago by Martyn Gigg

  • Status changed from new to accepted

comment:2 Changed 9 years ago by Martyn Gigg

Refs #4107. Add methods to get data into numpy arrays from a MatrixWorkspace.

There are now read methods that create a 1D read-only numpy array around the existing data spectra and extract methods that pull out all of the data into 2D arrays. They still need profiling.

Changeset: 73d6eb8fab447a2c970218964ae19b0c4c5b19a0

comment:3 Changed 9 years ago by Martyn Gigg

Revert "Refs #4107. Add methods to get data into numpy arrays from a MatrixWorkspace."

This reverts commit 73d6eb8fab447a2c970218964ae19b0c4c5b19a0. Complex windows errors need fixing first.

Changeset: 2ebcdb9213f7019b6e821b73060203cac0bb5697

comment:4 Changed 9 years ago by Martyn Gigg

Refs #4107. Fix windows issues with numpy exports.

Changeset: 9796096dbdb9b3ea42d698975d4f389e0dc6b0eb

comment:5 Changed 9 years ago by Martyn Gigg

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

comment:6 Changed 9 years ago by Andrei Savici

  • Status changed from verify to verifying
  • Tester set to Andrei Savici

comment:7 Changed 9 years ago by Andrei Savici

  • Status changed from verifying to closed

Works as advertised. Unfortunately, there is no description on wiki.

comment:8 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 4954

Note: See TracTickets for help on using tickets.