Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SCDDS-core
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SPC
SCDDS
SCDDS-core
Commits
ebdec22a
Commit
ebdec22a
authored
4 years ago
by
Federico Felici
Browse files
Options
Downloads
Patches
Plain Diff
Fixes and cleanup
parent
efacc5f5
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
code/classes/SCDclass_mdspar.m
+8
-23
8 additions, 23 deletions
code/classes/SCDclass_mdspar.m
with
8 additions
and
23 deletions
code/classes/SCDclass_mdspar.m
+
8
−
23
View file @
ebdec22a
...
@@ -112,34 +112,19 @@ classdef SCDclass_mdspar < matlab.mixin.Heterogeneous
...
@@ -112,34 +112,19 @@ classdef SCDclass_mdspar < matlab.mixin.Heterogeneous
% parameter, otherwise it is taken from the global shot number
% parameter, otherwise it is taken from the global shot number
% given to the actualize command
% given to the actualize command
if
obj
.
overrideshot
==
1
if
obj
.
overrideshot
==
1
localshot
=
obj
.
overrideshotn
;
localshot
=
obj
.
overrideshotn
;
else
else
localshot
=
shot
;
localshot
=
shot
;
end
end
s
=
mdsopen
(
obj
.
mdstree
,
localshot
);
mdsconnect
(
obj
.
mdsserver
);
openok
=
true
;
[
~
,
s
]
=
mdsopen
(
obj
.
mdstree
,
localshot
);
if
isempty
(
s
)
if
~
rem
(
s
,
2
)
openok
=
false
;
warning
(
'SCDclass_mdspar:MDSerror'
,
'MDS+ tree open error for parameter %s. Actualization skipped.'
,
obj
.
modelparam
);
end
if
openok
if
~
isnumeric
(
s
)
||
s
~=
localshot
openok
=
false
;
end
end
if
openok
if
s
~=
localshot
openok
=
false
;
end
end
if
~
openok
warning
(
'SCDclass_mdspar:MDSerror'
,
'MDS+ tree open error for parameter %s. Actualization skipped.'
,
obj
.
modelparam
);
obj
.
actualizable
=
false
;
obj
.
actualizable
=
false
;
end
end
%str=sprintf('SCDclass_mdsparam (%s), failed opening MDS+ tree', obj.modelparam);
%assert(s==localshot, str);
end
end
function
obj
=
setactualizecmds
(
obj
,
shot
)
function
obj
=
setactualizecmds
(
obj
)
pointspos
=
strfind
(
obj
.
modelparam
,
'.'
);
pointspos
=
strfind
(
obj
.
modelparam
,
'.'
);
baseparam
=
obj
.
modelparam
(
1
:
pointspos
(
1
)
-
1
);
baseparam
=
obj
.
modelparam
(
1
:
pointspos
(
1
)
-
1
);
structparam
=
obj
.
modelparam
(
pointspos
(
1
):
end
);
structparam
=
obj
.
modelparam
(
pointspos
(
1
):
end
);
...
@@ -157,7 +142,7 @@ classdef SCDclass_mdspar < matlab.mixin.Heterogeneous
...
@@ -157,7 +142,7 @@ classdef SCDclass_mdspar < matlab.mixin.Heterogeneous
% Checking if data can be retrieved, updating get command
% Checking if data can be retrieved, updating get command
[
obj
,
obj
.
value
]
=
obj
.
getdata
(
shot
);
[
obj
,
obj
.
value
]
=
obj
.
getdata
(
shot
);
if
~
obj
.
actualizable
,
return
;
end
if
~
obj
.
actualizable
,
return
;
end
obj
=
obj
.
setactualizecmds
(
shot
)
;
obj
=
obj
.
setactualizecmds
;
end
end
end
end
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment