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
6e49ca69
Commit
6e49ca69
authored
2 years ago
by
Cristian Galperti
Browse files
Options
Downloads
Patches
Plain Diff
localshot behaviour added
parent
1fd0c933
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
classes/SCDclass_mdswgsigsingle.m
+24
-20
24 additions, 20 deletions
classes/SCDclass_mdswgsigsingle.m
with
24 additions
and
20 deletions
classes/SCDclass_mdswgsigsingle.m
+
24
−
20
View file @
6e49ca69
...
...
@@ -34,40 +34,44 @@ classdef SCDclass_mdswgsigsingle < SCDclass_mdswg
function
actualizedata
(
obj
,
shot
)
try
mdsconnect
(
obj
.
mdsserver
);
mdsopen
(
obj
.
mdstree
,
shot
);
mdsconnect
(
obj
,
shot
);
targetfullexpansion
=
[
obj
.
wavegenbasestruct
,
'.'
,
obj
.
wavegentarget
];
if
obj
.
verbose
==
1
if
obj
.
overrideshot
==
1
localshot
=
obj
.
overrideshotn
;
else
localshot
=
shot
;
end
fprintf
(
'Actualizing wavegen:
''
%s
''
[%d] <-
''
%s
''
(%s, shot %d)\n'
,
...
targetfullexpansion
,
obj
.
destidx
,
...
obj
.
tdiexpr
,
...
obj
.
classname
,
shot
);
obj
.
classname
,
local
shot
);
end
value
=
obj
.
getdata
();
value
=
obj
.
getdata
();
baseparam
=
obj
.
wavegenbasestruct
;
% name of base workspace structure
structparam
=
obj
.
wavegentarget
;
% name of target field
wgentryval
=
evalin
(
'base'
,
baseparam
);
% structure of wavegen in base workspace
assert
(
isfield
(
wgentryval
,
structparam
),
...
'Wavegen field %s does not exist in target structure %s. '
,
structparam
,
baseparam
)
'Wavegen field %s does not exist in target structure %s. '
,
structparam
,
baseparam
)
% assign field from wavegen entry value
ddtssamples
=
numel
(
wgentryval
.
(
structparam
)
.
Time
);
if
ddtssamples
~=
numel
(
value
.
Time
)
% the dd timeseries has different dims w.r.t. the signals
% to be loaded, we have to load the timeseries as it is
wgentryval
.
(
structparam
)
=
value
;
% the dd timeseries has different dims w.r.t. the signals
% to be loaded, we have to load the timeseries as it is
wgentryval
.
(
structparam
)
=
value
;
else
% the dd timeseries has the same size than the signals
% to be loaded, we can do a partial loading
wgentryval
.
(
structparam
)
.
Time
=
value
.
Time
;
wgentryval
.
(
structparam
)
.
Data
(:,
obj
.
destidx
)
=
value
.
Data
;
end
% the dd timeseries has the same size than the signals
% to be loaded, we can do a partial loading
wgentryval
.
(
structparam
)
.
Time
=
value
.
Time
;
wgentryval
.
(
structparam
)
.
Data
(:,
obj
.
destidx
)
=
value
.
Data
;
end
assignin
(
'base'
,
'temp'
,
wgentryval
);
assigncmd
=
sprintf
(
'%s=temp;'
,
baseparam
);
evalin
(
'base'
,
assigncmd
);
...
...
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