As written in Matlab pwelch document, by using an integer for window, a Hamming window of length window(integer) will be used. Also the nfft in python should set to the next power of two greater than length of window.
freqs, PSD = signal.welch(data, fs=2000, window=signal.windows.hamming(len(window)), nfft=num_fft, scaling='density', return_onesided=True, ...
Different methods exist for estimating PSDs. They can be broadly classified as parametric or non-parametric methods. Indeed you should learn which method they used to obtain the associated PSD.
An FFT based PSD estimation is a non-parametric method such as Periodogram and its variants. This method will produce random looking non-smooth output result which ...
The exercise is instructive. Since this is an exercise, I will not do the full problem. I leave that to you.
grabbing the lynx data from
The data is counts and there are no years with a zero count.
and putting it into matlab and taking the log and subtracting the mean of the log,
I would like to post here the link to the accepted answer that I obtained to the question in StackOverflow, as I think it is relevant to this forum.
The original answer by francis is here: post in StackOverflow