From ae012aaf725844e265bce2a234f60ca102f5e4ae Mon Sep 17 00:00:00 2001 From: Jan Lemmer <jan.lemmer@fst.tu-darmstadt.de> Date: Tue, 24 Aug 2021 07:39:40 +0200 Subject: [PATCH] Correct some spelling, Add some comments --- example.m | 14 ++++++-------- fcn_core/CreateID.m | 5 +++-- fcn_core/Publish.m | 14 +++++++------- fcn_core/TagPlot.m | 2 +- 4 files changed, 17 insertions(+), 18 deletions(-) diff --git a/example.m b/example.m index f208097..6e03db9 100644 --- a/example.m +++ b/example.m @@ -44,6 +44,11 @@ h5create(fpath, "/y1", size(y1), "Datatype", class(y1)) h5write(fpath, "/x1", x1) h5write(fpath, "/y1", y1) +%% function calls +% Place for post-processing of the data, or additional related code. +a = 1; +% example_fcn is a dummy function to show the functionality +a = example_fcn(a); %% Plotting % This is still part of a normal script to produce plots. @@ -60,16 +65,10 @@ set(gca, 'TickDir', 'out', 'YLim', [0,4]); %% Tag the plot % PlotID Implementation starts here. - +% TagPlot adds a visible ID to the figure and to the property fig.Tag [figs, ID] = TagPlot(fig, ProjectID); - -%% call a dummy function -% Place for post-processing of the plot, or additional related code. -a=1; -a = example_fcn(a); - %% Publishing % Second part of plotID % The functions needs the file location, the location of the data and the @@ -83,7 +82,6 @@ path.rdata = {dataset1,dataset2} ; % don't forget the extension Publish(path, ID, figs, 'Location', 'local','Method','centraliced') %% Second Plot with identical data to test centralized method -% fig2 =figure; plot(x,y,'-k'); diff --git a/fcn_core/CreateID.m b/fcn_core/CreateID.m index 42ec2b2..216e91a 100644 --- a/fcn_core/CreateID.m +++ b/fcn_core/CreateID.m @@ -1,5 +1,5 @@ function [ID] = CreateID(method) -%CreateID Creates an Identifier (char) +%CreateID Creates an identifier (char) % Creates an (sometimes unique) identifier based on the selected method % if no method is selected method 1 will be the default method arguments @@ -13,7 +13,8 @@ switch method pause(0.5); %Pausing for unique IDs case 2 % random UUID from Java 128 bit %Static factory to retrieve a type 4 (pseudo randomly generated) UUID. - % The UUID is generated using a cryptographically strong pseudo random number generator. + % The UUID is generated using a cryptographically strong pseudo + % random number generator. temp = java.util.UUID.randomUUID; ID = temp.toString; otherwise diff --git a/fcn_core/Publish.m b/fcn_core/Publish.m index e6952d7..cc81290 100644 --- a/fcn_core/Publish.m +++ b/fcn_core/Publish.m @@ -1,11 +1,11 @@ function Publish(DataPaths, ID, figures, options) -%Publishes Saves Plot, Data and Measuring script -% Detailed explanation goes here -% Location sets the storage location. local is in the current folder (an -% export folder will be created), server is a remote Path -% two Methods are implemented individual stores the data for each plot -% while centralized uses a data folder and uses reference links to the -% original data +%Publishes saves plot, data and measuring script +% Location sets the storage location. 'local' sets the storage location +% to the current folder (an export folder will be created), 'server' is a +% remote path. +% Two Methods are implemented 'individual' stores the data for +% each plot while 'centralized' uses a data folder and uses reference links +% to the original data (hdf5 only). arguments DataPaths diff --git a/fcn_core/TagPlot.m b/fcn_core/TagPlot.m index 4fac128..b64d3d4 100644 --- a/fcn_core/TagPlot.m +++ b/fcn_core/TagPlot.m @@ -1,6 +1,6 @@ function [figs, ID] = TagPlot(figs, prefix, options) %TagPlot adds IDs to figures -% The ID is placed visual on the figure window and as Tag (Property of figure) +% The ID is placed visual on the figure window and as Tag (property of figure) % TagPlot can tag multiple figures at once % prefix is the project number (string or char) % -- GitLab