This readme file provides logs of modifications made to different versions of DigitSeis script. For instructions on how to use DigitSeis, please see the Users's Manual. version 1.3: September, October, November, December 2017, January, February, March 2018 - implemented a new save structure and corresponding initial window setup that does not save graphics handle variables, this reduces the size of saved files and cleans up the window, note that analyses saved using this version can not be opened by an earlier version of DigitSeis (09/24,25,26/2017) - changed the order of "Close"/"Cancel" and "Apply" buttons in smallClassification and overlap_analysis windows so that they are more consistent with Correct Trace window (09/24/2017) - added DigitSeis window reset option in correct trace options window so that the figure can be remade (helps with slowing down of program as correct trace is used multiple times) (09/25/2017) - fixed problem with undoing image cropping in the main window so that the original image is also put back to uncropped version (09/26/2017) - fixed problem of generating smallClassification window even when square with no width or height is selected in smallClassificationCallback (09/26/2017) - fixed correct_trace call to smallS2bigS when there is no valid object to be analyzed (error due to the fact that the trace number is not available) (09/26/2017) - moved remove region, retrieve original image, and edit image tools in main window toolbar to image modification option window (09/26/2017) - made Piecewise Contrast button and associated options window unavailable once Edit Classification is clicked (09/26/2017) - put additional image modification tools in imageMod_options window into toolbar of the imageMod_options window (09/27/2017) - updated check_traceNum.m so that it works with the latest digitization function (09/27/2017) - removed output message field and digitization progress pie field in the main DigitSeis window. The progress pie will show up in new figure. (09/27/2017) Moved the progress pie to bottom left corner, added colour and changed timing for display. Also, removed the digitized traces of lines that will be re-digitized before proceeding so that it's clear which ones are being digitized (09/29/2017) - added codes to check and reset the Time variable at the beginning of correct_classification and correct_trace so that timing information will need to be recalculated if classified objects are changed (09/29/2017) - fixed consistency in switching back and forth with original and processed images in smallClassification and correct_traces (09/29/2017) - removed data cursor icon from the toolbar of the main window (09/29/2017) - put in codes to save the Edit Classification range so that when it is opened, the last view will be loaded (09/30/2017) - fixed a bug in combineObj function within smallClassification (09/30/2017) - moved position of the classification tool in the toolbar of the overlap_analysis window (10/02/2017) - put an option in correct_classification_option window so that the user can specify the appearance of the smallClassification window (10/02/2017) - fixed an issue with combineObj function - when it was used multiple times with remove region function, the cursor disappeared (10/03/2017) - changed formats of path and filename displayed on the command window when saving data. Also, added a display of the time at which the save was done (10/05/2017) - changed order of remove line and remove region tools in smallClassification so that it is consistent with Edit Classification, overlap_analysis, and correct_trace (10/05/2017) - fixed a bug in saveResults that caused odd default filename when image file was loaded, corresponding update made to load_image function (10/06/2017) - fixed a bug in change_traceNum function that left last trace and STD objects when a trace was deleted (10/06/2017) - changed default colour scheme to be Thomas' scheme (10/06/2017) - changed initial figure size for Edit Classification window so that it takes up the full screen (10/07/2017) - fixed bug in find_traces function that had inconsistency in the vertical locations of the traces and associated x value (10/08/2017) - fixed a bug in correct_trace that caused error when there is no object to be traced in the window, issue with plotting (10/11,14/2017) - changed correct_trace function so that point-tracing can be performed using classified image view (to bring out thin curves while suppressing the objects associated with other traces), this also required new icon for traced object definition, in addition, image contrast tool has been removed from correct_trace function (not needed since this can be controlled by classification threshold and the tracing is done using the original image) (10/15/2017) - turn of image crop tool in the window toolbar when user gets into Edit Classification (10/18/2017) - included default time (used for setting reference times) as one of the default values (10/20/2017) - changed default drawing during digitization so that only the main trace will be shown rather than both the trace and STD (10/22/2017) - implement simplified and improved time calculation algorithm (10/24/2017-11/02/2017) - implemented option windows to set default value for time calculation (10/25/2017) - fixed bug in edit_saveSAC, and modified the hSAC system so that it is part of the default values and can be saved (10/26/2017) - implemented removal of time calculation objects and clearing of Time variable when Edit Classification, Digitization, and Correct Trace functions are called (10/26/2017) - fixed bug in smallClassification that resulted in error when running smallS2bigS if combineObj function is completed without an object selection (10/28/2017) - with the implementation of simplified and improved time calculation scheme, the main DigitSeis window has been clean up, i.e., edit windows for setting time between time marks, time/trace, and pixel numbers between consecutive time marks have been removed. New function find_tr_length now calculates the number of pixels between consecutive time marks. (10/29/2017) - changed xlabel side (from top to bottom) for H.ax1 axes object (11/01/2017) - rearranged the tool icons on the main DigitSeis window and added icon or measuring time (11/01/2017) - added function to the time icon so that user can display selected time on a given trace (11/02/2017) - updated change_traceNum function to remove gaps/vertical boxes and to remove Time and its related objects when called from digitize_option function. Consequently, change_traceNum function is now included as part of DigitSeis.m file (11/03/2017) - fixed bugs with deleting and adding traces in digitize_options function (11/03/2017) - reset trace colours to the default two-tone blue when Calculate Timing is called so that time objects can be easily seen (11/04/2017) - fixed extract SAC function that had errors produced by discrepancies introduced when Time variable structure was changed (11/10/2017) - fixed extract SAC function that had inconsistency in ydata definition and resulted in ends of traces being cut off (11/12/2017) - changed Time and setWindow part associated with Time plotting so that when time information is already calculated, it is not recalculated (11/12/2017) - fixed bug with crop imaging tool being enabled even after edit classification stage when a saved analysis is loaded (11/15/2017) - fixed inconsistencies when changing the time mark side in the "+" window for Calculate Timing option, i.e., removed all time information and time objects (11/15/2017) - made Timing Calculation button unavailable while correct trace option window is open (11/21/2017) - fixed problem in saving routine that did not save tmshift information from digitization step (11/21/2017) - fixed a bug in exporting classified objects from Correct Trace (SCLA) to main (S) if objects are not taking up the entire space but "Skip NaN" is used. Similar but slightly different bug (in smallS2bigS.m) fixed that occurred when pinpoint is used. (11/21/2017) - changed time calculation scheme when there are multiple reference times within a given line. Instead of defining range in between two reference time points, the times are calculated up to the next reference time point. (11/23/2017) - modified smallClassification function so that when the user tries to apply changes to the main window while having the overlap analysis window open, the function will return an warning and will not apply changes to the main window, and if the user closes the window while the overlap analysis window is open, it won't result in error or warning messages (11/25/2017) - fixed get_save_cond.m to make sure that p_tick_1st and p_tick_last handles exist before the data are being accessed (11/25/2017) - fixed issue with traces without time marks when there are other traces with time marks available. Included a case when a single time mark is available (which cannot be used for calculating the time mark trend, but can still be used as reference starting point), and then there are traces without time marks that had bugs (12/03/2017) - updated time_propagate function to take care of the case when there is only one or no minute marks available for a given line, associated changes for the reference trace in DigitSeis.m (12/04/2017) - added "Please Wait" title to waitbars and made sure that the handle deletion is within try statement so that if the user closes the waitbar window, the code won't return an error message (12/09/2017) - cleaned up DigitSeis.m to remove entries associated with formally a global variable "output_message" (12/09/2017) - included ability to change toolbar icon colour for object assignment (noise, time mark, and trace) based upon user-selected colour scheme (12/09/2017) - updated single time calculation toolbar icon (12/09/2017) - fixed bug in get_time.m with time line deletion for bar that gives user-selected time after timing calculation is done (12/09/2017) - modified correct_trace so that original image tool only turns original image on and off while the masking tool only turns mask on and off (rather than switching image types) (12/17/2017) - changed behaviour of clicking on "time on left" checkbox in the time calculation options window so that if the user clicks on this without calculating time first, the label on the "Calculate Timing" button does not change (12/20/2017) - implemented an option to use gaps in traces to time (i.e., gaps are acting as time marks for time calculation purposes), the option is accessible from time calculation options window (12/20/2017) - disabled object horizontal length calculation tool in the main window toolbar once trace-zero lines are calculated (12/20/2017) - implemented a way to calculate classification based upon fraction of high intensity pixels within a image view rather than absolute threshold value (Edit Classification, smallClassification, Correct Trace) (12/22/2017) - modified scripts to remove I0 and focus on Iorig, remove image modification functionality from the main window (functionality still available through hidden window in correct_classification_options window), correct_classification_options function now put into DigitSeis file (12/23/2017) - put correct_trace object classification scheme back to BW threshold calculation and added an ability to set the threshold value separately from Edit Classification (user can change value in correct_trace_options window) (12/24/2017) - changed minute bar direction in time calculation algorithm so that it is consistent with the time mark direction (12/24/2017) - changed the classification threshold value (for Edit Classification and smallClassification) from % of pixels to be considered to % of pixels to be ignored so that the higher/lower numbers mean the same thing as in Correct Trace threshold value (although the actual numbers are quite different) (12/30/2017) - fixed issues with value entries in correct_trace_options window (12/30/2017) - implemented algorithm to update the colours of smallClassification and classification icons (in Edit Classification and Correct Trace functions) to reflect user-selected trace, time mark, and noise colours (12/30/2017) - fixed value check in correct_classification_options fixed, added ability for user to change minPix and crange values (12/31/2017) - fixed image cropping functionality and made the function unavailable once the crop tool is pressed (01/03/2018) - fixed error when line removal selection is outside of image in overlap_analysis, undo functionality in correct_trace, inconsistency in time mark check toggle button in correct_classification, availability of time calculation buttons from digitization function/correct_trace_options (01/03/2018) - objects were not properly put back into the S structure after correct trace. Fixed smallS2bigS function. (01/04/2018) - implemented update in smallS2bigS.m so that when NaN's in correct trace are included, the pixels corresponding to NaN entries are removed from relevant objects (01/05/2018) - fixed bug in correct_trace pinpoint function that resulted in error when new points are added at x value where there are multiple pinpoint objects covering the same value (01/05/2018) - changed classified object/display algorithm so that they are not done from scratch when regions/lines are removed or regions are retrieved in correct trace function (01/05/2018) - fixed inconsistency in correct_trace when switching to classification display with pinpoint and without pinpoint calculations, disabled pinpoint selection functionality when it is clicked once (01/08/2018) - made Edit Classification, Digitize, Correct Trace functions as well as Reset Window function disabled while hour mark analysis is done in correct trace options window (01/08/2018) - fixed an issue with assigning time when there are no minute marks on a given trace (at the very beginning) (01/10/2018) - modified load_analysis (old version load part) so that the image will always be below all the traces (01/11/2018) - made correct_trace_options window disappear when Edit Classification or Digitization is called, and fixed the bug that brought back the time calculation functionality back when the hour marks were checked/updated (01/11/2018) - modified the initial black-and-white image calculation for Edit Classification so that the number of noise objects are used to set the threshold (01/11,12/2018) - when interpolation scheme is changed (between linear and spline) in correct_trace_options window while correct_trace window is open with pinpoint trace, the pinpoint trace is automatically updated with the new selected interpolation scheme. (01/11/2018) - modified time calculation algorithm (time_assign.m) to take care of duplicated minute bars at the end of traces (01/12/2018) - made some updates to smallS2bigS.m, fixed some bugs (01/13/2018) - changed colour of the trace when changes are made either by correct trace or hour mark automatic correction algorithm (01/13/2018) - implemented new algorithm to assign time with trace segmentation (01/06-15,16/2018) - changed trace segmentation code so that when new ends are added after time has already assigned, the option for calculating time button is "Update Time" rather than "Recalculate Time" so that previous information is kept, this forced traceLimits.m function to be put into DigitSeis.m (01/18/2018) - added another check on the time calculation, i.e., when the traces at the end of previous trace is almost a full trace and the same is true at the beginning of the current trace (and vice versa), then the program considers one minute mark to have been skipped (01/18/2018) - changed the way find_traces is called, i.e., removed dependence on eventdata (01/18/2018) - fixed algorithm in load_analysis to load old analysis so that traces and trace-zero lines are recovered (01/18/2018) - fixed various bugs/updated functions for setting and calculating time (01/18/2018) - distance measurement tool is removed when Edit Classification is called (01/18/2018) - cleaned up DigitSeis.m (01/18/2018) - changed TimeTrend.dtr calculation to use most-frequent value rather than median, when time bounds are activated gaps/vertical lines are removed, fixed inconsistency with time bounds visibility when end lines were set after gaps were turned on, made sure that the minute line direction is consistent even when they were generated by moving the end lines, fixed vertical line calculation issue if there is only one trace (01/19/2018) - fixed time_assign function so that traces that are very short can be dealt with, changed fitting scheme in lineButtonUp function so that fitting is more stable (i.e., does not generate warning message), fixed inconsistency in xlim and ylim range as one enters Edit Classification if the file was saved in a version where cco variable did not exist, fixed bug in traceLimits function when end lines were set back to normal gap lines (01/20/2018) - implemented an algorithm that allows minute bars to be calculated when there are time marks on some of the traces but not all (01/20/2018) - added options in time calculation options window so that the user can change the length of the vertical time lines and monitor/change the average trace object pixel length (01/21/2018) - fixed issue with trace object length estimate, fixed minute line direction bug, implemented a check on reference times (if reference times span more than 3 days, confirm with user) in recalculate_time function (01/22/2018) - made sure that reference time label moves with time lines, fixed bug on adding new lines when end lines are expanded. (01/25/2018) - when old analysis that had gap/vertical lines saved was loaded, the boxes showed up. Made sure to remove the rectangles. (01/25/2018) - ability to set time at additional end points included (01/25/2018) - fixed inconsistency in correct_trace_options, setTime_options, and calculate time functions/windows, disabled time bounds visibility functionality when trace ends are being set (01/27/2018) - updated smallS2bigS.m to remove regions that need to be updated when called from correct_trace function (01/28/2018) - updated load_analysis function for loading old analyses - there were objects that were not quite captured with the H field and yet existed (01/28/2018) - extracted saveSAC functionality out of DigitSeis.m (01/28/2018) - fixed compatibility issue when timed analysis from an old version is saved using the new version (due to spelling issue); when saving in new version, remove unnecessary fields of H (01/31/2018) - modified saveSAC function to take segmentation into account, and cleaned up station information input window so that not all SAC headers are listed, removed automatic calculation of combined traces (i.e., the outputs are individual SAC file for each segment) (01/31/2018) - added default station setup in the Extract SAC option window (02/01/2018) - updated get_time.m to incorporate segmented traces, fixed overlapping "Delete Time Selections" button in time options window (02/01/2018) - made display of trace (main trace only vs. both main and STD traces) consistent with the main window when objects are digitized in correct_trace window (02/01/2018) - added segment edge constraint on line movement function figlineButtonMotion (02/02/2018) - removed unnecessary time calculation when an analysis is opened (02/09/2018) - added ability to calculate time without minute marks or gaps (needs even number of reference times for calculation) (02/09/2018) - fixed missing Iorig global statement in adjust_traces function (02/12/2018) - fixed bugs in time_assign.m, check_sufTime.m, plus option in Edit Classification option window (access to image modification functionalities), time edge functions, updated correct_trace function so that when vertical offset if changed the trace colours and visibility are consistent with the rest, closed Edit Classification and Edit Classification options windows when find_traces.m is called (02/21/2018) - completed time assignment without time marks (02/21/2018) - added a confirmation step when the window is closed (just in case the user clicks on the close window button by mistake) if the analysis has not been saved in the last 5 minutes (02/22/2018) - fixed figure title for confirming removal of noise objects in Edit Classification window (02/22/2018) - implemented a way to define noise objects even when there are no time marks. If the timemark length is negative value, the absolute value of this is used to determine if something is noise or not (02/23/2018) - made sure that time correction value (inputted in edit_SAC option window) is always reset to zero when new analysis is opened (02/23/2018) - fixed a problem with non-time-mark traces in smallClassification window (overlapping region or removal tools didn't work) (02/25/2018) - make time mark associated tools unavailable when there are no time marks (in Edit Classification and Correct Trace windows) (02/25/2018) - changed the display style in the Adjust Traces table so that integers show up as integers rather than, e.g., 1.3e5 (02/26/2018) - fixed display of objects in Edit Classification when overlap-analysis function is used (02/28/2018) - fixed display of objects in smallClassification when overlap-analysis function is used (03/01/2018) - fixed time mark boxes not showing up in Edit Classification if the time marks were generated using pinpoint function in Correct Trace (03/01/2018) - fixed a problem that resulted from additional lines (from moving the end lines) were set to "false" (i.e., unfixed lines). This led to inconsistent number of lines available for timing (since all "false" lines were removed first) when calculating the times associated with each time anchor. (03/01/2018) - fixed a bug in Edit Classification that occurred when the objects were reclassified from scratch. This had to do with some variables spelt incorrectly. (03/02/2018) - modified Correct_Trace function so that even after digitizing the objects, the tools that are still on (e.g., region removal) are usable (03/05/2018) - fixed a bug in SAC option window and station setting window that appears within saveSAC function that did not allow the user to remove entries in fields (03/07/2018) - fixed a bug in saveSAC function that was checking the reference trace number against only the starting value (03/16/2018) - modified setTime function so that when gaps are being used for timing traces, it overrides the condition when no time mark length is set (i.e., time mark length is set to a negative value) (03/16/2018) - added lines to get_save_cond.m and saveResults.m so that they either end on-going subanalysis (e.g., correct_trace function) that disable "enable" field of the tools (e.g., Correct Trace pushbutton) or that they are unavailable when a process that cannot be terminated is on-going (e.g., ginput). Also save tool is disabled during trace identification, digitization, and time calculation processes. (03/22,23/2018) ========================== % % % current matlab scripts/files needed for DigitSeis to work % DigitSeis.m % assign_traces.m % check_sufTime.m % class.mat % closeCheck.m % column_vec.m % combine_traces.m % digitize_TrTm.m % findInside.m % find_duplicates.m % find_dy.m % find_tr_length.m % find_traces.m % get_save_cond.m % get_time.m % getSTD.m % ginput.m % id_objects.m % image_mask.m % import_mask.m % modImage.m % obj_icon.m % obj_separation.m % overlap_analysis.m % putdowntextN.m % rgb2hsv_fast.m (for public package, remove) % rm_pixels.m % saveResults.m % saveSAC.m % setdefaultDigitSeis.m % smallClassification.m % smallS2bigS.m % time_assign.m % time_label.m % updateSmallImage.m % update_zeroline.m % writesac.m (for public package, remove) % and a directory "icon" where all image files for icons can be found % % ========================== Tools to analyze DigitSeis output etc. - copySet.sh this script copies all files needed for DigitSeis into a new directory (first argument) usage: copySet.sh new_directory - combine_Sobj.m this script combines duplicate pixels for S objects from earlier version of DigitSeis, needs to be updated for non-overlapping objects - dispImageTrace.m this script allow visualization of the original image with digitized traces overlapping - extractSAC.m this function reads in a completed analysis file and generates SAC files. If all analysis files within a directory need to be processed, use run_extractSAC.m - tm_trend.m this script stacks time marks to investigate coherent signal associated with time marks version 1.2: May, June, July, August, September 2017 - added "+" buttons for timing calculation and SAC extraction (05/10/2017) - changed correct trace region selection box colour to red (05/25/2017) - fixed a bug with the Recover button of the Correct Trace Properties window. When the Recover button was pressed without opening the Correct Trace window, the imrect object remained on the image and needed to be manually deleted. This issue has been fixed (05/25/2017) - added an option to specify time sampling interval for generating SAC files through the SAC extraction option window (05/25/2017) - added an option to include time correction (e.g., clock error) to the SAC files being generated through extract SAC option window (05/25/2017) - added an option to generate SAC file that will have timing calculated based upon the closest round second at the beginning through extract SAC option window (05/27/2017) - removed pushbuttons associated with calculating the starting and ending positions of each trace. This function is now embedded in the saveSAC function and if the positions need to be changed, this can be achieved by saveSAC option window (05/27/2017) - added an option to apply zeroline correction through polynomial fitting of digitized data in the extract SAC option window. This allows user to examine the data and correction after polynomial fitting, with a capability that individual line can have different polynomial order fitting. (06/04/2017) - fixed a bug in load_analysis function associated with accessing the 'enable' property of the pbedit_start handle (removed 05/27/2017). This causes a problem when file saved using version 1.2 is opened with version 1.1. (06/06/2017) - added an option (change_traceNum.m function) to add a new trace after digitization/correct trace (when Adjust Traces option is disabled). The option is in the Digitize option box ("Add Trace"), and when the pushbutton is clicked, the user will need to click on the main image to put a movable point. This point should be dragged to where the new trace should start, and once it is finalized (by double clicking on the point), the new trace zero line will appear. The user can then use the Digitize button to add digitized trace for the new trace. (06/06/2017) - changed trace addition within Adjust Traces function. The user needs to click on the main image and adjust the interactive point object (red circle with cross) for the starting position of the new trace and double click to finalize. The trace zero line will then appear. The end position can be modified within the Adjust Traces window table. (06/07/2017) - updated change_traceNum.m function so that the option window is brought back to front after trace has been added. (06/09/2017) - added an option to redigitize areas around hour marks (for HRV type seismograms with second of the two closely spaced time marks indicating the hour mark). The hour marks for the HRV traces have different vertical offsets from the other minute marks, and requires separate treatment. This option is accessed through the additional option window for the Correct Trace, and clicking the "Hour Mark Identification" pushbutton will plot boxes on the main image around the hour marks. If the boxes are at wrong locations, delete using the mouse right-click and then "Delete" option. The boxes can also be resized (cannot be moved vertically to a different trace - if on a wrong trace, delete). Note that new boxes cannot be added. Once boxes with hour marks are selected, push "Update Trace" button to recalculate digitized traces within the boxes. If traces should not be updated, then press the "Cancel" button to remove all the imrect boxes from the main window. (06/09,11,18,19/2017) - modified Adjust Traces function so that when a new line is added, the Adjust Trace window comes back to front. Also, when the window is closed and there is impoint object is still in the figure, it will be deleted automatically. The Adjust Traces window is also automatically closed if it is still open when Edit Classification button is clicked. (06/16/2017) - modified modImage.m so that recovery of the original image is done through freehand area rather than rectangle. (06/16/2017) - modified Correct Trace function so that whenever classification icon is pushed, the classification calculation is done from scratch (i.e., recalculation button does not need to be pressed unless threshold value has been changed). Consequently, the button to recalculate classification has been moved to the top right, next to the threshold value window. Furthermore, an option to inspect and recover portions of the original image (before image processing) has been added. (06/17,18,19/2017) - replaced the trace identification routine in load_analysis function so that it is more stable (uses trace-zero line to identify traces rather than simple vertical position information). Consequently, the digitization option window has been updated to remove x ranges and checking trace/STD algorithm has been changed. Now, individual trace/STD can be checked by putting trace number or all traces can be checked by putting 0 in the edit box and then clicking mouse/key through to go through the trace/STD in sequence. (06/18/2017) - modified change_traceNum.m in cases when the number of elements for pt_tracesY0 is not the same as pt_traces. This should not have happened (not clear where the inconsistency arises). Now that the trace truncation happens at SAC saving stage, this should have limited implications, but it is a bug to watch out for. (06/19/2017) - added routine to automatically digitize the trace that has been added in change_traceNum.m. (06/19/2017) - fixed a bug that displayed figure windows as .mat file from previous analysis was loaded in load_analysis function. (06/20/2017) - modified hour mark identification/recalculation within the correct trace option window so that while the hour mark rectangles are on the image, the Correct Trace pushbutton on the main window is inactivated. It is enabled when either the Cancel button is pushed or after all the recalculation has been completed. Also, activated updating of each trace as recalculation is performed. (06/24/2017) - changed the add trace function in Adjust Traces window so that the "+" button becomes inactive when it's pressed (so that he user won't be able to push it multiple times) and invoking ginput function for starting point selection with the crosshair (06/24/2017) ginput function removed (06/26/2017) - added an option to delete specified trace in Digitize Option window, through modification to change_traceNum.m routine (06/25/2017) - fixed digitize_traces function in DigitSeis.m so that digitization will work even when there is only one trace available (06/26/2017) - added save icon in the toolbar of Edit Classification window so that the session can be saved directly from the Edit Classification window. Also added an icon to identify time marks with rectangles. (06/27,28/2017) - fixed an issue with hour mark identification box when the hour mark is split into multiple pieces (06/29/2017) - removed the use of start/end traces and replaced with removal of NaN segments of ptraces at the beginning and the end within saveSAC function. Accordingly, pt_tracesY0 is no longer needed (06/29/2017) - modified find_trace routine so that trace zero lines that are overlapping or very close by are removed (it's easier to add missing traces than trying to check if there are zero line overlaps for each image). (06/29/2017) - changed the digitization algorithm from one that works with images to one that uses digitized traces from individual objects (digitize_TrTm.m). This speeds up the digitization process and naturally deals with ones with time marks or without. Corresponding changes to correct_trace routine and hour mark automatic calculation within correct_trace_options routine have been updated to use digitize_TrTm.m (07/01,02,05/2017) - fixed incompatibility between original image retrieval and region removal in modImage.m. Also changed viewimage function in DigitSeis and removed the option of selecting freehand vs. rectangular region for modification. (07/03/2017) - modified imageMod_options function to allow piecewise contract function (imageMod) to be run from the option window itself (when changing the division values). (07/03/2017) - added a new tool in correct trace window to manually determine the vertical offset for combining time marks with main traces. Clicking the "Manual Vertical Offset" button opens a new window that allows vertical offset value to be set manually and recalculate the digitized trace (07/03,04,05/2017) - modified correct_classification algorithm to visualize trace or time mark objects that are overlapping with one another (07/05/2017) - fixed correct_trace mask calculation that masked pixels for the target trace when overlapping object belonging to other traces existed (07/07/2017) - modified correct_trace routine so that the objects identified in correct trace window are properly combined with the objects from the main S structure. This avoids getting S objects chopped up into pieces when correct_trace function is used (07/07/2017) - fixed a bug in hour mark automatic correction algorithm to use proper BoundingBox definition (07/17/2017) - fixed a bug in correct trace function that had dimension inconsistencies when the digitize_TrTm returned shorter trace than the full x range (07/19/2017) - brought back fused image digitization in digitize_TrTm function in order to make the transition between time mark and main trace smoother (07/19,22/2017) - implement overlapping region algorithm in correct classification window and correct trace window (07/20-21/2017) - fixed a bug in correct_classification where the changing the axis range for the main image window did not work when small image was being shown (worked when pan, zoom in or zoom out buttons were on) (07/21/2017) - made vertical shift that is returned from digitize_TrTm to be integer (because fused image is used for the analysis), and changed digitization routine so that the vertical shift information is stored in tmshift variable to be accessible in correct_trace function (07/21/2017) - fixed two bugs in correct_trace function associated with manual vertical shift. One bug was inconsistency in the vertical shift value when digitization icon was pressed. Fixed it so that if the manual vertical shift window is open, the digitization process will take the vertical shift value from the window and calculate trace (if it is closed, the value is automatically determined). The other bug happened when the manual vertical shift is used after the trace had been applied to the main window. This had to do with the fact that SCLA structure was modified in passing object information back into the original S structure, and this has been fixed. (07/22/2017) - changed digitization in the correct_trace function so that the average vertical shift for the given trace is used as a default (this value can be manually changed) (07/22/2017) - added object combination function in edit classification function/window (07/22/2017) added automatic type assignment (i.e., time mark, main trace, noise) (07/24/2017) - modified Classification_UpdateREMOVE function within correct_classification function so that only the objects that have regions/lines removed from them are reclassified rather than all objects within the current view window (07/22,23,25,26/2017) - fixed a bug with hour mark automatic correction in selecting region (avoid cases where continuous trace exists where time mark is) and possibility of multiple selection on a single trace (07/24,25/2017) - added routine to remove gap boxes when digitize function is called with the boxes on (07/24/2017) - added a pushbutton in manual vertical shift window in correct_trace function that allows automatic calculation of the vertical shift using gradient minimization (07/25/2017) - added an ability to define overlapping region in Edit Classification window through overlap_analysis routine. This will allow user to define separate objects even when multiple objects overlap with one another (07/26,27/2017) - fixed numerous bugs in correct_classification subfunctions (07/28/2017) - fixed save function from within correct_classification that broke while making changes (07/29/2017) - updated overlap_analysis.m so that region definition/removal tools are now all toggletools and once it is pressed, the functionality can be used multiple times. Also fixed a bug with the image that is being displayed in the background (07/29/2017) - added overlap analysis function to correct_trace window (07/29/2017) - fixed issue of togglebutton tools becoming unavailable when image is changed from classification to gray scale and vice versa in overlap_analysis function (by resetting the togglebuttons) (07/30/2017) - using masked image for grayscale image in overlap_analysis with full image togglebutton to examine rest of the images (07/30/2017) - fixed issue when line removal tool is used in Edit Classification and overlap_analysis (when the line is not one-to-one, strange results happened). Now, any shape of the "line" will work to remove pixels along the line (07/30/2017) - implemented a scheme to check and see if there is another DigitSeis window open. If it is, the program asks whether or not to close already open window (07/30/2017) - fixed bug in overlap_analysis that showed colour image when full grayscale image button is pressed before gray image is shown. Also included full grayscale image view when toggle tools are being used. Fixed a bug that checked overlapping regions twice when objects were combined, resulting in pink display of the region in the Edit Classification window even though there were no overlaps (07/31/2017) - fixed issue in correct_trace function. 1. switching to grayscale image when adjust contrast is used when classification image is being shown; 2. disabling of original image retrieval when retrieve region (through mask definition) button is pressed; 3. when digitized trace goes before or after available digitized trace for the given iTRACE, the segments before/after existing segments not put back into the original image (07/31/2017) - modified overlap_analysis function so that noise object can be analyzed and to make sure that when objects are combined, there are no duplicate pixels (08/01/2017) - modified imageMod function so that the range of intensity values to be used for imadjust is between 1 and 255 (08/01/2017) - fixed automatic hour mark correction algorithm - when there was a gap in the selected time window, an error occurred. This was fixed by 1. allowing data to be properly copied when there were NaNs within the digitized traces (i.e., not at the beginning or at the end), and 2. removing hour-mark correction box selection when there is a gap between time mark and trace (08/02/2017) - modified correct_trace function so that when "Include NaN" application button is pushed without any digitized traces, a question box opens to ask if all NaN values are to be exported to the main trace (08/02/2017) - fixed find_gap function error when there is only one trace available and the vertical extent of the boxes could not be defined (08/03/2017) - modified overlap_analysisCallback in correct_classification and correct_trace so that other tools that modify the S structure are not available while the overlap_analysis window is open (08/04/2017) - fixed image being moved to the top left corner when zoom/pan function in Edit Classification window is used while overlap_analysis window is open, made more robust for all subfunctions (08/04,05/2017) - set up default system where user can save some of the default parameters (currently associated with classification parameters), accordingly, "+" option is added for Edit Classification where colour scheme for different types of objects can be selected as well as BW threshold level and tick_length_lim, colour scheme change togglebutton in Edit Classification and Correct Trace windows are removed (08/04/2017) - extended the default system to other "+" button option parameters (08/05/2017) - fixed issue with digitize_TrTm.m when pinpoint function is used in correct_trace window so that the average y position is calculated rather than the weighted intensity value (08/07/2017) - modified correct_classification algorithm so that undo function is much faster (08/07/2017) - added algorithm to automatically save combined SAC file (08/07/2017) - modified correct_trace function so that objects can be modified while in classification mode, and also added an option (in correct_trace option window) to keep the x and y axes limits when switching to classification window (08/09/2017) - modified undo scheme so that removing region etc. in Edit Classification window are not slowed down too much. Also, made sure that overlap_analysis window is closed when Edit Classification is exited (08/10/2017) - fixed trace/STD check routine in digitize option window and made sure that the trace colours return to default when the digitize option window is closed (08/11/2017) - implemented an ability to import objects from another analysis as mask to image in image modification option window. This will allow easier processing of images that need to be divided into different time windows. (08/12/2017) - removed H.ax2 that showed the curvature of traces and comparison with the calculated zeroline from the main figure. It now opens when Identify Trace button is clicked. Since link to H.ax1 no longer is saved, it causes less warnings when saved analysis is opened. (08/14/2017) - disabled Edit Classification button when Correct Trace function is being used. It avoids object structures to be modified at the same time. (08/14/2017) - removed BW, sumI, ww, ptraceX, and ptraceY from being saved, it is only used in correct_classification function (08/16/2017) - disabled curvature buttons for the time being (08/16/2017) - implemented more robust algorithm to export classified objects (SCLA) from correct trace window to the main objects (S) (08/18/2017) - improved/removed potential issue in doing extra polynomial fit to the digitized trace in SAC option (edit_SAC) algorithm (08/19/2017) - fixed issue with getting and setting colour of ptrace and ptraceSTD in digitize_options function (08/20/2017) - fixed issue in correct_classification function that didn't undo the stored pixels of traces, time marks, and noise objects when undo function was used (08/20/2017) - fixed a bug in smallS2bigS.m involving empty rpixE (08/21/2017) - fixed some region retrieval issues in correct trace (both grayscale and original images) when switching between classification view, grayscale view (with mask on/off), and original image view (with mask on/off). Changed the order of line and region removal in correct_trace. Removed default mask of trace and time mark objects with no trace assignment. (08/21/2017) - implemented algorithm (getSTD.m) to calculate STD traces for analyses that were saved using an early version of DigitSeis where STD lines were not calculated (09/01,05/2017) - fixed bug in checking trace/STD in digitize_option window (09/01/2017) - changed SAC extraction so that up becomes positive rather than negative (09/01/2017) - modified setdefaultDigitSeis.m to make sure that new updates to the default fields are properly saved (it used to be that too many variables were saved and hence overwrote the new settings) (09/02/2017) - implemented classification modification in Edit Classification window that allows a small rectangular region to be selected and work with that portion of the image to define classification, smallClassification.m, id_objects.m (09/05/2017) - implemented original image recovery in image modification option window and also moved contrast and noise removal into this window from the toolbar of the main window (09/05/2017) - fixed digitize_TrTm.m when there are no traces points available (09/06/2017) - changed the order of Edit Classification and Trace Identification and modified find_traces function (now separated from DigitSeis.m) so that the calculation relies upon traces identified through Edit Classification (09/06/2017) - fixed a bug in correct_classification function that did not specify the axes object for image explicitly (09/07/2017) - changed the order of "Close" and "Apply" buttons in smallClassification.m so that they are consistent with overlap_analysis.m order (09/07/2017) - changed correct_trace function so that when classification button is pressed with mask off, it will still analyze image with mask on, original image view icon is also turned off when classification button is used (09/08/2017) - put more rigorous structure for undo within correct_trace function, also implemented undo of the results of the correct_trace analysis (09/10/2017) - removed trace and time mark objects without trace number assignment in correct trace so that orphaned trace/time mark objects no longer exists (problem when plotting duplicates) (09/11/2017) - updated smallClassificationCallback function in correct_classification function so that WindowButton/Key/etc callbacks of the Edit Classification are reset before imrect is called (09/11/2017) - modified smallClassification associated routines so that zoom/pan are disabled when smallClassificationCallback is called, when exporting the grayscale image back to I0 the masking is not considered, if Edit Classification window is closed while smallClassification window is open, smallClassification window also closes, bug in mask_OnOff is fixed (call to tmVert removed) (09/12/2017) - improved find_traces function so that if the rough trend is correctly calculated, all the lines are found and better quadratic fit is determined (09/13/2017) - fixed bug in smallS2bigS.m that resulted in vertical and horizontal pixel removals on all objects that were affected, resulting in segmentation of objects (09/14/2017) - removed adjust contrast functionality from smallClassification window, disabled zoom to whole image when smallClassification is called (in Edit Classification window), fixed bug that made retrieve region not work properly in smallClassification, changed the order to tool buttons at the top right in Edit Classification window (09/15/2017) - modified find_traces.m so that quadratic fit for each trace is more robust (requiring certain number of data to be available), added waitbar for processing trace objects, and implemented two other methods of calculating zero-trace lines (i.e., using only the image, using trace object mask without refinement), consequently, removed the Adjust Traces pushbutton from the main window (it is in the idTrace_options window) (09/15,16/2017) - changed digitization process so that the original image (when available) is used rather than processed image. This allows complete separation of the processed image for classification purposes and original image for digitization (using classified objects). It means that as long as the classified objects are correct, it doesn't matter how the image is being processed. (09/16/2017) - fixed smallClassification so that type of object (S.ID) of objects that are not combined with those outside of the selected region is preserved (09/16/2017) - fixed overlap_analysis figure update in smallClassification (09/17/2017) - added checkbox for all view or current view when switching between classification and gray scale images in smallClassification in the option window for correct classification (09/17/2017) - changed the way Edit Classification and Identify Trace buttons are activated in load_analysis function (09/17/2017) - when exiting correct_trace window, output_message variable is changed so that the latest 10 lines remain (no need to keep track of all lines of communication) (09/19/2017) - removed ftrend_tick from saving parameters (and the code), removed HIMRGB from saving parameters (09/19/2017) - fixed bug in correct_classification that caused problems with region removal, removed time mark boxes when smallClassification or overlap_analysis is called (09/20/2017) - changed the way to assign trace number to digitized trace/STD from figure objects and separated it to assign_traces.m function from within DigitSeis.m (09/21/2017) - fixed a bug that generated error when saving the analysis from within the Edit Classification window when the analysis is not saved previously. It had to do with the missing H.version variable (09/22/2017) - removed the ability to undo the result of correct_trace function in the main window (09/22/2017) % % % current matlab scripts needed for DigitSeis to work % DigitSeis.m % assign_traces.m % change_traceNum.m % class.mat % combine_traces.m % correct_classification_options.m % digitize_TrTm.m % findInside.m % find_duplicates.m % find_traces.m % getSTD.m % ginput.m % id_objects.m % image_mask.m % import_mask.m % modImage.m % overlap_analysis.m % putdowntextN.m % rgb2hsv_fast.m (for public package, remove) % setdefaultDigitSeis.m % smallClassification.m % smallS2bigS.m % updateSmallImage.m % update_zeroline.m % writesac.m (for public package, remove) % and a directory "icon" where all image files for icons can be found version 1.1: February, March, April 2017 - minor bug fixes and updates - rearranged the icon order in the main window (01/31/2017) - implemented initial question, whether the user wants to load image or an existing analysis. The initial window setup is consequently moved to load_image function. (01/31/2017) - changed Get_DATE_TIME function so that it no longer uses uicalendar function. The function did not work when the code was compiled. (02/01/2017) - changed callback function for edit boxes for time and length measurements at the beginning so that when all four boxes are populated, the Identify Traces pushbutton becomes active. (02/01/2017) - modified the odd/even trace selection as well as the behaviour of All button for adjust_traces function so that odd/even switches between the two (i.e., no separate buttons needed), and All will always choose all or none. Also added another button with ^ string to do batch y-value shifting of the zero-line traces. (02/01/2017) - modified correct_trace function so that objects of non-target trace is masked by default. This implied that ability to change the mask was needed and hence implemented. There is also a new icon in the correct_trace window that allows the user to see the original image. (02/02/2017) - fixed index issue in digitize_traces function (02/02/2017) - implemented an option to trace a line manually through defining points along the trace in correct_trace function and updated the rest of the DigitSeis function accordingly. The objects that were defined by manual tracing now have S.ID value of 2 (trace) or 3 (time mark). (02/04/2017) - changed activation of the time end determination (star/end of traces and 1st/last time marks) to after digitization rather than after classification (02/05/2017) - added a checkbox that allows user to find gaps in digitized traces (becomes active only after digitization has been completed), updates after corrected traces are applied, removes timebounds or removed by timebounds visibility (02/05,06,07/2017) - updated and improved trace selection in digitize_trace to be similar to the trace selection for adjust_trace function, and added an option to reset all trace assignments for digitize_trace function (02/05,06/2017) - added time mark position callback function so that when it is pressed after digitization is done, the trace number assignments of all time marks are reset (02/05/2017) - added a routine to check for consistency in the time information input (check on the duration of each trace and the number of time marks) in Create_Time function (02/05/2017) - modified pixels2time function so that for files that have been created using DigitSeis of at least version 1.0 will rely on trace number assignment of time mark objects rather than the box locations when identifying time marks for a given trace (02/05/2017) - fixed bugs in correct_classification where in some cases, Trace Number is not assigned to the objects (i.e., S(i).TraceNum = []). Also, to make sure this doesn't cause issues when digitizing, some lines of codes have been added so that any empty S.TraceNum will be assigned with the value -1 (02/06/2017) - fixed bug that caused an error and didn't allow data to be saved in Saveresults if the input filename was shorter than 10 characters long (02/06/2017) - added an option to change box and figure sizes associated with correct_trace function (02/07/2017) - added closeDigitSeis function that is called when the DigitSeis window is closed so that any remaining windows that are still open are automatically closed (02/07/2017) - added a scheme to make sure no more than one correct_trace or edit classification window is open at any one time (02/07/2017) - added a function that is called when the correct_trace window is deleted (rather than closed) so that errors associated with tracing points will not be generated (02/07/2017) - modified the objects in the left column of the main DigitSeis window so that objects that are not often used are simplified or hidden (02/08/2017) - fixed a bug that occurs when the length of pt_traces and ptrace are different (can happen when the beginning/ending positions of the traces are defined, i.e., if one tries correct trace after working on timing parts) (02/08/2017) - fixed a bug that didn't allow SAC files to be saved if the digitization was performed with an older version of DigitSeis and the STD traces didn't exist (02/08/2017) - reorganized the left column with options: (02/09/2017) 1. made four boxes for length/time information smaller and put them in a single row 2. aded + button associated with identify traces to allow selection of # of vertical stripes for trend calculation 3. moved luminance threshold edit box left of Edit Classification button (and removed text explaining the edit box) 4. moved digitization range edit box into a + button beside Digitize button (and removed text explaining the edit box) 5. moved Edit pushbuttons associated with Ends of Traces, 1st Mark, and Last Mark pushbuttons to the left of them. 6. removed explanation text for # of traces edit box - modified digitize_trace_and_tickmarks.m so that the range of values to test for merging time marks and main traces takes advantage of the fact that time marks are shifted by similar amount. The digitize_traces function of the DigitSeis function has also been modified to store the time shift information and provide appropriate value for starting shift and range of values for digitize_trace_and_tickmarks function (02/10/2017) - added an option to check for vertical lines (i.e., time mark offset that were improperly classified). This is, by far, not very effective, but it does look for vertical offsets that were about the length of the offset between the main trace and the time mark (02/11/2017) - removed the time panel from the left column of options (02/12/2017) - added options in digitize_options function/window so that individual traces and STD can be visualized (02/12/2017) - added option in digitize_options to recalculate/recover traces using specified x range (02/13/2017) - added background colour to "Correct trace" button to help avoid clicking wrong buttons since it is potentially used often (02/14/2017) - changed the activation timing of the reference time pushbutton, 1st and last time mark positions, and timing position for each time mark (checkbox) to after ends of the traces have been marked (02/14/2017) - added changing default font size for uicontrol objects when the screen is large (02/14/2017) - fixed an issue with find_gaps function when the Ends of Traces have been performed and pt_traces and ptrace have different lengths (02/14/2017) - fixed correct_trace function so that when pt_traces are shorter than new ptrace, the zero-lines will be either extended or put back (this only happens when ends of the traces are determined before going into correct_trace function). Also introduced a new variable pt_tracesY that keeps all values of zero-line Y from when it was initially determined (otherwise, it will be cut and need to be linearly interpolated). The variable pt_tracesY0 is also saved (02/14/2017) - fixed a bug in correct_trace function where noise objects were not removed when objects were updated with new SCLA objects defined through correct_trace activities (02/15/2017) - fixed bugs in find_gaps, correct_traces, and adjust_traces that had to do with pt_tracesY0 not being updated when adjust_traces adds/deletes traces (02/23/2017) - changed order of icons in correct trace window (02/23/2017) - fixed digitize_traces_without_tickmarks.m so that digitize_regionSTD function is also packaged in the same file (02/23/2017) - added "+ Image Modification" pushbutton at the top of the left column and moved polarity, rotation, and large-scale background removal options (used to be on the toolbar of the main DigitSeis window) to the new image modification option window. (02/23/2017) - added resetZoom function to correct_trace function to reset zoom/pan functions and to suppress error messages (02/24/2017) - added an variable Iorig that keeps the original image (after cropping) and an option to recover the original image using an icon on the toolbar of the main window (02/25/2017) - added a popup error message if the user pushes Apply button in the correct trace window when there is no digitized trace (02/25/2017) - added an option to perform piecewise contrast adjustments automatically in "+ Image Modification" window. Divided this function into two - "Piecewise Contrast" pushbutton automatically runs the piecewise contrast update and "+" button allows other options (including number of divisions for piecewise contrast modification) to be accessed (02/25/2017) - added zoom/pan off to toolbar icons (removing region, adding region, image modification) (02/25/2017) - fixed a bug for manual tracing in the correct trace window when there are multiple objects for a given segment identified (this happens when the lines have very high gradient). Also added an option to switch between spline interpolation and linear interpolation using the correct trace option window (02/26/2017) - changed position of the "Close" and "Apply" buttons in the correct trace window and modified the apply algorithm so that it no longer asks the user whether the NaN's should be skipped or not. Instead, there are two "Apply" buttons corresponding to the two options (02/26/2017) - modified the behaviour of correct trace options window so that while it is open, the End of Traces button becomes inactive (to avoid inadvertently pushing it) (02/27/2017) - changed the load_analysis so that when the analysis is loaded, any additional open windows (e.g., classification window, options windows) will be closed automatically (02/27/2017) - fixed bugs for tracing using points, and when trace and STD information is available for the trace, use the difference to determine the width of the line (02/28/2017) - added a function that checks the input value of the luminance threshold (edit box beside "Edit Classification" button), and also algorithm to check for this value in correct_classification and correct_trace functions. Most of the time, the check in the correct_X functions is not necessary except when the user changes the value and immediately clicks on one of these buttons (03/01/2017) - fixed a bug that produced error message when the user clicked region outside of the image axes when selecting classification type (red/white/green) in correct_classification and correct_trace functions (03/01/2017) - disabled trace identification and modification buttons once digitization is complete. Digitization assigns trace number to each object, so changing traces, especially the number of traces or order of traces will cause problems (03/01/2017) - added a new icon to the main Digitization window that allows switching between original and processed images (03/01/2017) - removed confirmation dialogue when the classification is recalculated in the correct trace function (03/05/2017) - modified the icon for time mark position and allowed it to change image when clicked so that it is easier to see if the time mark setting is up or down (03/06/2017) - changed load_image function so that when a new image is loaded, the question about complementing image is asked at the beginning rather than after the image has been read. This will allow the user to input all necessary information and then wait for it to load rather than waiting for a while, choosing an answer, and then waiting for a while (03/06/2017) - added "Recover" pushbutton to the correct trace options window in case there was an error that didn't go through the correct trace function, i.e., the correct trace function button is disabled. The Recover pushbutton is invisible until the correct trace pushbutton becomes disabled, and it allows the user to quit the current correct trace session and recovers the functionality of the correct trace pushbutton (03/07/2017) - updated load_analysis function so that the vertical analysis axes object does not appear even for files created with an older version, and that the other axes objects are in the new position (03/10/2017) - modified imageMod function so that the I0 variable is updated only if all the regions have been successfully updated. Also, added an algorithm that tries to ignore intensities with very small number counts at the bottom and top of the range (i.e., from 0 and from 255) in case the image intensity range is narrow, as well as general improvements (03/10/2017) - modified structure object selection when regions or lines are removed in correct_classification function for better efficiency (03/10/2017) - modified region and line removal functions in correct_classification function so that unnecessary updates are removed. Also, modified the region and line removal codes so that they are more efficient and that there are no warnings when the zoom or pan toggle buttons are on (03/12/2017) - modified correct_classification function so that when image is zoomed in, the image shown is actually the image processed, rather than the entire image, so that the imfreehand function runs much faster. This requires additional functions to be in the same directory, see below for the list of functions needed (03/12,13,15/2017) - added some commands that turn all the icons inactive in correct_trace function when the user is modifying classification of objects (03/15/2017) - modified find_gaps function so that when there are rectangles left over in the main axes object (when the box is unchecked), then whatever remaining rectangles will be deleted (03/28/2017) - modified reclaculate_callback function within the correct_classification function so that whenever the classification is recalculated, the time mark length is read from the main window (otherwise the user must close the Edit Classification window whenever the time mark length is changed) (03/28/2017) - fixed pixels2time function so that when H.version>0, the entries of CALL are not removed as time marks for each trace are identified (03/29/2017) - changed the location of the pushbutton for setting the time for the first time trace so that the work flow is more continuous from top to bottom on the left column (03/30/2017) - removed the option to select region outside of the box/freehand area before modImage function is called (hence the question box no longer appears). The outside region option wasn't working well, and with the piecewise contrast correction, the ability to work on a large region has become less necessary. (04/24/2017) - modified modImage.m and corresponding parts in DigitSeis.m so that there is an option to recover the original image in modImage function. (04/26/2017) - modified load_analysis function to improve trace identification routine (see notes from 06/18/2017 for version 1.2) and the issue with v1.2 compatibility in the use of pbedit_start handle (see notes from 05/27/2017 and 06/01/2017 for version 1.2). (06/18/2017) % % % current matlab scripts needed for DigitSeis to work % DigitSeis.m % digitize_trace_and_tickmarks.m % digitize_trace_without_tickmarks.m % ginput.m % modImage.m % putdowntextN.m % rgv2hsv_fast.m (for public package, remove) % updateSmallImage.m % writesac.m (for public package, remove) % and a directory "icon" where all image files for icons can be found % version 1.0: January 2017 % - minor bugs, spelling errors corrected % - modified the selection of first and last time marks so that the time % mark classification information is taken into account and the initial % suggestions made automatically. The user needs to change colour of the % positions that do not belong in the "first" or the "last" set (which will % turn their values to NaN while preserving their existence), correct any % locations that are misidentified, and double click on the bottommost % point to finish the selection session. Note that the vertices are no % longer deletable, making the process a little more robust (time % calculation requires the same number of vertices as the number of % traces). % - modified the timing calculation component so that the user can now % correct the time mark locations by moving the yellow vertical bars % sideways to where the correct position should be (which gets incorporated % into time calculation). % - added trace-specific trend correction (quadratic polynomial fit) to % data exported as SAC files. Also removed path-dependence on the SAC % filenames. % - removed mouse-tracking function and modified the behaviour of data % cursor tool so that the x and y values are visible with large font. The % top-right text showing the x and y positions (if turned on) also shows % the data cursor position rather than mouse position. % - turned off the top pull down menues in the main work window and % classification editing window so that the users will be forced to % use icons for various commands. % - implmented an algorithm to recover handles needed for digitized traces % and STD in load_analysis function. % - incorporated regional image modification (new viewimage function) % - removed Reload Image icon % - removed Cursor Coordinates % - removed print icon from the main analysis window % - turned off the option to automatically adjust image contrast when image % is loaded in initially % - incorporated trace assignment when the objects are used to digitize % (without assignments) % - turned off the question box that asks user if the trace is curved in % correct_trace function. It now checks whether curvature needs to be % applied by checking the status of the curvature icon. % - updated Edit Classification icons. Icons for data cursor, print, save, % loading different gray-scale image, adding pixels, assigning trace number % to objects, and check box have been removed and the order of icon % appearance has been changed. % - implemented an option to choose the end of the time mark for the % beginning of a minute (left vs. right) % - modified load_analysis function to retrieve some of the settings (e.g., % position of the time mark, number of time marks between 1st and last % selected time marks, etc.) Also the "enable" properties of some of the % pushbuttons are imported from saved version. % - updated mark_start function so that it does both the start of the line % and the end of the line. Also, when objects are available, the start and % end points are automatically selected (the positions can still be % modified) using the trace and time mark positions. Removed end of trace % selection/edit pushbuttons. % - reorganized toolbar for correct_trace function (removed some icons) and % added the ability to zoom out to the entire image used in the correction % after zooming in % - provide an estimated number of time marks in the edit box when % "Identify Trace" routine (find_traces function) is run. % - reorganized left column so that the order reflects more of the work % flow and also the activation of buttons so that they are not active until % they are ready to be used. % - removed option to save as SAC as part of the normal save routine and % added a pushbutton to extract SAC information (becomes only active after % time calculation has been performed). % - modified correct_trace function so that remove region tool can be used % continuously until undo or some of the other tools is clicked. Also, the % binary threshold change can now be made in the correct trace window % itself rather than having have to go back to the main window. % - modified digitize_traces and correct_trace functions so that noise % objects are deleted before digitization. % - removed axes object (H.ax3) that displayed the time mark trend. % - modified Get_DATE_TIME function to allow modification to the date % rather than having have to do the full selection each time. % - modified digitize_traces so that trace assignments are combined with % objects without any trace assignments. Moved functions % digitize_traces_with_assignments and digitize_traces_without_assignments % to DigitSeis_oldFcn.m. % - modified correct_trace function so that objects are properly returned % to the S structure based upon their x position and trace number rather % than window of the correct traces. The former approach caused problems % when objects from the same trace existed outside of the box chosen. % - added version field to H structure to keep track of versions of % DigitSeis used for analysis. If minimum version is >=1, then all objects % have assigned trace number, and this is used in identifying the ends of % the traces and starting/ending time marks. % - modified correct_classification routine so that the binary image % threshold selected in the Edit Classification window is exported back to % the main DigitSeis window. % % current matlab scripts needed for DigitSeis to work % DigitSeis.m % digitize_trace_and_tickmarks.m % digitize_trace_without_tickmarks.m % ginput.m % modImage.m % rgv2hsv_fast.m % writesac.m % and a directory "icon" where all image files for icons can be found % Version 0.80 % - Curverd traces now supported (testing version) % - Classification of seperate trace processing now is reflected to the % global classification structtre (testing version) % - minor fixes/updates/changes here and there % % Version 0.75 % - Added buttons in the "adjust traces" dialog for fast selections. % % Version 0.72 % - Remove region in Correct classification gui (binary image) % - Added contrast interactive tool in correct trace gui % - Added buttons in the "select traces to digitize" dialog for fast % selections. % - changed in digitize_trace_and_tickmarks.m the bounds of minimization to be more robust when objects are % not in the middle % - minor bug fixes and improvements. % % Version 0.692 % - Bug fixes in correct trace gui (zoom out, change classification, others) % - performance improvements % - when applying the corrected trace, there is an option to replace only % the numeric values (skip NaNs). % % Version 0.69 % - Now digitization returns also the std of the digitized column. It is % included in a second block of data i.e., DATA2 at the SAC structure. % > Files digitize_trace_without_tickmarks.m, % digitize_trace_and_tickmarks.m have also changed. % > File digitize_regionSTD.m has been added % - minor improvements - bug fixes when loading previous analyses % % Version 0.68 % - Added the option to correct portion of a trace instead of the whole % trace. % - minor modifications here and there. % % Version 0.67 % - Added an input dialog that allows purging all small objects in binary % image during the identification of traces and time marks procedure. % - Added option to filter the image for get ridding the salt & pepper % noise using either 2-D median or Wiener filter. % - Added a button to reset zoom to the whole image in the "edit % classification" gui % - Added a button to purge red-noise objects at the "edit classification" gui % % Version 0.65 % - Support for seismograms without time marks added. -->set time mark % length < 0 to indicate that there are no time marks. % - Added the option the user to select the traces to be digitized. % - fixed small bugs here and there % % Version 0.6 % - object asignments to traces now allows for multiple assignments per object % - minor bugs fixed % % Version 0.55 % - error handling imrpoved in the case of tight trunccated image % - minor improvements in individual trace correction. % % Version 0.54 % - Bug with additional instances of buttons in single trace tratment corrected % - minor bugs corrected % % Version 0.53 % - Bugs fixed with assignments % - Remove background button-function added % % Version 0.52 % - Corrected bug of previous version that sometimes was giving error % in timing when timarks down % - Assignemnt of objects to traces moved under the classification % proccedure. S structrure now includes the new field TraceNum which stores % the trace that this object is assigned to. It is empty for red objects % You should 1st complete the classification and then start working with % assignments. % - Added the option for the user to correct object assignments. % - other minor bug fixes. % % Version 0.51 % - Corrected function name to DigitSeis from DigitizeSeis % - Bugs corrected, including y' and index-0 error in tightly cropped images. % - Corrected bug with load file % - Corrected timing bug % - Edit classification GUI improved. % - put recalculate classification button and level spinner to the % right in order to avoid accidental engagement % - put confirmation dialog to recalculate classification. % - added option to use a different image just for the classification % purpose (button added, including confirmation dialog). % - added functionality to add true pixels instead of just removing % them. % - added undo option for add & remove pixels along path. % - added button to deal with RGB- colorblindness as an additional % color scheme. %