The photocurrent and photovoltage measurements in IMPS/IMVS can be described in terms of Bode diagram showing amplitude and phase as a function of frequency.
The relation between $X$ and $Y$ components and the phase $\phi$ is the following:
$$
\tan(\phi) = \frac{Y}{X}
$$
or conversely
$$
\phi \equiv \arctan\left( \frac{Y}{X}\right).
$$
The phase $\phi$ is the phase difference between the measured signal, i.e., photocurrent $I$ or photovoltage $V$, and the stimulus, i.e., light intensity $P$.
The light intensity is expressed as:
$$
P = P_{DC} - P_{AC}\cos(\omega t).
$$
Notice the “-” sign before the $\cos$ function. It comes from the technical choice because $-\cos(\omega t)$ has a minimum at $t=0$ and the light intensity is also minimal with that choice. In particular, if $P_{DC} =P_{AC} $ then the light intensity will start at 0 value at time $t=0$.
Light intensity is the stimulus, so the “in-phase” component is given by $-\cos(\omega t)$. We use a convention or basis orientation such that the “quadrature” component is given by $-\sin(\omega t)$.
IMVS
It follows from the above that a photovoltage signal would be given by
$$
V = V_{DC} - V_{AC}\cos(\omega t - \phi_V),
$$
where the subscript $_V$ at the phase is just the reminder that we are measuring photovoltage.
If the phase $\phi_{V}=0$ then the signal (red line in the inspect plot) will be in phase with the light intensity (yellow line in the inspect plot).
For $\phi_{V} \gt 0$ the signal will be shifted to the right with respect to the stimulus.
The Bode plot will show
$$
\phi = \phi_{V}.
$$
IMPS
The considerations provided for the IMVS are also valid in the IMPS. However, there is one more convention that needs to be applied here: The photocurrent measured by, for example, a photodiode is negative. In other words, the photocurrent for very slow stimulus needs to be perfectly out of sync with the light intensity. This results in the following formula for the photocurrent:
$$
I = I_{DC} - I_{AC}\cos(\omega t -(-\pi+\phi_I)) = I_{DC}+I_{AC}\cos(\omega t -\phi_I).
$$
Here the Bode plot will show phase
$$
\phi = -\pi+\phi_I.
$$
Similarly to the IMVS, positive $\phi_I$ will shift the signal to the right in the inspect plot and $\phi_I\lt 0$ will shift it to the left with respect to the stimulus.