Basic questions on SpinW

246 views
Skip to first unread message

qzhan...@gmail.com

unread,
Nov 9, 2017, 8:42:13 AM11/9/17
to SpinW Forum
Dear Sándor,
I have basic questions to ask for your advice.
1). Where can I obtain the error bars of the J after I fitted the spin waves?
2). Does RW show the goodness of fits? How much value means a good fit?
3). Is there a way to fix two J magnitude the same to fit the spin waves?
4). Is there a way to get the fitted data (E and Q)?
5). After one simulates the spin waves, may we get the simulated data points out to plot?
Thank you very much in advance and I look forward to your advice.
Best
Qiang

SpinW

unread,
Nov 15, 2017, 8:39:02 AM11/15/17
to SpinW Forum
Dear Qiang,

please find my aswers below.

1). Where can I obtain the error bars of the J after I fitted the spin waves? 

Currently the calculation of error bars on the J-values is not implemented, but I hope it will be available soon. The main reason is that the current algorithm uses binning of the dispersion which does not enable to collect derivatives. I am working on a new non-heuristic fitting that will return error bars.

2). Does RW show the goodness of fits? How much value means a good fit?

The original version returned the R2-value, the latest version (you can download from gitHub, the master branch) will return the reduced chi^2 value, the description of this value is here: https://en.wikipedia.org/wiki/Reduced_chi-squared_statistic

3). Is there a way to fix two J magnitude the same to fit the spin waves? 

Yes, when you create a model using the spinw.addcoupling() function, assign the same J to the two different bonds and they will be coupled.

4). Is there a way to get the fitted data (E and Q)? 

The calculated dispersion is not returned directly, as these are binned energies and probably won't be much of a use. You can recalculate the spectrum using the spinw.spinwave() function at the measured Q-points to get the precise values. Also you can use the sw_plotspec() function to plot the measured data over the calculated data, see https://www.psi.ch/spinw/tutorial-35
Also using the master branch, you can just use the following to overplot data on simulation:

figure

sw_plotspec(spec,'dE',1.5,'dat','LuVO3_fitted_modes.txt','datFormat',{'ok' 'markerfacecolor','g'})

legend('off')


Where the 'dat' option should point to the fitted data file, while the spec should be calculated along the measured data. sw_plotspec will ommit data points that don't lie on the calculated Q directions.

5). After one simulates the spin waves, may we get the simulated data points out to plot? 

See previous answer.

Cheers,
Sándor


qzhan...@gmail.com

unread,
Nov 16, 2017, 2:35:43 PM11/16/17
to SpinW Forum
Dear Sándor,
Thanks very much for your advice. Where can I find the R2 or chi^2 values? I can only find RW in the fitted figure. Thanks again.

Regards
Qiang

SpinW

unread,
Nov 21, 2017, 10:37:10 AM11/21/17
to SpinW Forum
Dear Qiang,

the return value of the spinw.fitspec() function should contain the redX2 field that is the reduced chi^2 value. This works if you use the master branch from GitHub.

Best,
Sándor

qzhan...@gmail.com

unread,
Nov 21, 2017, 10:59:15 AM11/21/17
to SpinW Forum
Dear Sándor,
Thanks very much for your advice.

Best
Qiang
Reply all
Reply to author
Forward
0 new messages