more changes to PH opt (speed up of readout decoding; check against failed optimizations before writing out DACs