PsfexPsfDeterminerTask.determinePsf uses two undefined variables: pcval and pc
I suggest cleaning up all the python code so it passes pep8. That would make it much easier to spot serious errors such as this (since right now they are buried in a sea of minor violations).
Speaking of which: this could be a really nice time to fix
DM-4905, as well – another undefined variable spotted by flake8.