diff --git a/main_FA2.fig b/main_FA2.fig index 7b833e8f985c2225a5bc02a0108d9d81ce1a98af..5c520f592590c120f247e6822f88b72fa6fe4174 100644 Binary files a/main_FA2.fig and b/main_FA2.fig differ diff --git a/main_FA2.m b/main_FA2.m index e6b07370a0af8bc7080f0f65583a8194ed2475a0..6deb52c6168b81fd13e1ec9c2a91c0b62df835ca 100644 --- a/main_FA2.m +++ b/main_FA2.m @@ -22,7 +22,7 @@ function varargout = main_FA2(varargin) % Edit the above text to modify the response to help main_FA2 -% Last Modified by GUIDE v2.5 06-Apr-2018 16:58:53 +% Last Modified by GUIDE v2.5 05-Oct-2018 09:29:26 % Begin initialization code - DO NOT EDIT gui_Singleton = 1; @@ -72,20 +72,20 @@ end majorVer = 1; %minor version: new functionality and output -% 4.3 added export of release probability to interface % 4.4 added new field do data structure: weekNumber % 5.0 added option for plotting median instead of mean % 5.1 added option for plotting synaptic and release probability % 5.2 added non-releasing cells to release probability export -minorVer = 5.2; +% 5.3 added option to force stop event via context menu +minorVer = 5.3; %build number: bug fixes and corrections: <year><month>#<iteration> -% 1803#02 tested new functionality % 1804#01 bug fix for dual color data in extractTableData % 1804#02 tested new functionality % 1804#03 bug fixes for plotting % 1805#01 bug fixes for plotting -buildNr = '1805#01'; +% 1810#01 tested new functionality +buildNr = '1810#01'; versionInfo = [num2str(majorVer) '.' num2str(minorVer) '-build ' buildNr]; @@ -2447,6 +2447,12 @@ handles = getappdata(h, 'handles'); set(handles.menu_file_save, 'Enable', 'on'); set(handles.uipush_save, 'Enable', 'on'); +% log the change +appendData2Log(sprintf('## modified event %d of ROI %d in %s to frames (%d, %d) (start, stop)',... + currEvnt, currVesID, cellStruct.sheetname, fuseS, fuseF), 'status'); + + + % -------------------------------------------------------------------- function popup_event_Callback(hObject, eventdata, handles) currCell = getCurrentCell(); @@ -2548,6 +2554,57 @@ end function popup_event_stop_Callback(hObject, eventdata, handles) modifyEventF(0); + +function popup_event_force_stop_Callback(hObject, eventdata, handles) +forceUserStop(); + +function forceUserStop() +h = getappdata(0, 'h_mainFA2'); +currVes = getappdata(h, 'currentVesicleID'); +currCell = getCurrentCell(); +currEvnt = getappdata(h, 'currentEventID'); + +% get the point the user selected +newPoint = getappdata(h, 'currentPointLocation'); + +if isempty(currCell) || isempty(newPoint) + return; +end + +% correct the VesID if data was sorted +if isfield(currCell, 'Site') && ~isempty(currCell.Site) + currVes = find(currCell.Site == currVes); +end + + +% get the color +infoStruct = getappdata(h, 'infoStruct'); +bGreen = ~isempty(infoStruct.General.marker_g); +bRed = ~isempty(infoStruct.General.marker_r); +bDual = bGreen & bRed; + +if bDual + whichColor = 'green'; +else + if bGreen + whichColor = 'green'; + else + whichColor = 'red'; + end +end + +% update the event with the user-selected data +fuseS = currCell.fusionFrames{currVes}(currEvnt); +goodness = currCell.goodness{currVes}(currEvnt); +updateEvent(fuseS, newPoint, goodness, 1, 1, whichColor); + +setappdata(h, 'modifiedData', true); +%enable the save buttons +handles = getappdata(h, 'handles'); +set(handles.menu_file_save, 'Enable', 'on'); +set(handles.uipush_save, 'Enable', 'on'); + + function modifyEventF(varargin) h = getappdata(0, 'h_mainFA2'); currVes = getappdata(h, 'currentVesicleID'); @@ -4329,3 +4386,4 @@ function menu_plots_bar_synaptic_Callback(hObject, eventdata, handles) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) createBarPlot('synaptic'); +