Secondly, I would like to bring it to notice that in the same example the
plot that is being obtained shows frequency as 10000, 20000, etc. and the
unit is represented as Hz which I believe is wrong as it should be
millihertz.
I try to keep the frequency in Hz by making the following change in the
code.
plt.plot(stc.times, (1e3 * stc.data.T))
is the change valid?

Hi,
In continuation with the above query.
If during the compute of psd the option db is set as false then how it can
be plotted in db.
stc = compute_source_psd(raw, inverse_operator, lambda2=1. / 9.,
method="dSPM",
tmin=tmin, tmax=tmax, fmin=fmin, fmax=fmax,
pick_ori="normal", n_fft=n_fft, label=label,
dB=False)

To plot power in db I did the following change in code:
plt.plot(stc.times, 10*np.log10(stc.data.T))
I need validation for the changes I have made.

Hi,
Also I want to discuss if the following code is right.

If during the compute of psd the option dB is set as false then how it can
be plotted in db.
stc = compute_source_psd(raw, inverse_operator, lambda2=1. / 9.,
method="dSPM",
tmin=tmin, tmax=tmax, fmin=fmin, fmax=fmax,
pick_ori="normal", n_fft=n_fft, label=label,
dB=False)

To plot power in db I did the following change in code:
plt.plot(stc.times, 10*np.log10(stc.data.T))