SpinW / spinw

SpinW Matlab library for spin wave calculation
http://www.spinw.org
GNU General Public License v3.0
35 stars 15 forks source link

fitspec: cannot handle twins #158

Closed mducle closed 3 months ago

mducle commented 9 months ago

fitspec is a method to fit the energy and intensity of spin wave modes at specific Q-points (like you would measure using a triple-axis spectrometer).

Internally it calls sw_egrid to calculate the scattering intensity swConv. For systems with twins, sw_egrid looks up the twin information in the base spinw obj. However, fitspec calls the original spinw/spinwave method with the fitmode, true flag which means that the base spinw object is not included in the spectrum struct.

We need to either include the spinw object in the spec struct when there is a twin or find some other way to pass on twin information in the spec struct.