Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
gdat
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository 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
gdat
Merge requests
!91
fix 3D node from AUG side ala sf2sig
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
fix 3D node from AUG side ala sf2sig
fix_aug_3d
into
master
Overview
0
Commits
1
Pipelines
1
Changes
2
Merged
Olivier Sauter
requested to merge
fix_aug_3d
into
master
4 years ago
Overview
0
Commits
1
Pipelines
1
Changes
2
Expand
seems to work from lacs as well
0
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
ce337deb
1 commit,
4 years ago
2 files
+
36
−
2
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
matlab/AUG/gdat_aug.m
+
24
−
1
Options
@@ -345,11 +345,35 @@ if strcmp(mapping_for_aug.method,'signal')
if
isfield
(
aatmp
,
'data'
);
gdat_data
.
data
=
aatmp
.
data
;
end
if
isfield
(
aatmp
,
't'
);
gdat_data
.
t
=
aatmp
.
t
;
end
if
isfield
(
aatmp
,
'x'
);
gdat_data
.
x
=
aatmp
.
x
;
end
if
isfield
(
aatmp
,
'dim'
);
gdat_data
.
dim
=
aatmp
.
dim
;
end
if
isfield
(
aatmp
,
'dimunits'
);
gdat_data
.
dimunits
=
aatmp
.
dimunits
;
end
gdat_data
.
data_fullpath
=
mapping_for_aug
.
expression
;
if
isempty
(
aatmp
.
data
)
||
(
isempty
(
gdat_data
.
t
)
&&
isempty
(
gdat_data
.
x
))
return
end
% construct .dim if not present (means coming from sf2sig)
if
~
isfield
(
aatmp
,
'dim'
)
len_t
=
numel
(
aatmp
.
t
);
len_x
=
numel
(
aatmp
.
x
);
len_data
=
size
(
aatmp
.
data
);
itime
=
find
(
len_data
==
len_t
);
nbdims_eff
=
sum
([
size
(
gdat_data
.
data
)
~=
1
]);
aatmp
.
dim
{
itime
}
=
aatmp
.
t
;
aatmp
.
dimunits
{
itime
}
=
aatmp
.
time_aug
.
unit
;
if
nbdims_eff
>=
2
% assume area-base is main 2nd coordinate (did not find a case with 2 area-base (2 coordinates defined in addition to time) to be able to test)
i_x
=
setdiff
([
1
:
2
],
itime
);
aatmp
.
dim
{
i_x
}
=
aatmp
.
x
;
aatmp
.
dimunits
(
i_x
)
=
aatmp
.
area
.
unit
;
if
isempty
(
aatmp
.
dimunits
{
i_x
});
aatmp
.
dimunits
{
i_x
}
=
''
;
end
for
i
=
3
:
nbdims_eff
aatmp
.
dim
{
i
}
=
[
1
:
size
(
aatmp
.
data
,
i
)];
aatmp
.
dimunits
{
i
}
=
''
;
end
end
gdat_data
.
dim
=
aatmp
.
dim
;
gdat_data
.
dimunits
=
aatmp
.
dimunits
;
end
mapping_for_aug_timedim_orig
=
mapping_for_aug
.
timedim
;
if
mapping_for_aug
.
timedim
<=
0
% need to guess timedim
@@ -404,7 +428,6 @@ if strcmp(mapping_for_aug.method,'signal')
gdat_data
.
t
=
gdat_data
.
dim
{
mapping_for_aug
.
timedim
};
adata
=
gdat_data
.
data
;
gdat_data
.
data
=
permute
(
adata
,[
2
1
3
:
numel
(
size
(
adata
))]);
end
end
end
Loading