Refactoring #2130
Core API: Reduce the number of possible ways to access data through SimulationResult
Status: | Backlog | Start date: | 30 Jul 2018 | |
---|---|---|---|---|
Priority: | Normal | Due 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).
Related issues
History
#2 Updated by wuttke 4 months ago
- Related to Refactoring #2011: PythonAPI: improve access to the simulation results added
#3 Updated by wuttke 4 months ago
- Related to Refactoring #1918: Core API: review IHistogram class family added