Add weight_by_errors option. Currently default to True. If False, just use errors for making mask