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.
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.
Merge branch 'feature/6191_remove_spectradetectormap' into develop