Refactoring #2130

Reduce the number of possible ways to access data through SimulationResult

Added by dmitry over 1 year ago.

Status:BacklogStart date:30 Jul 2018
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:-
Target version:-

Description

Currently three ways of accessing results in SimulationResult exist:

1. through SimulationResult::data (returns OutputData array)
2. methods SimulationResult::histogram1d and SimulationResult::histogram2d
3. getting intensity values as a numpy array

Histogram methods should be probably removed for the following reasons:

1. histogram interface is heavier than underlying
2. It is not universal (depending on the task one need to call histogram1d or histogram2d, and sometimes it is enough to have just histogram)
3. Histogram functionality is not important in python.

One need also carefully handle accessing the innards of temporary objects during this refactoring.

The best solution would be also hiding OutputData from python scope and leaving only SimulationResult with
numpy array accessors (without OutputData or Histogram exposed to python).

Also available in: Atom PDF