Shapes/profiles for peaks with no profiles in neighbour range
Assigning shapes to peaks and integrating peaks with no strong neighbouring profiles in the given range will fail, and the peaks rejected. This can be avoided by finding the nearest neighbour with an assigned shape or profile and using that instead.
This will require some careful thought, and probably use of octree searching for relevant nearest neighbours.