Pulse compression based phased array ultrasonic inspection: Optimization of the system and the code selection