We present the calibration method and characterization of a monolithically integrated semiconductor optical pulse shaper. The photonic integrated circuit has been realized in an InP-based generic photonic foundry process. In this circuit, a 20-channel arrayed waveguide grating filter with 50-GHz channel spacing and 20 phase modulators and semiconductor optical amplifiers are combined on the InP chip. By calibrating the device, a mathematical description of the pulse shaper is obtained. The theoretical procedure for complete calibration of the device is presented, and the details of the experiments and measurement setups are given. We demonstrate that the frequency response of the pulse shaper can be calculated from the response of the individual channels in a reference state of the control signals and a separate mask function that describes the effect of a change in the control signals.