The function makes checking for cfa and threshold between 0 and 1, so I would leave the checking. That way the unexperienced user will be warned if something is out of range and would give a bad mask.

As for the one liner, it's probably much cleaner with the unary operator than multiplication like I'm doing.