Gosh, that's such a good question. Generally I'd advise doing it early in the workflow, after pixel editing but before your Levels work.
However, technically speaking, you could do it any time. If you forgot to do it early, and had to do it after Levels, that would be ok too.