Skip to content
Snippets Groups Projects
Commit a0d9a157 authored by Lemmer, Jan's avatar Lemmer, Jan
Browse files

Improve all help comments

parent d76e6051
No related branches found
No related tags found
2 merge requests!62Introduce changes for V1.0 RC 1,!61Improve all help comments
Pipeline #654763 passed
......@@ -5,15 +5,15 @@ classdef userDLG
% This reduces messaging overhead and code length in PlotID.Publish()
properties
configError = false
scriptPublished = false
rdFilesPublished = false
figurePublished = false
msg = ''
configError = false % error state of reading the config
scriptPublished = false % error state of publishing the script
rdFilesPublished = false % error state of publishing the research data
figurePublished = false % error state of publishing the figure
msg = '' % message to the user
end
properties (SetAccess = protected)
success = false
success = false % product of all states
showMessages {mustBeNumericOrLogical}
forcePublish {mustBeNumericOrLogical}
ID %plotID
......
function Publish(DataPaths,scriptPath, figure, options)
%%Publish(DataPaths,scriptPath, ID, figure, options) saves plot, data and measuring script
% Publish(DataPaths,scriptPath, ID, figure, options) saves plot, data and measuring script
%
% DataPaths contains the path(s) to the research data, for multiple files
% use a cell array or ONE struct of variables (only the first struct will
......
function [status, msg] = centralized(storPath, dataObj, folderName)
%centralized stores the research files in a centrelized folder. Linked
%files are created for subsequent folders (HDF5 only).
% CENTRALIZED stores the research files in a centrelized folder.
% Linked files are created for subsequent folders (HDF5 only).
%
% storPath for the Data
% dataObj contains tha data related information
% folderName is the Name of the storage Folder
msg = '';
warning(['Linked HDF5 can only be moved with their ',...
'respective master files in the ', dataObj.dataFolderName, ' folder.']);
......
function pList = copyUserFCN(scriptPath, folderName, storPath, ID)
% COPYUSERFCN copies all user functions, classes and toolboxes that are used
%by the base script (scriptpath).
% by a script (scriptpath).
%
% All toolboxes and classes are copied as a whole.
% folderName, storPath and ID are required for createfilecopy
% see also createFileCopy
[fList,pList] = matlab.codetools.requiredFilesAndProducts(scriptPath);
fList = fList(~ismember(fList,scriptPath)); % rmv plot script itself from list
fList = fList(~contains(fList,'config.json')); % rmv config.json from list
......
function [storagePaths, status, msg] = createFileCopy(filePaths,folderName,storPath,ID,type)
% Creates a copy of the files (can be used for multiple paths in a cell array)
% createFileCopy Creates a copy of the files (can be used for multiple
% paths in a cell array)
%
% folderName is the name of the exporting folder
% returns the storage paths were files were stored
% type switches the mode depending on the data type
if ~iscell(filePaths)
%fixes Issue if filepath is a char and not a cell array
......
function [status] = createLinkedHDF5(SourceFile,TargetPath)
% createLinkedHDF5 creates a HDF file that references the Sourcefile
% TargetPath is the storage location, ID the foldername
% TargetPath is the storage location
% Status returns true if the function was successfull
plist_id = 'H5P_DEFAULT';
......
function [status, id] = fileCompare(filename,fileList)
%% fileCompare checks if file1 is (binary) identical to a file in filelist
% fileCompare checks if file1 is (binary) identical to a file in filelist
% it returns a status and the id of the identical file
%
% the functions uses the java libraries from matlab for windows systems
% or the unix function diff
% because of performance issues with windows system calls in matlab
% or the unix function diff because of performance issues with windows
% system calls in matlab
if isempty(fileList)
% no comparison necessary
......
function [IDf,PrjID, Str] = friendlyID(ID)
% FriendlyID Changes the Hex Number to a human friendly datetime and dateStr
%
% IDf ID as DateTime Object, PrjID returns the ProjectID, Str returns the
% timestamp as String
......
function img = plotQR(data, size)
%QR reads a QR code from qrserver (depends on API)
% created by J.Stifter
function img = plotQR(qrTxt, size)
% plotQR creates a QR code based on qrTxt by calling a qrserver (depends on
% API)
% size specifies the absolut size of the qr code (pixels)
% special thanks to J.Stifter for this suggestion
arguments
data {mustBeTextScalar} = 'example';
qrTxt {mustBeTextScalar} = 'example';
size (1,2) {mustBeInteger} = [150, 150];
end
......@@ -10,7 +13,7 @@ function img = plotQR(data, size)
n = size(2);
base_api = 'https://api.qrserver.com/v1/create-qr-code/?size=%dx%d&data=%s';
request = sprintf(base_api, m, n, data);
request = sprintf(base_api, m, n, qrTxt);
options = weboptions;
options.Timeout = 5;
......
......@@ -6,8 +6,6 @@ function replaceLinkedHDF5(linkedFilepath)
% Filepath is the location of the File that contains the link. The
% filepath to the linked data has to be present in the file itself.
%% Check whether the only Objects present are links
h5inf = h5info(linkedFilepath);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment