Skip to content

Commit

Permalink
Re #944 correct iDaaaS type
Browse files Browse the repository at this point in the history
  • Loading branch information
abuts committed Feb 14, 2023
1 parent e48a0ed commit 88e0ee0
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 7 deletions.
32 changes: 32 additions & 0 deletions _test/test_transformation/test_spher_proj.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
classdef test_spher_proj<TestCase
% The test class to verify how projection works
%
properties
end

methods
function this=test_spher_proj(name)
if nargin == 0
name = 'test_spher_proj';
end
this=this@TestCase(name);
end
function test_constructor(~)
proj = spher_proj();
assertEqual(proj.ex,'u-aligned')
assertEqual(proj.ez,'w-aligned')
assertElementsAlmostEqual(proj.ucentre,[0;0;0])

S.type = '.';
S.subs = 'ucentre';
f=@()(subsasgn(proj,S,10));
assertExceptionThrown(f,'SPHER_PROJ:invalid_argument')

proj.ucentre = [0,1,0];
assertElementsAlmostEqual(proj.ucentre,[0;1;0])

proj = spher_proj([1;0;1]);
assertElementsAlmostEqual(proj.ucentre,[1;0;1])
end
end
end
10 changes: 3 additions & 7 deletions herbert_core/admin/is_idaaas.m
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,14 @@
size_suffix = '';
return;
end

cpu_pos = strfind(mess,'CPU(s)');
mess = strsplit(mess(cpu_pos(1):end));
n_cpu = str2double(mess{2});
if n_cpu <10
if is_name(2)
size_suffix = 'idaas_large';
else
size_suffix = 'idaas_small';
end
else
size_suffix = 'idaas_large';
else
size_suffix = 'idaas_small';
end
end

Expand Down

0 comments on commit 88e0ee0

Please sign in to comment.