forked from tsdev/spinw
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a586024
commit 32cb8b7
Showing
1 changed file
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
classdef unittest_spinw_spec2MDHisto < sw_tests.unit_tests.unittest_super | ||
properties | ||
end | ||
methods (Test) | ||
function test_1_0_0(testCase) | ||
q0 = [0 0 0]; | ||
qdir = [1 0 0]; | ||
spec = sw_egrid(spinwave(sw_model('triAF', 1), {q0 q0+qdir nsteps})); | ||
proj = [qdir(:) [1 -1 0]' [0 0 1]']; | ||
dproj = [norm((qdir-q0))/nsteps, 1e-6, 1e-6]; | ||
sw_spec2MDHisto(spec, proj, dproj, 'test100mdh.nxs'); | ||
end | ||
|
||
function test_1_1_0(testCase) | ||
q0 = [0 0 0]; | ||
qdir = [1 1 0]; | ||
spec = sw_egrid(spinwave(sw_model('triAF', 1), {q0 q0+qdir nsteps})); | ||
proj = [qdir(:) [1 -1 0]' [0 0 1]']; | ||
dproj = [norm((qdir-q0))/nsteps, 1e-6, 1e-6]; | ||
sw_spec2MDHisto(spec, proj, dproj, 'test110mdh.nxs'); | ||
end | ||
|
||
function test_1_1_1(testCase) | ||
q0 = [0 0 0]; | ||
qdir = [1 1 1]; | ||
spec = sw_egrid(spinwave(sw_model('triAF', 1), {q0 q0+qdir nsteps})); | ||
proj = [qdir(:) [1 -1 0]' [1 1 -2]']; | ||
dproj = [norm((qdir-q0))/nsteps, 1e-6, 1e-6]; | ||
sw_spec2MDHisto(spec, proj, dproj, 'test111mdh.nxs'); | ||
end | ||
function test_1_1_2(testCase) | ||
q0 = [0 0 2]; | ||
qdir = [1 1 0]; | ||
spec = sw_egrid(spinwave(sw_model('triAF', 1), {q0 q0+qdir nsteps})); | ||
proj = [qdir(:) [1 -1 0]' [0 0 1]']; | ||
dproj = [norm((qdir-q0))/nsteps, 1e-6, 1e-6]; | ||
sw_spec2MDHisto(spec, proj, dproj, 'tmp/test112mdh.nxs'); | ||
end | ||
end |