function [] = open(~, ~) %OPEN Initializes the main gui. % Detailed explanation goes here global artoaGui artoaConfig; %% Check if the gui is already opened if isfield(artoaGui.figures, 'main') figure(artoaGui.figures.main); return end %% Prepare callbacks for main gui callbacks = struct(); callbacks.CloseRequestFcn = @artoa.controller.quit; callbacks.quit = @artoa.controller.quit; callbacks.WindowButtonDownFcn = @artoa.controller.main.windowButtonDownFcn; callbacks.loadRfb = @artoa.controller.file.loadRfb; callbacks.loadInterim = @artoa.controller.file.loadInterim; callbacks.loadSoundsourceFile = @artoa.controller.file.loadSoundSourceFile; callbacks.saveRfc = @artoa.controller.file.saveRfc; callbacks.saveInterim = @artoa.controller.file.saveInterim; callbacks.saveOptimumTables = @artoa.controller.file.saveOptimumTables; callbacks.loadArtoaIni = @artoa.controller.file.loadArtoaIni; callbacks.reloadSoundsourceFile = @artoa.controller.file.reloadSoundSourceFile; callbacks.openEditTemperature = @artoa.controller.edit.temperature.open; callbacks.openEditPressure = @artoa.controller.edit.pressure.open; callbacks.openEditTimeOfArrival = @artoa.controller.edit.timeOfArrival.open; callbacks.openEditOffsets = @artoa.controller.edit.offsets.open; callbacks.openTrackParameter = @artoa.controller.track.parameter.open; callbacks.openTrackTrajectoryOutput = @artoa.controller.track.trajectoryOutput.open; callbacks.switchHideDeletedDataPoints = @artoa.controller.switchHideDeletedPoints; callbacks.convertProfilesToRfb = @artoa.controller.file.profile2rfb.open; %% Prepare callbacks for track parameter callbacks.checkboxDopplerCorrection = @artoa.controller.track.parameter.checkboxDopplerCorrection; callbacks.checkboxBackwardTracking = @artoa.controller.track.parameter.checkboxBackwardTracking; callbacks.comboboxInterpolationMethod = @artoa.controller.track.parameter.comboboxInterpolationMethod; callbacks.comboboxSoundspeedMethod = @artoa.controller.track.parameter.comboboxSoundspeedMethod; callbacks.checkboxPlotResiduals = @artoa.controller.track.parameter.checkboxPlotResiduals; callbacks.inputOutputInterpolationInterval = @artoa.controller.track.parameter.inputOutputInterpolationInterval; callbacks.inputGapSize = @artoa.controller.track.parameter.inputGapSize; callbacks.tableSoundSourceCombinationsSelection = @artoa.controller.track.parameter.tableSoundsourceCombinationsSelection; callbacks.tableSoundSourceCombinationsEdit = @artoa.controller.track.parameter.tableSoundsourceCombinationsEdit; callbacks.buttonTrack = @artoa.controller.track.run; callbacks.buttonAddCombination = @artoa.controller.track.parameter.addSoundsourceCombination; callbacks.buttonAddCombinationAbove = @artoa.controller.track.parameter.addSoundsourceCombinationAbove; callbacks.buttonDuplicateCombination = @artoa.controller.track.parameter.duplicateSoundsourceCombination; callbacks.buttonRemoveCombination = @artoa.controller.track.parameter.removeSoundsourceCombination; callbacks.buttonResetAllCombinations = @artoa.controller.track.parameter.resetSoundsourceCombinations; %% Prepare callbacks for offsets callbacks.tableSoundsourceOffsetsEdit = @artoa.controller.edit.offsets.tableSoundsourceOffsetsEdit; callbacks.tableSoundspeedEdit = @artoa.controller.edit.offsets.tableSoundspeedEdit; callbacks.buttonCalculateOffsets = @artoa.controller.edit.offsets.buttonCalculateOffsets; callbacks.checkboxUseOffsets = @artoa.controller.edit.offsets.checkboxUseOffsets; callbacks.inputSoundspeed = @artoa.controller.edit.offsets.inputSoundspeed; callbacks.buttonCopyFromOptimum = @artoa.controller.edit.offsets.buttonCopyFromOptimum; callbacks.buttonCopyFromMeasured = @artoa.controller.edit.offsets.buttonCopyFromMeasured; callbacks.buttonUndoLastCopy = @artoa.controller.edit.offsets.buttonUndoLastCopy; callbacks.buttonAppliedToNan = @artoa.controller.edit.offsets.buttonAppliedToNan; artoaGui.callbacks.main = callbacks; %% Start artoa4 artoa.gui.main( ... callbacks, ... artoa.controller.main.collectTrackingMethods(), ... artoaConfig.defaults.interpolationMethods, ... artoaConfig.defaults.soundspeedMethods ... ); end