Ticket #6191 (closed: fixed)

Opened 8 years ago

Last modified 5 years ago

Remove SpDetMap + replace with Ispectrum

Reported by: Nick Draper Owned by: Russell Taylor
Priority: critical Milestone: Release 2.6
Component: Framework Keywords: Maintenance
Cc: Blocked By:
Blocking: #6198, #7176 Tester: Alex Buts

Description


Change History

comment:1 Changed 8 years ago by Nick Draper

  • Priority changed from critical to blocker

comment:2 Changed 8 years ago by Russell Taylor

  • Blocking 6198 added

(In #6198) Suggest waiting for #6191 to avoid wasting time.

comment:3 Changed 8 years ago by Russell Taylor

  • Status changed from new to accepted

comment:4 Changed 8 years ago by Russell Taylor

Re #6191. Remove unneeded include.

Changeset: ceeb0c25189a82e334672fc70e3085f685b9536f

comment:5 Changed 8 years ago by Russell Taylor

Re #6191. Remove unneeded include.

Changeset: d49ae06f56e542c8d19838b64e8b3397a3f0c586

comment:6 Changed 8 years ago by Russell Taylor

Re #6191. Remove unnecessary mentions of the SpectraDetectorMap.

Changeset: 9ec783f400e60c7f36fa3ec014a7d0fc9c19107e

comment:7 Changed 8 years ago by Russell Taylor

Re #6191. Remove unnecessary mentions of the SpectraDetectorMap.

Changeset: 6c89a35eb025b3aa535a6165cef795ee440778b3

comment:8 Changed 8 years ago by Russell Taylor

Re #6191. Remove unneeded include of SpectraDetectorMap.

Changeset: 05986c80ba5c1dd72d42a9d856ae86afca70a3ea

comment:9 Changed 8 years ago by Russell Taylor

Re #6191. Remove unneeded uses of the SpectraDetectorMap from tests.

They had no effect on whether the test passes or not.

Changeset: 6fba5c209faac27675a12e7c3b860db4e7be8ad2

comment:10 Changed 8 years ago by Russell Taylor

Re #6191. Replace use of replaceSpectraMap method in tests

...with setting of detector ID directly in ISpectrum.

The Algorithms package is now free of any mention of the SpectraDetectorMap.

Changeset: d45d411706b532b2331a975022ce9f36e3bf4f34

comment:11 Changed 8 years ago by Russell Taylor

Re #6191. Remove unnecessary mentions of the SpectraDetectorMap.

Changeset: fa4ff0f267617b7131748060ddc8a4871d00b010

comment:12 Changed 8 years ago by Russell Taylor

Re #6191. For now, add include that was coming from EventWorkspace.

Changeset: d392a3ce5fc687c4e6a99a9e81a774b43499da78

comment:13 Changed 8 years ago by Russell Taylor

Re #6191. Remove unneeded uses of SpectraDetectorMap in tests.

Changeset: 79b273f2491071c7680fd386afcec61aff94fa3f

comment:14 Changed 8 years ago by Russell Taylor

Re #6191. For now, add include that was coming from EventWorkspace.

Changeset: 6a7a2a6dbe38a74a14895883f1d60871393dba5b

comment:15 Changed 8 years ago by Russell Taylor

Re #6191. Remove unneeded uses of SpectraDetectorMap in tests.

Changeset: 62fc24725fd2050a4a1af33ef13bda8df2eeab6b

comment:16 Changed 8 years ago by Russell Taylor

Re #6191. More places that mention SpectraDetectorMap but needn't.

Changeset: 03beb82169ce6792a99c1eec2ef0a38897837345

comment:17 Changed 8 years ago by Russell Taylor

Re #6191. Eliminate usage of SpectraDetectorMap in DataHandling tests.

Changeset: 98b5f6465b42127b9a2b1ccdf06d1884d4156cb6

comment:18 Changed 8 years ago by Russell Taylor

Re #6191. Remove mention of SpectraDetectorMap in documentation.

Changeset: e986e86a831665422beb428998a4562ddad2d117

comment:19 Changed 8 years ago by Russell Taylor

Re #6191. Make MatrixWorkspace::m_spectraMap member private.

Changeset: 0288a20f4c276d01ca7c437192f629e77b758741

comment:20 Changed 8 years ago by Russell Taylor

  • Status changed from accepted to assigned
  • Milestone changed from Release 2.5 to Release 2.6

We're now closer to the end of the cycle than the beginning, so I propose to tackle this immediately after the next release (early May).

The commits to this point can be seen as housekeeping to prepare the ground rather than a part of the solution.

comment:21 Changed 7 years ago by Nick Draper

  • Priority changed from blocker to critical
  • Keywords Maintenance added

comment:22 Changed 7 years ago by Russell Taylor

  • Status changed from assigned to accepted

comment:23 Changed 7 years ago by Russell Taylor

Re #6191. Replace a usage of a SpectraDetectorMap method.

Perhaps the new code should be moved into a more cental place, but right now I just want to get to the same behaviour without using the SpectraDetectorMap class.

Changeset: b3a4bfb077e2ed4f834f92c894d60ed6c203f801

comment:24 Changed 7 years ago by Russell Taylor

Re #6191. Move away from using the SpectraDetectorMap.

As noted in the old comment, this may impact performance. However, if the SpectraDetectorMap is to be removed this is a necessary step and I will look at improving performance if it turns out to be necessary.

Changeset: ce9afb2d74ccdd5b662a6a5b99bacfa610482b93

comment:25 Changed 7 years ago by Russell Taylor

Re #6191. Replace a usage of a SpectraDetectorMap method.

Perhaps the new code should be moved into a more cental place, but right now I just want to get to the same behaviour without using the SpectraDetectorMap class.

Changeset: b3a4bfb077e2ed4f834f92c894d60ed6c203f801

comment:26 Changed 7 years ago by Russell Taylor

Re #6191. Move away from using the SpectraDetectorMap.

As noted in the old comment, this may impact performance. However, if the SpectraDetectorMap is to be removed this is a necessary step and I will look at improving performance if it turns out to be necessary.

Changeset: ce9afb2d74ccdd5b662a6a5b99bacfa610482b93

comment:27 Changed 7 years ago by Russell Taylor

Re #6191. Recover performance while not using SpectraDetectorMap

The previous change (ce9afb2) caused a x100 slowdown in the MaskDetectorsInShape performance test. The changes here bring things back to where they were.

Changeset: 32e01973ddfba8984ba1a381012e847376755ba6

comment:28 Changed 7 years ago by Russell Taylor

Re #6191. Recover performance while not using SpectraDetectorMap

The previous change (ce9afb2) caused a x100 slowdown in the MaskDetectorsInShape performance test. The changes here bring things back to where they were.

Changeset: 32e01973ddfba8984ba1a381012e847376755ba6

comment:29 Changed 7 years ago by Russell Taylor

Revert "Re #6191. Recover performance while not using SpectraDetectorMap"

This reverts commit 32e01973ddfba8984ba1a381012e847376755ba6.

Changeset: a195e292352c9077ad92ac4ee95bf2279e21cef6

comment:30 Changed 7 years ago by Russell Taylor

Re #6191. Fix my silly error.

Changeset: 3bc4387040473f3028e0775695a400b7d514a3f4

comment:31 Changed 7 years ago by Russell Taylor

Re #6191. Fix my silly error.

Changeset: 3bc4387040473f3028e0775695a400b7d514a3f4

comment:32 Changed 7 years ago by Russell Taylor

Merge branch 'feature/6191_remove_spectradetectormap' into develop

Re #6191. Conflicts:

Code/Mantid/Framework/API/src/MatrixWorkspace.cpp

Changeset: 32412550f2ede0721f80e99719dc1773c035b98b

comment:33 Changed 7 years ago by Russell Taylor

Re #6191. Clear cppcheck warnings for this file.

Also a couple of other tidy-ups.

Changeset: ec5b0a0b717384a6075fa2054c7fd543b71dc850

comment:34 Changed 7 years ago by Russell Taylor

Re #6191. Tidy up includes.

Changeset: 08b1ba15b7989d746239214d2624d7be748661b4

comment:35 Changed 7 years ago by Russell Taylor

Re #6191. Fix some errors in the test.

Seems like a holdover from older code - args that were really boolean were being declared as ints and there was a problem if one path of an if-else was taken (it isn't at present but will be shortly).

Changeset: b4028d89d79f92a7c5e2f3e290e579409d96863c

comment:36 Changed 7 years ago by Russell Taylor

Re #6191. Add a method to resize the workspace to a specified size.

Also amend padSpectra() to resize to the number of detectors in the instrument rather than using the SpectraDetectorMap. Of the 2 usages of this method, one (SNSLiveEventDataListener) shouldn't care and the other will be changed shortly so this is what we want.

Changeset: 709645dedb2410d66be3ea717dd902b7916c12fe

comment:37 Changed 7 years ago by Russell Taylor

Re #6191. Eradicate use of the SpectraDetectorMap in LoadEventNexus.

Changeset: 2616ad7d504664896eeb4e42a2c1307fe23b7aeb

comment:38 Changed 7 years ago by Russell Taylor

Re #6191. Remove unnecessary mentions of the spectra-detector map.

Changeset: 46875d3b1dbbd6e2ce5b0906e2dfb30edc6cf29a

comment:39 Changed 7 years ago by Russell Taylor

Re #6191. Remove use of SpectraDetectorMap from LoadSpice2D.

Changeset: da8ccc744a98fe1c85182c026d4fbae4ecd937b8

comment:40 Changed 7 years ago by Russell Taylor

RE #6191. Test for detector ID.

Changeset: 69eef7ca54374bd81c2c04a1625aaa9b9f8f570d

comment:41 Changed 7 years ago by Russell Taylor

Re #6191. Remove usage of SpectraDetectorMap.

Changeset: e26fa7debe87a381cb1f394ee579628f969fe240

comment:42 Changed 7 years ago by Russell Taylor

Re #6191. Clear cppcheck warnings for this file.

Also a couple of other tidy-ups.

Changeset: ec5b0a0b717384a6075fa2054c7fd543b71dc850

comment:43 Changed 7 years ago by Russell Taylor

Re #6191. Tidy up includes.

Changeset: 08b1ba15b7989d746239214d2624d7be748661b4

comment:44 Changed 7 years ago by Russell Taylor

Re #6191. Fix some errors in the test.

Seems like a holdover from older code - args that were really boolean were being declared as ints and there was a problem if one path of an if-else was taken (it isn't at present but will be shortly).

Changeset: b4028d89d79f92a7c5e2f3e290e579409d96863c

comment:45 Changed 7 years ago by Russell Taylor

Re #6191. Add a method to resize the workspace to a specified size.

Also amend padSpectra() to resize to the number of detectors in the instrument rather than using the SpectraDetectorMap. Of the 2 usages of this method, one (SNSLiveEventDataListener) shouldn't care and the other will be changed shortly so this is what we want.

Changeset: 709645dedb2410d66be3ea717dd902b7916c12fe

comment:46 Changed 7 years ago by Russell Taylor

Re #6191. Eradicate use of the SpectraDetectorMap in LoadEventNexus.

Changeset: 2616ad7d504664896eeb4e42a2c1307fe23b7aeb

comment:47 Changed 7 years ago by Russell Taylor

Re #6191. Remove unnecessary mentions of the spectra-detector map.

Changeset: 46875d3b1dbbd6e2ce5b0906e2dfb30edc6cf29a

comment:48 Changed 7 years ago by Russell Taylor

Re #6191. Remove use of SpectraDetectorMap from LoadSpice2D.

Changeset: da8ccc744a98fe1c85182c026d4fbae4ecd937b8

comment:49 Changed 7 years ago by Russell Taylor

RE #6191. Test for detector ID.

Changeset: 69eef7ca54374bd81c2c04a1625aaa9b9f8f570d

comment:50 Changed 7 years ago by Russell Taylor

Re #6191. Remove usage of SpectraDetectorMap.

Changeset: e26fa7debe87a381cb1f394ee579628f969fe240

comment:51 Changed 7 years ago by Russell Taylor

Re #6191. Pass by reference, not value.

Changeset: ce60a8b76c2cfb5666c154c2fff5de673f23b0ea

comment:52 Changed 7 years ago by Russell Taylor

Re #6191. Add a method to set all the detector IDs at once.

Without having to call clear followed by add to make sure there was not anything already there.

Changeset: f23d7572fab1e3a9f299854f8b12979569025b9e

comment:53 Changed 7 years ago by Russell Taylor

Re #6191. Don't use the SpectraDetectorMap.

Changeset: 3407c5df4a95053d8c2ee2e227e2219082836bd0

comment:54 Changed 7 years ago by Russell Taylor

Re #6191. Pass by reference, not value.

Changeset: ce60a8b76c2cfb5666c154c2fff5de673f23b0ea

comment:55 Changed 7 years ago by Russell Taylor

Re #6191. Add a method to set all the detector IDs at once.

Without having to call clear followed by add to make sure there was not anything already there.

Changeset: f23d7572fab1e3a9f299854f8b12979569025b9e

comment:56 Changed 7 years ago by Russell Taylor

Re #6191. Don't use the SpectraDetectorMap.

Changeset: 3407c5df4a95053d8c2ee2e227e2219082836bd0

comment:57 Changed 7 years ago by Russell Taylor

Re #6191. Add a setDetectorIDs overload for lvalues.

In the one place that I've changed to use it I could infact have employed std::move to bind to the other version but that would mean yet another mac ifdef.

Changeset: 35d4825ebab27f22909edf57dd4e22e44e28fe3b

comment:58 Changed 7 years ago by Russell Taylor

Re #6191. Add a setDetectorIDs overload for lvalues.

In the one place that I've changed to use it I could infact have employed std::move to bind to the other version but that would mean yet another mac ifdef.

Changeset: 35d4825ebab27f22909edf57dd4e22e44e28fe3b

comment:59 Changed 7 years ago by Russell Taylor

Re #6191. Remove SpectraDetectorMap use from LoadMuonNexus2.

It was just setting up a 1-1 mapping, which is what you get by default anyway.

Changeset: 81ac432ec7538e9a8621db3cecf885fc3c42fef2

comment:60 Changed 7 years ago by Russell Taylor

Re #6191. Remove use of SpectraDetectorMap.

Changeset: 49f536daba70f1b3d06c4a62671734fec77c45b7

comment:61 Changed 7 years ago by Russell Taylor

Re #6191. Remove SpectraDetectorMap from comment.

Changeset: 6161718cef66c1a47630d73c1f254c78a3da2f04

comment:62 Changed 7 years ago by Russell Taylor

Re #6191. Use new setDetectorIDs method.

Changeset: d6249c7882d0ac764401f0dc4e6566dbbe2728cd

comment:63 Changed 7 years ago by Russell Taylor

Revert "Re #6191. Don't use the SpectraDetectorMap."

This breaks some system tests. Looks like I'd better work from the other end or the inside out instead.

This reverts commit 3407c5df4a95053d8c2ee2e227e2219082836bd0.

Changeset: f6eb0e0c87acd701f67ad170ed8312a2089e5da6

comment:64 Changed 7 years ago by Russell Taylor

Re #6191. Remove SpectraDetectorMap use from LoadMuonNexus2.

It was just setting up a 1-1 mapping, which is what you get by default anyway.

Changeset: 81ac432ec7538e9a8621db3cecf885fc3c42fef2

comment:65 Changed 7 years ago by Russell Taylor

Re #6191. Remove use of SpectraDetectorMap.

Changeset: 49f536daba70f1b3d06c4a62671734fec77c45b7

comment:66 Changed 7 years ago by Russell Taylor

Re #6191. Remove SpectraDetectorMap from comment.

Changeset: 6161718cef66c1a47630d73c1f254c78a3da2f04

comment:67 Changed 7 years ago by Russell Taylor

Re #6191. Use new setDetectorIDs method.

Changeset: d6249c7882d0ac764401f0dc4e6566dbbe2728cd

comment:68 Changed 7 years ago by Russell Taylor

Revert "Re #6191. Don't use the SpectraDetectorMap."

This breaks some system tests. Looks like I'd better work from the other end or the inside out instead.

This reverts commit 3407c5df4a95053d8c2ee2e227e2219082836bd0.

Changeset: f6eb0e0c87acd701f67ad170ed8312a2089e5da6

comment:69 Changed 7 years ago by Russell Taylor

Re #6191. Spotted an (absence of) initialisation problem.

Changeset: 41bb76dc3e6f7135a3709930f4402c95d9ae466a

comment:70 Changed 7 years ago by Russell Taylor

Re #6191. Remove erroneously copied comment.

Changeset: 88c862c3438d2bd32bbf9ee96437597b1000602c

comment:71 Changed 7 years ago by Russell Taylor

Re #6191. Pass through to buildNearestNeighbours method.

It does the same thing, but includes more error checking.

Changeset: f56d707de201ecbb7a3fe39d78265b4e7f4da065

comment:72 Changed 7 years ago by Russell Taylor

Re #6191. Add a new, much thinner class for data-detector mapping.

Usually, this information will be held in a workspace's collection of ISpectrum objects and the existing (I)SpectraDetectorMap class will be going away. However, there is occasionally a need to hold the mapping separately from data. Examples are for the NearestNeighbours stuff and if you need mapping for data that is not in a workspace (e.g. not yet loaded in or workspace doesn't hold all spectra). This class will be used in these circumstances but will be transient, not persistent (i.e. the workspace will not have it as a member).

Changeset: f9b20f80e2e089847e2a19863b26ac2332f7b062

comment:73 Changed 7 years ago by Russell Taylor

Re #6191. Use new SpectrumDetectorMapping in NearestNeighbours code.

I realise that there is a reduction in abstraction here as I haven't replaced the ISpectraDetectorMap interface. It didn't seem sensible having to reimplement the map iterators when this is the only place it is used. What I have done is aliased the unordered_map that's passed in to ISpectrumDetectorMapping. The alternative I considered was placing SpectrumDetectorMapping in Geometry, but I wanted the class to be immutable and that meant taking in a MatrixWorkspace in the constructor.

Changeset: 8678e600c8ccd4cbf8e63eaad0edfce27fb993a6

comment:74 Changed 7 years ago by Russell Taylor

Re #6191. Remove unnecessary includes.

I'll be making other changes to this header so it won't be a huge rebuild in vain! Also moved a method declaration to be with the other similar methods.

Changeset: ee953e12127a9987af8900e4b0818b4b724120a3

comment:75 Changed 7 years ago by Russell Taylor

Re #6191. Remove unnecessary calls to Workspace::generateSpectraMap.

Changeset: 781b6704a6ac0f5bdb1a20315990deef7e40c34b

comment:76 Changed 7 years ago by Russell Taylor

Re #6191. Sum event lists even if empty.

This ensures that the detector IDs are copied over properly.

Changeset: 546bb9a589017dd8508eedd496e9a468b1d42a28

comment:77 Changed 7 years ago by Russell Taylor

Re #6191. Don't go via SpectraDetectorMap to update ISpectrum objects.

Changeset: 66a825409f1d2572d5801f04c8818d3d00bbbbb0

comment:78 Changed 7 years ago by Russell Taylor

Re #6191. Remove unnecessary calls to generateSpectraMap in tests.

Changeset: 83d8c81326ce4bfce083cc9cfe3633e1fccc791e

comment:79 Changed 7 years ago by Russell Taylor

Merge branch 'feature/6191_remove_spectradetectormap' into develop

comment:80 Changed 7 years ago by Russell Taylor

Re #6191. Fix merge problem.

It had retained a reference to a class that's now gone in other branches.

Changeset: cd085677bb1c88426f2707077b4e0dec077405ad

comment:81 Changed 7 years ago by Russell Taylor

Merge branch 'feature/6191_remove_spectradetectormap' into develop

comment:82 Changed 7 years ago by Russell Taylor

Re #6191. Remove MatrixWorkspace::getWorkspaceIndexToDetectorIDMap.

It is redundant alongside the ISpectrum objects and was only being used in tests and in one place in the ISIS SANS GUI (for which I've put in what I believe to be equivalent code, though there's no test to verify it (too much logic in the GUI layer). This also resolves part of #6198.

Changeset: 873db8e8c13067e1aeecc5097570f92dbe1e7ead

comment:83 Changed 7 years ago by Russell Taylor

Re #6191. Remove MatrixWorkspace::getWorkspaceIndexToSpectrumMap.

It is redundant (just use ISpectrum) and was not being used anywhere. With this commit, #6198 is half way done.

Changeset: 757dc57b72b668dffa384d007304cfe9cf7f8304

comment:84 Changed 7 years ago by Russell Taylor

Re #6191. Remove unnecessary calls to generateSpectraMap().

Changeset: 8ece8d5e4e9027ce6c028ca01577ee2b51c8d14a

comment:85 Changed 7 years ago by Russell Taylor

Re #6191. Remove another unused method.

Changeset: 6bfa95beb25f066b1c6cd30ec1149dc6bd0fdfd0

comment:86 Changed 7 years ago by Russell Taylor

Re #6191. Doxygen warning fixes.

Changeset: 7bccd5fccd200bcf4d93e61ab2f603ccac76dd3d

comment:87 Changed 7 years ago by Russell Taylor

Merge branch 'feature/6191_remove_spectradetectormap' into develop

comment:88 Changed 7 years ago by Karl Palmen

Merge branch 'feature/6994_wikimaker' into develop into 6856_ConvertToDiffractionMDWS_v2

comment:89 Changed 7 years ago by Russell Taylor

Merge branch 'feature/6191_remove_spectradetectormap' into develop into 6856_ConvertToDiffractionMDWS_v2

comment:90 Changed 7 years ago by Russell Taylor

Merge branch 'feature/6191_remove_spectradetectormap' into develop into 6856_ConvertToDiffractionMDWS_v2

comment:91 Changed 7 years ago by Andrei Savici

Merge branch 'bugfix/3393_ConvertToPointData_axis' into develop into 6856_ConvertToDiffractionMDWS_v2

comment:92 Changed 7 years ago by Nick Draper

Merge branch 'feature/6669_LoadLogPropertyTable' into develop into 6856_ConvertToDiffractionMDWS_v2

comment:93 Changed 7 years ago by Vickie Lynch

Merge branch 'feature/6848_FindGon' into develop into 6856_ConvertToDiffractionMDWS_v2

comment:94 Changed 7 years ago by Andrei Savici

Merge branch 'feature/7110_fedora19' into develop into 6856_ConvertToDiffractionMDWS_v2

comment:95 Changed 7 years ago by Russell Taylor

Merge branch 'feature/6191_remove_spectradetectormap' into develop into 6856_ConvertToDiffractionMDWS_v2

comment:96 Changed 7 years ago by Russell Taylor

Merge branch 'feature/6191_remove_spectradetectormap' into develop into 6856_ConvertToDiffractionMDWS_v2

comment:97 Changed 7 years ago by Russell Taylor

Merge remote-tracking branch 'origin/feature/7139_SliceViewer_Crash' into 6856_ConvertToDiffractionMDWS_v2

comment:98 Changed 7 years ago by Russell Taylor

Merge branch 'feature/6191_remove_spectradetectormap' into develop into 6856_ConvertToDiffractionMDWS_v2

comment:99 Changed 7 years ago by Russell Taylor

Merge branch 'feature/6191_remove_spectradetectormap' into develop into 6856_ConvertToDiffractionMDWS_v2

comment:100 Changed 7 years ago by Russell Taylor

Merge branch 'feature/6191_remove_spectradetectormap' into develop into 6856_ConvertToDiffractionMDWS_v2

comment:101 Changed 7 years ago by Karl Palmen

Merge branch 'feature/6994_wikimaker' into develop into 6856_ConvertToDiffractionMDWS_v2

comment:102 Changed 7 years ago by Russell Taylor

Merge branch 'feature/6191_remove_spectradetectormap' into develop into 6856_ConvertToDiffractionMDWS_v2

comment:103 Changed 7 years ago by Russell Taylor

Merge branch 'feature/6191_remove_spectradetectormap' into develop into 6856_ConvertToDiffractionMDWS_v2

comment:104 Changed 7 years ago by Andrei Savici

Merge branch 'bugfix/3393_ConvertToPointData_axis' into develop into 6856_ConvertToDiffractionMDWS_v2

comment:105 Changed 7 years ago by Nick Draper

Merge branch 'feature/6669_LoadLogPropertyTable' into develop into 6856_ConvertToDiffractionMDWS_v2

comment:106 Changed 7 years ago by Vickie Lynch

Merge branch 'feature/6848_FindGon' into develop into 6856_ConvertToDiffractionMDWS_v2

comment:107 Changed 7 years ago by Andrei Savici

Merge branch 'feature/7110_fedora19' into develop into 6856_ConvertToDiffractionMDWS_v2

comment:108 Changed 7 years ago by Russell Taylor

Merge branch 'feature/6191_remove_spectradetectormap' into develop into 6856_ConvertToDiffractionMDWS_v2

comment:109 Changed 7 years ago by Russell Taylor

Merge branch 'feature/6191_remove_spectradetectormap' into develop into 6856_ConvertToDiffractionMDWS_v2

comment:110 Changed 7 years ago by Russell Taylor

Merge remote-tracking branch 'origin/feature/7139_SliceViewer_Crash' into 6856_ConvertToDiffractionMDWS_v2

comment:111 Changed 7 years ago by Russell Taylor

Merge branch 'feature/6191_remove_spectradetectormap' into develop into 6856_ConvertToDiffractionMDWS_v2

comment:112 Changed 7 years ago by Russell Taylor

Merge branch 'feature/6191_remove_spectradetectormap' into develop into 6856_ConvertToDiffractionMDWS_v2

comment:113 Changed 7 years ago by Russell Taylor

Merge branch 'feature/6191_remove_spectradetectormap' into develop into 6856_ConvertToDiffractionMDWS_v2

comment:114 Changed 7 years ago by Russell Taylor

  • Blocking 7176 added

comment:115 Changed 7 years ago by Russell Taylor

Re #6191. Remove check that's no longer valid.

Changeset: 8d37eddeb0e3d223efe853d39f325f77f3f6ea00

comment:116 Changed 7 years ago by Russell Taylor

Re #6191. Change getDetectorIDToWorkspaceIndexMap to use ISpectrum.

Instead of spectraDetectorMap.

Changeset: b4a5b062deac556c5cc25edf75258971e02247e8

comment:117 Changed 7 years ago by Russell Taylor

Re #6191. Remove unnecessary calls to generateSpectraMap().

Changeset: 38e3a4f111c85c60586f6f39dd52d021249f16f9

comment:118 Changed 7 years ago by Russell Taylor

Re #6191. Remove unnecessary call to updateSpectraUsingMap().

Changeset: 630edf7ee37776f57642702206068befb8414ff5

comment:119 Changed 7 years ago by Russell Taylor

Re #6191. Remove unneeded code.

Changeset: ecbb2ab7b3d9ac50e773547c315a18ce46eaf51d

comment:120 Changed 7 years ago by Russell Taylor

Merge branch 'feature/6191_remove_spectradetectormap' into develop

comment:121 Changed 7 years ago by Russell Taylor

Re #6191. Add a constructor from a pair of vectors.

Changeset: b518f8678d8bd7be2614cd2d0512252b7f5aac68

comment:122 Changed 7 years ago by Russell Taylor

Re #6191. Use SpectrumDetectorMapping class to generate mapping.

Changeset: f11969fb0bbc1fde3f9a9a156aeab3cf2febc2fb

comment:123 Changed 7 years ago by Russell Taylor

Merge branch 'feature/6191_remove_spectradetectormap' into develop

comment:124 Changed 7 years ago by Russell Taylor

Re #6191. Add a method to construct the mapping from c-style arrays.

Ugly, and not safe at all, but unless a wider refactoring is going to happen this is needed to construct things from the ISISRAW reader.

Changeset: 07c85f1f204f13665f74a1bbcf2b9b6b44d25706

comment:125 Changed 7 years ago by Russell Taylor

Re #6191. Method to update detector IDs from the new mapping class.

Takes in a SpectrumDetectorMapping objects and goes through the ISpectrum objects updating the detector IDs according to the previously set spectrum numbers.

Changeset: 2839b48c0a6c58e0b3f68c3b2a32ddbb8075c26a

comment:126 Changed 7 years ago by Russell Taylor

Re #6191. Use new workspace method to update detector IDs.

Changeset: 7efef5df516428dab72b964f1f5a1978aa347e29

comment:127 Changed 7 years ago by Russell Taylor

Re #6191. LoadRaw no longer touches the SpectraDetectorMap at all.

Instead it uses the SpectrumDetectorMapping class where necessary. There may be some redundant setting of the detector IDs but this thing is too complex to mess with more than necessary.

Changeset: 49debd36e746fcad1544ab5d788e438e6ddcfdb8

comment:128 Changed 7 years ago by Russell Taylor

Merge branch 'feature/6191_remove_spectradetectormap' into develop

comment:129 Changed 7 years ago by Russell Taylor

Re #6191. Remove SpectraDetectorMap usage from LoadISISNexus2.

There are problems with this algorithm though - the spectrum numbering is all wrong if loading only part of the dataset. This behaviour is invariant under the changes here and is the subject of #7196.

Changeset: a6218efe1b3d52c0d7664d3da9151ac262f09cbd

comment:130 Changed 7 years ago by Russell Taylor

Merge branch 'feature/6191_remove_spectradetectormap' into develop

comment:131 Changed 7 years ago by Russell Taylor

Re #6191. Remove SpectraDetectorMap usage from ISIS live data readers.

Changeset: 4fb023dd541ae410a709392284674b2ca99ce942

comment:132 Changed 7 years ago by Russell Taylor

Merge branch 'feature/6191_remove_spectradetectormap' into develop

comment:133 Changed 7 years ago by Russell Taylor

Re #6191. rebuildSpectraMapping doesn't touch the SpectraDetectorMap.

Changeset: b11cb76beda7bdc548afdc46eac698794886152f

comment:134 Changed 7 years ago by Russell Taylor

Re #6191. Reapply the removal of the SpectraDetectorMap.

Revert "Revert "Re #6191. Don't use the SpectraDetectorMap."" This reverts commit f6eb0e0c87acd701f67ad170ed8312a2089e5da6.

Changeset: e1cd694261cb6744313c6d4144a0d10bfdeb02f6

comment:135 Changed 7 years ago by Russell Taylor

Merge branch 'feature/6191_remove_spectradetectormap' into develop

comment:136 Changed 7 years ago by Russell Taylor

Re #6191. Remove SpectraDetectorMap member from MatrixWorkspace.

And the methods that used it (that were not called anywhere any longer).

Changeset: 679def2dba893a3b4f09a373d631f44e67395839

comment:137 Changed 7 years ago by Russell Taylor

Re #6191. Remove the SpectraDetectorMap class.

Changeset: c600de10c6e5b9f7a873eaf5ce6929c8a620b509

comment:138 Changed 7 years ago by Russell Taylor

Re #6191. Remove ISpectraDetectorMap & OneToOneSpectraDetectorMap.

Changeset: da9de34a640746d8aebd5c85d1b8f32b76619352

comment:139 Changed 7 years ago by Russell Taylor

Re #6191. Remove last few references to the SpectraDetectorMap.

Mostly in comments, plus one forward declaration.

Changeset: d2e5e8373a9d09f6b9ae4286f6024a196f5f45b2

comment:140 Changed 7 years ago by Russell Taylor

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

Testing: The branch is feature/6191_remove_spectradetectormap

There's no getting around the fact that this is a big one. Sorry!
I relied heavily on our automated testing - including the performance tests - in doing this work and you will realistically have to do the same. This is why the task was performed at the start of the iteration!

As given in the title, most places that weren't already using ISpectrum now are. There were a couple of places that needed to hold the mapping decoupled from the workspace, so I created the small SpectrumDetectorMapping class to do that. That's probably the main thing to review manually.

comment:141 Changed 7 years ago by Alex Buts

  • Status changed from verify to verifying
  • Tester set to Alex Buts

comment:142 Changed 7 years ago by Alex Buts

  • Status changed from verifying to closed

passed mainly by code inspection and running selected tests. All tests will be run by server anyway.

The code related to spectra-detector map looks much clearer now.

comment:143 Changed 7 years ago by Nick Draper

  • Component changed from Mantid to Framework

comment:144 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 7037

Note: See TracTickets for help on using tickets.