code revision suggestions for Ranger sample

Lewys,

Take a look here and see what you think.  As I wrote in the email, I would move most of your code to a separate file (if you keep your project in Hyperspy, it might belong in misc), and then call the code as part of the class.

This is NOT working code - I mean this only as a set of code & style changes to discuss.  I'll keep working on it as you flesh it out more.