add unit/integrted tests for dpc

you only need to make a copy if you are using bad pixels, remember `im = im[...]` changes where `im` points, not the object it is pointing at.