ISISNeutronMuon / MDANSE

MDANSE: Molecular Dynamics Analysis for Neutron Scattering Experiments
https://www.isis.stfc.ac.uk/Pages/MDANSEproject.aspx
GNU General Public License v3.0
19 stars 4 forks source link

[BUG] Why does the DOS go less then zero and why do they have negative frequencies? #408

Closed ChiCheng45 closed 2 months ago

ChiCheng45 commented 3 months ago

Describe the expected result As far as I understand it the DOS should never be negative but sometimes you can get negative DOS in MDANSE. Also in MDANSE the DOS includes negative frequencies, why is this done?

Additional details Here is the DOS calculated from the CASTEP test trajectories (croco.md) image

ChiCheng45 commented 3 months ago

This also occurs on the old MDANSE

image

ChiCheng45 commented 2 months ago

Negative values of the DOS are due to the details of the FFT. Similar results are seen with function like exp(-ax^2)cos(x) with small sampling windows. This issue is probably expected and usually goes away with the instrument resolution setting applied.