Skip to content

Commit

Permalink
consolidate easyspindoc, easyspininfo, easyspincompile in one functio…
Browse files Browse the repository at this point in the history
…n easyspin
  • Loading branch information
stestoll committed Sep 6, 2022
1 parent a7a3f33 commit c39584d
Show file tree
Hide file tree
Showing 19 changed files with 277 additions and 460 deletions.
21 changes: 6 additions & 15 deletions docsrc/easyspin.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<link rel="stylesheet" href="highlight/matlab.css">
<script src="highlight/highlight.pack.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
<title>easyspincompile</title>
<title>easyspin</title>
</head>

<body>
Expand Down Expand Up @@ -47,32 +47,23 @@
<div class="subtitle">Description</div>

<p>
<code>easyspin info</code>> displays information about your current EasySpin installation. See <a class="esf" href="easyspininfo.html">easyspininfo</a>.
<code>easyspin info</code> displays information about the current EasySpin installation, including release number, release date and installation folder. In addition, it checks for potential name conflicts between EasySpin functions and other functions on the MATLAB path.
</p>

<p>
<code>easyspin doc</code>> opens the documentation of your current EasySpin installation. See <a class="esf" href="easyspindoc.html">easyspininfo</a>.
<code>easyspin doc</code> opens the documentation of your current EasySpin installation.
</p>

<p>
<code>easyspin compile</code>> compiles the C files of your current EasySpin installation using <code>mex</code>. See <a class="esf" href="easyspincompile.html">easyspincompile</a>.
<code>easyspin compile</code> compiles all the *.c files of your current EasySpin installation using <code>mex</code>. If the <code>mex</code> system in Matlab is not set up, set it up first with <code>mex -setup</code>.
</p>

<p>
<code>easyspin ?</code>> displays al possible options for <code>easyspin</code>.
<code>easyspin ?</code> displays al possible options for <code>easyspin</code>.
</p>

<p>
<code>easyspin</code>> is equivalent to <code>easyspin info</code>.
</p>

<!-- ====================================================== -->
<div class="subtitle">See also</div>

<p>
<a class="esf" href="easyspincompile.html">easyspincompile</a>,
<a class="esf" href="easyspindoc.html">easyspindoc</a>,
<a class="esf" href="easyspininfo.html">easyspininfo</a>
<code>easyspin</code> is equivalent to <code>easyspin info</code>.
</p>

<hr>
Expand Down
72 changes: 0 additions & 72 deletions docsrc/easyspincompile.html

This file was deleted.

64 changes: 0 additions & 64 deletions docsrc/easyspindoc.html

This file was deleted.

71 changes: 0 additions & 71 deletions docsrc/easyspininfo.html

This file was deleted.

4 changes: 1 addition & 3 deletions docsrc/funcsalphabet.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,7 @@
<tr><td><a href="deriv.html">deriv</a></td><td>Numerical differentiation</td></tr>
<tr><td><a href="dipkernel.html">dipkernel</a></td><td>Dipolar EPR signal (DEER)</td></tr>
<tr><td><a href="diptensor.html">diptensor</a></td><td>Dipolar tensors</td></tr>
<tr><td><a href="easyspincompile.html">easyspincompile</a></td><td>Compile EasySpin</td></tr>
<tr><td><a href="easyspindoc.html">easyspindoc</a></td><td>Access EasySpin documentation</td></tr>
<tr><td><a href="easyspininfo.html">easyspininfo</a></td><td>Information about EasySpin installation</td></tr>
<tr><td><a href="easyspin.html">easyspin</a></td><td>Information and tasks regarding EasySpin</td></tr>
<tr><td><a href="echarge.html">echarge</a></td><td>Elementary electric charge</td></tr>
<tr><td><a href="eeint.html">eeint</a></td><td>Electron-electron interaction Hamiltonian</td></tr>
<tr><td><a href="eigfields.html">eigfields</a></td><td>Resonance fields using eigenfield equation</td></tr>
Expand Down
3 changes: 0 additions & 3 deletions docsrc/funcscategory.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@
<tr><td colspan="2" class="grouptitle">General</td></tr>

<tr><td><a href="easyspin.html">easyspin</a></td><td>Information and tasks relating to the EasySpin installation</td></tr>
<tr><td><a href="easyspindoc.html">easyspindoc</a></td><td>Access EasySpin documentation</td></tr>
<tr><td><a href="easyspininfo.html">easyspininfo</a></td><td>Information about EasySpin installation</td></tr>
<tr><td><a href="easyspincompile.html">easyspincompile</a></td><td>Compile EasySpin</td></tr>

<tr><td>&nbsp;</td></tr>
<tr><td colspan="2" class="grouptitle">Data import and export</td></tr>
Expand Down
2 changes: 1 addition & 1 deletion docsrc/installation.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
In MATLAB, type <code>easyspin</code> at the command prompt. This will display information about the installed version of EasySpin. Also, it might try to compile a few files from the <code>easyspin/private</code> folder. Possibly you are asked to select or install a C compiler. See below for information on how to proceed in that case.

<li><b>Documentation</b><br>
There are several ways to access the documentation. To view the documentation of your local EasySpin installation, type <code>easyspindoc</code> or <code>easyspin doc</code> in the command window, or point your web browser to <code>documentation/index.html</code> in your <i>EasySpin</i> folder and bookmark that page. Alternatively, you can go to <a href="easyspin.org">easyspin.org</a> to view the online documentation of the most recent version of EasySpin (which might be different from the one you installed locally).
There are several ways to access the documentation. To view the documentation of your local EasySpin installation, type <code>easyspin doc</code> in the command window, or point your web browser to <code>documentation/index.html</code> in your <i>EasySpin</i> folder and bookmark that page. Alternatively, you can go to <a href="easyspin.org">easyspin.org</a> to view the online documentation of the most recent stable version of EasySpin (which might be different from the one you installed locally).
</ol>

<div class="subtitle">Compiling mex files</div>
Expand Down
3 changes: 2 additions & 1 deletion docsrc/releases.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ <h1>Changes from release to release</h1>
<li>Photoselection is now supported when simulating EPR spectra of photo-generated species. See function <a class="esf" href="photoselect.html">photoselect</a>.</li>
<li>Significantly extended support for spin-polarized systems (triplets, radical pairs, etc.) in <a class="esf" href="pepper.html">pepper</a> with the new fields <a class="matlab">Sys.initState</a>.</li>
<li><a class="esf" href="cgmatrix.html">cgmatrix</a> has additional input and output options.</li>
<li>Access the EasySpin documentation directly with <a class="esf" href="easyspindoc.html">easyspindoc</a> and <a class="esf" href="easyspin.html">easyspin doc</a>.</li>
<li>The command <a class="esf" href="easyspin.html">easyspin</a> is new. Call <code>easyspin doc</code> to see the documentation. Call <code>easyspin info</code> to display information about the currently installed EasySpin version. Call <code>easyspin compile</code> to complie the C files contained in EasySpin.</li>
</ul>

<p>Major bug fixes</p>
Expand All @@ -82,6 +82,7 @@ <h1>Changes from release to release</h1>
<li><a class="esf" href="sphgrid.html">sphgrid</a> now returns angles, vectors, and weights together in a structure.</li>
<li>The function <code>sphtri</code> has been removed; it's functionality is now incorporated into <a class="esf" href="sphgrid.html">sphgrid</a>.</li>
<li>The option name to specify powder averages has changed. Instead of <code>Opt.nKnots</code>, use the new field <code>Opt.GridSize</code>.</li>
<li><code>easyspininfo</code> and <code>easyspincompile</code> are no longer supported. Use <code>easyspin info</code> and <code>easyspin compile</code> instead. See help for the <a class="esf" href="easyspin.htlm">easyspin</a> command.</li>
<li>The oldest supported Matlab version is now R2016b.
</ul>

Expand Down
27 changes: 22 additions & 5 deletions easyspin/easyspin.m
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,42 @@
%
% If no parameter is given, 'info' is used by default.

function easyspin(str)
function varargout = easyspin(str)

if nargin==0
str = 'info';
end

switch str

case '?'
dips(' easyspin info Display information about EasySpin');
disp(' easyspin info Display information about EasySpin');
disp(' easyspin doc Display EasySpin documentation');
disp(' easyspin compile Compile MEX files for EasySpin');
varargout = {};

case 'info'
easyspininfo;
if nargout==0
easyspin_info;
else
out = easyspin_info;
varargout = {out};
end

case 'doc'
easyspindoc;
if nargout==0
easyspin_doc;
else
out = easyspin_doc;
varargout = {out};
end

case 'compile'
easyspincompile;
easyspin_compile;

otherwise
error('Unknown option ''%s''.',str);

end

end
4 changes: 2 additions & 2 deletions easyspin/easyspinupdate.m
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function easyspinupdate(OnlineVersion)
end

if all(isstrprop(OnlineVersion,'alpha'))
InstalledVersion = easyspininfo;
InstalledVersion = easyspin('info');
UpdateOpt.Branch = OnlineVersion;
UpdateOpt.Silent = true;
[~, OnlineVersion] = easyspinversioncheck(InstalledVersion,UpdateOpt);
Expand Down Expand Up @@ -61,7 +61,7 @@ function easyspinupdate(OnlineVersion)
VersionToGet = OnlineVersion;

% Determine installation path of currently installed EasySpin
InstalledVersion = easyspininfo;
InstalledVersion = easyspin('info');
InstallationPath = InstalledVersion.Path;

% The installation target is two directories above the easyspin functions:
Expand Down
8 changes: 4 additions & 4 deletions easyspin/easyspinversioncheck.m
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
%
% Input:
% InstallInfo structure, get it by running:
% InstallInfo = easyspininfo
% InstallInfo = easyspin('info')
% .ReleaseChannel release channel of current installation
% .Version EasySpin version
% .Path Installation path
Expand Down Expand Up @@ -88,8 +88,8 @@
% Computer is online, continue by processing info of installed version
%--------------------------------------------------------------
if nargin == 0
% get version from easyspininfo if called without input argument
VersionInfo = easyspininfo;
% get version if called without input argument
VersionInfo = easyspin_info;
end

if nargin == 2 && isfield(Opt,'Branch')
Expand All @@ -102,7 +102,7 @@

% stop looking for an update if EasySpin is on source control
if strcmp(ReleaseChannel,'$ReleaseChannel$')
msg = 'Your EasySpin installation appears to be on version control, use your source control tool to check for a newer version.';
msg = 'Your EasySpin installation appears to be on version control. Use your source control tool to check for a newer version.';
if messages; disp(msg); end
if nargout > 0
varargout = {false []};
Expand Down

0 comments on commit c39584d

Please sign in to comment.