I have a question about the computation of coherence between two signals with Welch's method.
The two signals are relatively short (e.g. 256 samples) and I would like as correct an estimate of shared frequencies between the signals as possible.
I am aware that I need to average over more than one segment of data for meaningful results and that overlapping segments will improve accuracy. Computational effort in the computation is not an issue, so I am using $noverlap = nseg-1$. Acquiring more samples is not possible.
The coherence is computed as $C_{xy} = \frac{|G_{xy}|^2}{G_{xx} G_{yy}}$ where $G_{xy}$ is the Cross-Spectral Density and $G_{xx}$ and $G_{yy}$ are the Power Spectral Densities of both signals, respectively.
My question is:
What is the optimal length of segments?
nseg=ndata (no averaging) leads to $C_{xy} = 1$ whereas a too small value of nseg leads to insufficient frequency resolution.
Is there any value for nseg for which an optimal compromise between sufficient averaging and frequency resolution can be found?
Both theoretical and best-practice suggestions would be appreciated!