Ticket #3775 (closed: wontfix)
Thoroughly review Axis (and its subclasses)
Reported by: | Russell Taylor | Owned by: | Russell Taylor |
---|---|---|---|
Priority: | critical | Milestone: | Release 3.3 |
Component: | Framework | Keywords: | Maintenance |
Cc: | Blocked By: | ||
Blocking: | Tester: | Vickie Lynch |
Description (last modified by Russell Taylor) (diff)
The Axis class was originally created to abstract certain things (units, spectrum numbers) out of the workspace class itself because it was thought that we may in the future deal with higher dimensions by adding further concrete implementations of MatrixWorkspace.
Now the MD business has gone in a completely different direction, Workspace1D has gone, and it seems like the whole Axis concept is over-engineered and over-complicated (or at least not well understood by developers).
Another part of the thinking behind it was that the 'vertical' axis (axis 1) holds usually, but not always, spectrum numbers. In the cases where it didn't, you could have a different type of axis there and lose the spectrum numbers completely. Now the spectrum number is (unfortunately, in my opinion) tightly coupled into the workspace in the ISpectrum class - so the argument for SpectraAxis as a separate class is weaker.
Finally, I see a lot of "If one kind of axis, do this; else, do that; else, do the other" type of code around in the use of the Axis classes, rather than using polymorphism. At a minimum, this should be addressed and the classes themselves should be cleaned up where necessary.
Change History
comment:2 Changed 9 years ago by Nick Draper
- Owner set to Russell Taylor
- Priority changed from major to critical
- Status changed from new to assigned
comment:3 Changed 9 years ago by Nick Draper
- Milestone changed from Iteration 32 to Iteration 33
Moved to iteration 33 at iteration 32 code freeze
comment:4 Changed 8 years ago by Nick Draper
- Milestone changed from Release 2.1 to Release 2.2
Moved at end of release 2.1
comment:5 Changed 8 years ago by Russell Taylor
The temptation is to do away with Axis altogether and say that anyone wanting numeric axes on both x & y should just use an MD workspace of 2 dimensions. Unfortunately, this would be a breaking change w.r.t. reloading any saved nexus files of this type. It may also change how such workspaces have to be visualised.
As far as I can see, the following algorithms create a NumericAxis 'up the side':
ConvertSpectrumAxis, Qxy, Rebin2D, SofQW, LoadSPE (also CreateWorkspace & Transpose).
However, a further complication is the 'TextAxis' - it's not obvious how to replace that.
The following algorithms create a TextAxis:
FFT, RealFFT, FitMW, PlotAssymetryByLogValue, PeakIntensityVsRadius (also CreateWorkspace)
comment:6 Changed 8 years ago by Russell Taylor
While testing #5584 I noticed that the clone methods only do a shallow copy of the unit pointer. Formerly, this would have been fine, but now we don't re-use unit objects. The SplineBackgroundTest unit test will fail when this is fixed.
comment:7 Changed 8 years ago by Nick Draper
- Milestone changed from Release 2.2 to Release 2.3
Moved at the end of release 2.2
comment:8 Changed 8 years ago by Nick Draper
- Milestone changed from Release 2.3 to Release 2.4
Moved to milestone 2.4
comment:9 Changed 8 years ago by Nick Draper
- Milestone changed from Release 2.4 to Release 2.5
Moved at the code freeze for release 2.4
comment:10 Changed 7 years ago by Russell Taylor
- Milestone changed from Release 2.5 to Release 2.6
Move the tickets I'm definitely not going to do this iteration so that I can better see the ones that I might.
comment:13 Changed 7 years ago by Nick Draper
- Milestone changed from Release 2.6 to Backlog
Moved to the Backlog after R2.6
comment:14 Changed 7 years ago by Russell Taylor
- Keywords Maintenance added
- Description modified (diff)
comment:17 Changed 7 years ago by Nick Draper
- Status changed from new to assigned
Bulk move to assigned at the introduction of the triage step
comment:18 Changed 6 years ago by Russell Taylor
- Status changed from assigned to verify
- Resolution set to wontfix
Never got to it :(
I think that they're probably too baked in anyway.
comment:19 Changed 6 years ago by Vickie Lynch
- Status changed from verify to verifying
- Tester set to Vickie Lynch
comment:22 Changed 5 years ago by Stuart Campbell
This ticket has been transferred to github issue 4622