Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions _test/test_sqw/test_save.m
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ function test_save_upgrade_automatically_filebacked(obj)
test_obj.save(targ_file);

ldr = sqw_formats_factory.instance().get_loader(targ_file);
assertTrue(isa(ldr,'faccess_sqw_v4'));
assertTrue(isa(ldr,'faccess_sqw_v4_1'));
rec = ldr.get_sqw();
ldr.delete();

Expand All @@ -366,7 +366,7 @@ function test_save_upgrade_automatically_filebacked_large_page(obj)
test_obj.save(targ_file);

ldr = sqw_formats_factory.instance().get_loader(targ_file);
assertTrue(isa(ldr,'faccess_sqw_v4'));
assertTrue(isa(ldr,'faccess_sqw_v4_1'));
rec = ldr.get_sqw();
ldr.delete();

Expand All @@ -389,7 +389,7 @@ function test_save_tmp_moves_to_new_file_upgrades_all_bar_pix(obj)
assertFalse(isfile(source_to_move));

ldr = sqw_formats_factory.instance().get_loader(targ_file);
assertTrue(isa(ldr,'faccess_sqw_v4'));
assertTrue(isa(ldr,'faccess_sqw_v4_1'));
rec = ldr.get_sqw();
ldr.delete();
assertEqualToTol(rec,test_obj,'ignore_str',true,'tol',[4*eps('single'),4*eps('single')]);
Expand All @@ -413,7 +413,7 @@ function test_save_permanent_creates_new_file(obj)
assertTrue(isfile(source_for_fb));

ldr = sqw_formats_factory.instance().get_loader(targ_file);
assertTrue(isa(ldr,'faccess_sqw_v4'));
assertTrue(isa(ldr,'faccess_sqw_v4_1'));
rec = ldr.get_sqw();
ldr.delete();

Expand Down
2 changes: 1 addition & 1 deletion _test/test_sqw_class/test_mushroom_sqw.m
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ function test_gen_sqw(obj)
2, [2*pi,2*pi,2*pi], [90,90,90], [0,0,1], [0,-1,0],0,0,0,0,0);

ldr = sqw_formats_factory.instance().get_loader(sqw_file);
assertTrue(isa(ldr,'faccess_sqw_v4'));
assertTrue(isa(ldr,'faccess_sqw_v4_1'));

sqo = read_sqw(sqw_file);

Expand Down
2 changes: 1 addition & 1 deletion _test/test_sqw_file/sqw_binfile_common_tester.m
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
methods
% initialize the loader, to be ready to read or write the data
function obj = init(obj,accessor)
if nargin<2 || ~(isa(accessor,'sqw_binfile_common') || isa(accessor,'faccess_sqw_v4'))
if nargin<2 || ~(isa(accessor,'sqw_binfile_common') || isa(accessor,'faccess_sqw_v4_1'))
error('HORACE:sqw_binfile_common_tester:invalid_argument', ...
'init can be called only with a version of an file accessor')
end
Expand Down
13 changes: 7 additions & 6 deletions _test/test_sqw_file/test_faccess_sqw_v2.m
Original file line number Diff line number Diff line change
Expand Up @@ -268,14 +268,15 @@ function test_empty_init_does_nothing(~)

tob = faccess_sqw_v2(tf);
tob = tob.upgrade_file_format();
assertTrue(isa(tob,'faccess_sqw_v4'));
assertTrue(isa(tob,'faccess_sqw_v4_1'));


sqw1 = tob.get_sqw();
tob.delete();


to = sqw_formats_factory.instance().get_loader(tf);
assertTrue(isa(to,'faccess_sqw_v4'));
assertTrue(isa(to,'faccess_sqw_v4_1'));

sqw2 = to.get_sqw();
to.delete();
Expand All @@ -296,13 +297,13 @@ function test_empty_init_does_nothing(~)

tob = faccess_sqw_v2(tf);
tob = tob.upgrade_file_format();
assertTrue(isa(tob,'faccess_sqw_v4'));
assertTrue(isa(tob,'faccess_sqw_v4_1'));

sqw1 = tob.get_sqw();
tob.delete();

to = sqw_formats_factory.instance().get_loader(tf);
assertTrue(isa(to,'faccess_sqw_v4'));
assertTrue(isa(to,'faccess_sqw_v4_1'));

sqw2 = to.get_sqw();
to.delete();
Expand All @@ -327,7 +328,7 @@ function test_empty_init_does_nothing(~)
tob = tob.put_sqw();

tobV4 = tob.upgrade_file_format();
assertTrue(isa(tobV4,'faccess_sqw_v4'));
assertTrue(isa(tobV4,'faccess_sqw_v4_1'));

sqw1 = tobV4.get_sqw();
tobV4.delete();
Expand All @@ -339,7 +340,7 @@ function test_empty_init_does_nothing(~)


to = sqw_formats_factory.instance().get_loader(tf);
assertTrue(isa(to,'faccess_sqw_v4'));
assertTrue(isa(to,'faccess_sqw_v4_1'));

sqw2 = to.get_sqw();
to.delete();
Expand Down
2 changes: 1 addition & 1 deletion _test/test_sqw_file/test_faccess_sqw_v3_21.m
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ function delete(obj)
% format, containing pixel range
ldr = ldr.upgrade_file_format();

assertTrue(isa(ldr,'faccess_sqw_v4'));
assertTrue(isa(ldr,'faccess_sqw_v4_1'));

pix_range1 = ldr.get_pix_range();
% 3e-7 -- conversion from double to single
Expand Down
2 changes: 1 addition & 1 deletion _test/test_sqw_file/test_sqw_formats_factory.m
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ function test_selection_v1(obj)
function obj= test_pref_access(obj)
dob = sqw();
ld1 = sqw_formats_factory.instance().get_pref_access(dob);
assertTrue(isa(ld1,'faccess_sqw_v4'));
assertTrue(isa(ld1,'faccess_sqw_v4_1'));

dob = d1d();
ld2 = sqw_formats_factory.instance().get_pref_access(dob);
Expand Down
4 changes: 2 additions & 2 deletions _test/test_utilities_herbert/test_disp2str.m
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ function test_truncate_returns_provided(~)
ss = disp2str(1:100,60,'constrained');
ss = splitlines(ss);
assertEqual(ss{2},...
'1 2 3 4 5 6 7 constrained')
'1 2 3 4 5 6 7 constrained')
end
function test_truncate_returns_default(~)
ss = disp2str(1:100,60);
ss = splitlines(ss);
assertEqual(ss{2}, ...
'1 2 3 4 5 6 7 ...truncated.')
'1 2 3 4 5 6 7 ...truncated.')
end
function test_cell(~)
pat = {1,2,3};
Expand Down
5 changes: 5 additions & 0 deletions horace_core/sqw/file_io/@faccess_sqw_v4_1/dump_sqw_fields.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
function obj = dump_sqw_fields(obj,mod_sqw,varargin)
%DUMP_SQW_FIELDS given initalized sqw file accessor, store specified parts
% of input sqw object back into existing sqw file.
error('HORACE:faccess_sqw_v4_1:not_implemented', ...
'This method is not yet implememted. See Re #1320')
Loading