Repository navigation
Conversation
PicoCentauri
left a comment
There was a problem hiding this comment.
This is an amazing and very good test! Thanks @hejamu and @Quewakira !
| The test suite checks the spectrum routes against a dipole whose susceptibility is known | ||
| exactly. This example walks through that test, ``TestDebyeRelaxation`` in |
There was a problem hiding this comment.
I wouldn't mention the testsuite. As a user I don't care what you do in the tests and I also don't look at them.
| # \qquad \langle \xi_\alpha(t) \xi_\beta(t') \rangle | ||
| # = \delta_{\alpha \beta} \, \delta(t - t'). | ||
| # | ||
| # The equation is linear and the noise is uncorrelated with the past, so multiplying by |
There was a problem hiding this comment.
| # The equation is linear and the noise is uncorrelated with the past, so multiplying by | |
| # The equation is linear and the noise is uncorrelated with the past (no memory), so multiplying by |
| # \chi''(\omega) = \chi_0 \, \frac{\omega \tau}{1 + \omega^2 \tau^2}, \qquad | ||
| # \chi_0 = \frac{\langle \boldsymbol{M}^2 \rangle}{3 V \varepsilon_0 k_B T}, | ||
| # | ||
| # with the loss peak at :math:`\omega \tau = 1`. |
There was a problem hiding this comment.
Maybe add a connecting sentence for the next paragraph. Something like we will use this simple system to validate.
| acf = np.array( | ||
| [np.mean(np.sum(dipole[: n_frames - k] * dipole[k:], axis=1)) for k in lags] | ||
| ) |
There was a problem hiding this comment.
I thought we want an acf function for this?
| # :func:`~spectrumkit.dielectricspectrum.calculate_spectrum_from_dipole` works on the | ||
| # dipole, :func:`~spectrumkit.dielectricspectrum.calculate_spectrum_from_current` on the | ||
| # current :math:`\boldsymbol{J} = \dot{\boldsymbol{M}}`, here a finite difference. Both | ||
| # average the periodogram over 100 segments of 20 ps. |
| # current :math:`\boldsymbol{J} = \dot{\boldsymbol{M}}`, here a finite difference. Both | ||
| # average the periodogram over 100 segments of 20 ps. | ||
|
|
||
| dipole_route = calculate_spectrum_from_dipole(dipole, dt, volume, temperature, segs=100) |
There was a problem hiding this comment.
Should we import the functions in the example not in the local namespace but keep them in the spectrumkit to be better visible that these are our functions?
| dipole_route = calculate_spectrum_from_dipole(dipole, dt, volume, temperature, segs=100) | |
| dipole_route = spectrumkit.calculate_spectrum_from_dipole(dipole, dt, volume, temperature, segs=100) |
|
|
||
|
|
||
| def debye(nu): | ||
| """Debye susceptibility at the frequency ``nu`` in THz.""" |
There was a problem hiding this comment.
Strictly speaking this function doesn't care about the units it is only Thz since our time units are ps
Fixes #11
Changes made in this Pull Request:
PR Checklist
📚 Documentation preview 📚: https://spectrumkit--24.org.readthedocs.build/en/24/