Clustered mask generation

Missing tests
Missing pylint standard