Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
artoa4argo
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
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
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
argoTools
artoa4argo
Commits
edc8820a
Commit
edc8820a
authored
4 years ago
by
leprob001
Browse files
Options
Downloads
Patches
Plain Diff
Added ability to remap already applied TOAs to a different soundsource.
parent
c6b85c52
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
VERSION
+1
-1
1 addition, 1 deletion
VERSION
lib/+artoa/+controller/+edit/+timeOfArrival/remapToaToSoundsource.m
+77
-0
77 additions, 0 deletions
.../+controller/+edit/+timeOfArrival/remapToaToSoundsource.m
lib/+artoa/+gui/+edit/timeOfArrival.m
+15
-4
15 additions, 4 deletions
lib/+artoa/+gui/+edit/timeOfArrival.m
with
93 additions
and
5 deletions
VERSION
+
1
−
1
View file @
edc8820a
315
316
\ No newline at end of file
\ No newline at end of file
This diff is collapsed.
Click to expand it.
lib/+artoa/+controller/+edit/+timeOfArrival/remapToaToSoundsource.m
0 → 100644
+
77
−
0
View file @
edc8820a
function
[]
=
remapToaToSoundsource
(
~
,
~
)
%REMAPTOATOSOUNDSOURCE Remaps the TOAs of the selected soundsource to the new one.
% Detailed explanation goes here
global
artoaWorkspace
;
%% Check if soundsources are loaded
if
~
artoa
.
controller
.
soundSourcesLoaded
()
warndlg
(
'You need to load a soundsource file first!'
,
'No sound sources loaded'
);
return
;
end
%% Get all soundsources that have applied toas
soundsourcesWithToa
=
{};
fnames
=
fieldnames
(
artoaWorkspace
.
filteredSoundsources
);
for
i
=
1
:
length
(
fnames
)
currentSoundsource
=
fnames
{
i
};
hasToa
=
artoa
.
soundsources
.
hasAppliedToa
(
...
currentSoundsource
,
...
artoaWorkspace
.
toaData
.
soundSource
...
);
if
hasToa
soundsourcesWithToa
{
end
+
1
}
=
currentSoundsource
;
end
end
%% Check if empty
if
isempty
(
soundsourcesWithToa
)
warndlg
(
'No TOA applied to any soundsource.'
);
return
;
end
%% Let the user select the sound source to remap
[
sourceIndex
,
success
]
=
listdlg
(
...
'PromptString'
,
'Select soundsource to remap:'
,
...
'SelectionMode'
,
'single'
,
...
'ListString'
,
soundsourcesWithToa
...
);
if
~
success
return
;
end
%% Let the user select the sound source to remap
[
destinationIndex
,
success
]
=
listdlg
(
...
'PromptString'
,
'Select destination soundsource:'
,
...
'SelectionMode'
,
'single'
,
...
'ListString'
,
fnames
...
);
if
~
success
return
;
end
%% Get applied toa of source soundsource
selection
=
strcmp
(
soundsourcesWithToa
{
sourceIndex
},
artoaWorkspace
.
toaData
.
soundSource
);
%% Store
artoaWorkspace
.
toaData
.
soundSource
(
selection
)
=
fnames
(
destinationIndex
);
%% Update duplicate toa table
artoa
.
controller
.
edit
.
timeOfArrival
.
updateDuplicateToaTable
();
%% Update plots
artoa
.
controller
.
edit
.
updateAvailablePlots
();
%% Update offsets table and recalculate TOAs
artoa
.
controller
.
edit
.
offsets
.
tableSoundsourceOffsetsEdit
();
%% Update track parameter window if available
artoa
.
controller
.
track
.
parameter
.
updateGui
();
end
This diff is collapsed.
Click to expand it.
lib/+artoa/+gui/+edit/timeOfArrival.m
+
15
−
4
View file @
edc8820a
...
@@ -165,7 +165,7 @@ artoaGui.editTimeOfArrival.buttonApply = uicontrol( ...
...
@@ -165,7 +165,7 @@ artoaGui.editTimeOfArrival.buttonApply = uicontrol( ...
'Style'
,
'PushButton'
,
...
'Style'
,
'PushButton'
,
...
'FontSize'
,
8
,
...
'FontSize'
,
8
,
...
'Units'
,
'normalized'
,
...
'Units'
,
'normalized'
,
...
'Position'
,
[
.
156
.
8
.
69
.
15
],
...
'Position'
,
[
.
156
.
8
5
.
69
.
15
],
...
'CallBack'
,
'artoa.controller.edit.timeOfArrival.applySoundSourceToSelectedPoints();'
...
'CallBack'
,
'artoa.controller.edit.timeOfArrival.applySoundSourceToSelectedPoints();'
...
);
);
...
@@ -175,7 +175,7 @@ artoaGui.editTimeOfArrival.buttonApplyAllVisible = uicontrol( ...
...
@@ -175,7 +175,7 @@ artoaGui.editTimeOfArrival.buttonApplyAllVisible = uicontrol( ...
'Style'
,
'PushButton'
,
...
'Style'
,
'PushButton'
,
...
'FontSize'
,
8
,
...
'FontSize'
,
8
,
...
'Units'
,
'normalized'
,
...
'Units'
,
'normalized'
,
...
'Position'
,
[
.
156
.
6
.
69
.
15
],
...
'Position'
,
[
.
156
.
6
5
.
69
.
15
],
...
'CallBack'
,
'artoa.controller.edit.timeOfArrival.applySoundSourceToAllVisible();'
...
'CallBack'
,
'artoa.controller.edit.timeOfArrival.applySoundSourceToAllVisible();'
...
);
);
...
@@ -185,7 +185,7 @@ artoaGui.editTimeOfArrival.buttonDelete = uicontrol( ...
...
@@ -185,7 +185,7 @@ artoaGui.editTimeOfArrival.buttonDelete = uicontrol( ...
'Style'
,
'PushButton'
,
...
'Style'
,
'PushButton'
,
...
'FontSize'
,
8
,
...
'FontSize'
,
8
,
...
'Units'
,
'normalized'
,
...
'Units'
,
'normalized'
,
...
'Position'
,
[
.
156
.
4
.
69
.
15
],
...
'Position'
,
[
.
156
.
4
5
.
69
.
15
],
...
'CallBack'
,
'artoa.controller.edit.timeOfArrival.removeSoundSourceFromSelectedPoints();'
...
'CallBack'
,
'artoa.controller.edit.timeOfArrival.removeSoundSourceFromSelectedPoints();'
...
);
);
...
@@ -195,10 +195,21 @@ artoaGui.editTimeOfArrival.buttonWithdrawAllVisible = uicontrol( ...
...
@@ -195,10 +195,21 @@ artoaGui.editTimeOfArrival.buttonWithdrawAllVisible = uicontrol( ...
'Style'
,
'PushButton'
,
...
'Style'
,
'PushButton'
,
...
'FontSize'
,
8
,
...
'FontSize'
,
8
,
...
'Units'
,
'normalized'
,
...
'Units'
,
'normalized'
,
...
'Position'
,
[
.
156
.
2
.
69
.
15
],
...
'Position'
,
[
.
156
.
2
5
.
69
.
15
],
...
'CallBack'
,
'artoa.controller.edit.timeOfArrival.withdrawSoundSourceToAllVisible();'
...
'CallBack'
,
'artoa.controller.edit.timeOfArrival.withdrawSoundSourceToAllVisible();'
...
);
);
artoaGui
.
editTimeOfArrival
.
buttonRemap
=
uicontrol
(
...
'Parent'
,
artoaGui
.
editTimeOfArrival
.
frameControlsSoundSource
,
...
'String'
,
'Remap'
,
...
'Style'
,
'PushButton'
,
...
'FontSize'
,
8
,
...
'Units'
,
'normalized'
,
...
'Position'
,
[
.
156
.
05
.
69
.
15
],
...
'CallBack'
,
@
artoa
.
controller
.
edit
.
timeOfArrival
.
remapToaToSoundsource
...
);
%% Shift frame
%% Shift frame
artoaGui
.
editTimeOfArrival
.
frameControlsShift
=
uipanel
(
...
artoaGui
.
editTimeOfArrival
.
frameControlsShift
=
uipanel
(
...
'Parent'
,
artoaGui
.
figures
.
editTimeOfArrival
,
...
'Parent'
,
artoaGui
.
figures
.
editTimeOfArrival
,
...
...
...
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