add local and global measures

This is an attempt to create more local measures, bridging the gap from global to per-pixel measures.

Not added to table, this is mainly for discussion.