calculating power using pwelch

Hi,

I am using pwelch to calculate the mean beta power for specific channels. I wanted to know if mne.time_frequency.psd_welch accounts for the sampling frequency (eg. 2000Hz) in the eeg data. Additionally, is this the right way to calculate the mean power by normalizing and then converting it to log ? I am guessing that the psd_pwelch alone does not provide the output in log form (based on the example on mne).

n_fft = 512
n_overlap = 128
n_per_segint = 256
psds, freqs = mne.time_frequency.psd_welch(raw, picks = ['C3','C4'],fmin=13,fmax=30, n_fft = n_fft, n_overlap = n_overlap, n_per_seg = n_per_segint,average='mean')
psds /= np.sum(psds, axis=-1, keepdims=True)
psds_log = 10 * np.log10(psds)  
mean=psds_log.mean()

Thanks,
Apoorva.