Skip to content

Commit

Permalink
see CHANGELOG
Browse files Browse the repository at this point in the history
  • Loading branch information
ThoHiller committed Feb 11, 2024
1 parent d792649 commit 9408835
Show file tree
Hide file tree
Showing 72 changed files with 6,175 additions and 4,505 deletions.
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# Changelog

## [0.2.1] - 2024-02-11

### Added
- Added uncertainty data do Excel export in **NUCLEUSinv**
- Added uncertainty calculation to batch mode in **NUCLEUSinv**
- Added a new flag to the *Extra* menu of **NUCLEUSinv** that allows to set all relaxation times < *TE/5* to zero when `lsqlin` is used for the RTD inversion

### Changed
- Changed the default settings for NMR signal calculation in **NUCLEUSmod** (more realistic echo time *TE* of 200µs and the first echo within the time vector is actually *TE* or *TE/2* and not 0)

### Fixed
- Fixed an issue when exporting data from *UncertView* GUI to **NUCLEUSinv** main GUI
- Re-factored a few of the uncertainty calculation functions
- More seamless integration of *UncertView* GUI

## [0.2.0] - 2024-02-01

### Added
Expand Down Expand Up @@ -200,6 +215,7 @@

Initial Version

[0.2.1]: https://github.com/ThoHiller/nmr-nucleus/compare/v.0.2.0...v.0.2.1
[0.2.0]: https://github.com/ThoHiller/nmr-nucleus/compare/v.0.1.14...v.0.2.0
[0.1.14]: https://github.com/ThoHiller/nmr-nucleus/compare/v.0.1.13...v.0.1.14
[0.1.13]: https://github.com/ThoHiller/nmr-nucleus/compare/v.0.1.12...v.0.1.13
Expand Down
4 changes: 2 additions & 2 deletions NUCLEUSinv/NUCLEUSinv.m
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
if ~isempty(h0); close(h0); end

%% GUI 'header' info and defaults
myui.version = '0.2.0';
myui.date = '01.02.2024';
myui.version = '0.2.1';
myui.date = '11.02.2024';
myui.author = {'Stephan Costabel','Thomas Hiller'};
myui.email = 'thomas.hiller[at]bgr.de';
myui.fontsize = 10;
Expand Down
25 changes: 15 additions & 10 deletions NUCLEUSinv/NUCLEUSinv_createMenus.m
Original file line number Diff line number Diff line change
Expand Up @@ -306,18 +306,18 @@
'Label','RTD','Enable','off','Callback',@onMenuViewFigures);
end

% 2.6 PhaseView
% 2.6 PhaseView GUI
gui.menu.extra_phaseview = uimenu(gui.menu.view,...
'Label','PhaseView GUI','Enable','off','Callback',@PhaseView);
% 2.7 ConductVIEW -> hydraulic conductivity
'Label','PhaseView GUI','Enable','off','Separator','on','Callback',@onMenuSubGUIs);
% 2.7 ConductVew GUI -> hydraulic conductivity
gui.menu.extra_conduct = uimenu(gui.menu.view,...
'Label','ConductView GUI','Enable','off','Callback',@onMenuViewFigures);
% 2.8 FixedTime VIEW
'Label','ConductView GUI','Enable','off','Callback',@onMenuSubGUIs);
% 2.8 FixedTimeView GUI
gui.menu.extra_fixedtime = uimenu(gui.menu.view,...
'Label','FixedTimeView GUI','Enable','off','Callback',@FixedTimeView);
% 2.9 Uncertainty VIEW
'Label','FixedTimeView GUI','Enable','off','Callback',@onMenuSubGUIs);
% 2.9 UncertaintyVIEW GUI
gui.menu.extra_uncert = uimenu(gui.menu.view,...
'Label','UncertView GUI','Enable','off','Callback',@UncertView);
'Label','UncertView GUI','Enable','off','Callback',@onMenuSubGUIs);

%% 3. Extras
gui.menu.extra = uimenu(gui.figh,...
Expand Down Expand Up @@ -353,7 +353,12 @@
gui.menu.extra_solver_lsqnonneg = uimenu(gui.menu.extra_solver,...
'Label','LSQNONNEG (default)','Checked','on','Callback',@onMenuSolver);

% 3.3 joint inversion (on/off)
% 3.3 flag for LSQLIN option to set RTs smaller than min(TE)/5 to 0
gui.menu.extra_lsqlin_echoflag = uimenu(gui.menu.extra,...
'Label','RTD<TE/5=0','Enable','off',...
'Callback',@onMenuExtraEchoFlag);

% 3.4 joint inversion (on/off)
gui.menu.extra_joint = uimenu(gui.menu.extra,...
'Label','Joint Inversion','Checked','off','Separator','on',...
'Callback',@onMenuJointInversion);
Expand All @@ -364,7 +369,7 @@
set(gui.menu.extra_joint,'Enable','off');
end

% 3.4 set inversion bounds for surface relaxivity rho
% 3.5 set inversion bounds for surface relaxivity rho
gui.menu.extra_joint_rhobounds = uimenu(gui.menu.extra,...
'Label','Surface relaxivity bounds','Enable','off',...
'Callback',@onMenuExtraRhoBounds);
Expand Down
2 changes: 2 additions & 0 deletions NUCLEUSinv/NUCLEUSinv_loadDefaults.m
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@
out.info.has_optim = 'off';
out.info.solver = 'lsqnonneg';
out.info.stat = 'off';
% LSQLIN Echo flag: RTDs<TE/5=0 (default is off)
out.info.EchoFlag = 'off';

%% process panel defaults
% first data sample of the signal
Expand Down
4 changes: 2 additions & 2 deletions NUCLEUSmod/NUCLEUSmod.m
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
if ~isempty(h0); close(h0); end

%% GUI 'header' info and defaults
myui.version = '0.2.0';
myui.date = '01.02.2024';
myui.version = '0.2.1';
myui.date = '11.02.2024';
myui.author = {'Stephan Costabel','Thomas Hiller'};
myui.email = 'thomas.hiller[at]bgr.de';
myui.fontsize = 10;
Expand Down
2 changes: 1 addition & 1 deletion NUCLEUSmod/NUCLEUSmod_createMenus.m
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
% 2.3 hydraulic conductivity
gui.menu.view_conduct = uimenu(gui.menu.view,...
'Label','ConductView GUI','Separator','on','Enable','off',...
'Callback',@onMenuViewFigures);
'Callback',@onMenuSubGUIs);

%% 3. Color theme
gui.menu.color_theme = uimenu(gui.figh,...
Expand Down
6 changes: 3 additions & 3 deletions NUCLEUSmod/NUCLEUSmod_loadDefaults.m
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@

%% NMR panel defaults
% echo time [µs]
out.nmr.TE = 1000;
out.nmr.TE = 200;
% number of echoes
out.nmr.echosN = 1001;
out.nmr.echosN = 1000;
% noise creation type 'level' or 'SNR'
out.nmr.noisetype = 'level';
% noise level [0:1] or SNR [-]
Expand All @@ -82,7 +82,7 @@
% diffusion relaxation time [s]
out.nmr.Tdiff = 1e6;
% surface relaxivity [µm/s]
out.nmr.rho = 10;
out.nmr.rho = 100;
% porosity value between 0 and 1 [-]
out.nmr.porosity = 1;
% plot T2 data as default
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
modeling and i**N**version of n**UCL**ear magnetic r**E**sonance data with ang**U**lar pore**S**

[![release](https://img.shields.io/github/release/NMR-NUCLEUS/nmr-nucleus.svg)](https://github.com/NMR-NUCLEUS/nmr-nucleus/releases/latest)
[![DOI](https://zenodo.org/badge/165993294.svg)](https://zenodo.org/badge/latestdoi/165993294)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.4022195.svg)](https://doi.org/10.5281/zenodo.4022195)
- - -

## Table of Contents
Expand Down Expand Up @@ -61,7 +61,7 @@ In order to work properly you need to meet the following requirements:
4. `findjobj` (get it from [FEX](https://de.mathworks.com/matlabcentral/fileexchange/14317-findjobj-find-java-handles-of-matlab-graphic-objects)) (<span style="color:red">required</span>)
5. `fminsearchbnd` (get it from [FEX](https://de.mathworks.com/matlabcentral/fileexchange/8277-fminsearchbnd-fminsearchcon)) (<span style="color:red">required</span>)
6. `dynamicDateTicks` (get it from [FEX](https://de.mathworks.com/matlabcentral/fileexchange/27075-intelligent-dynamic-date-ticks)) (<span style="color:green">optional</span>)
7. `kde` kernel density estimator (get it from [FEX](https://de.mathworks.com/matlabcentral/fileexchange/14034-kernel-density-estimator)) (<span style="color:green">optional</span>)
7. `kde` kernel density estimator (get it from [FEX](https://de.mathworks.com/matlabcentral/fileexchange/14034-kernel-density-estimator)) (<span style="color:green">optional; not needed for R2023b and newer</span>)

If you do not have the Optimization or Statistics toolboxes then not all features are available (especially parts of the joint inversion). However, the general functionality of obtaining relaxation time distributions (RTDs) form NMR relaxometry data is of course working.

Expand Down Expand Up @@ -123,7 +123,7 @@ In no particular order and without guarantee that it will ever happen :-) :
## Cite as
If you use NUCLEUS for your research, please cite it as:

Thomas Hiller. (2024, Feb 01). ThoHiller/nmr-nucleus: v0.2.0 (Version v0.2.0). Zenodo. [https://doi.org/10.5281/zenodo.4022195]
Thomas Hiller. (2024, Feb 11). ThoHiller/nmr-nucleus: v0.2.1 (Version v0.2.1). Zenodo. [https://doi.org/10.5281/zenodo.4022195]

Note: Even though the version number might change due to updates, this DOI is permanent (represents all versions) and always links to the latest version.

Expand Down
9 changes: 8 additions & 1 deletion callbacks/listboxes/onListboxData.m
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ function onListboxData(src,~)
data_upd.pressure = data.pressure;
data = data_upd;

% if "mono" or "free" inversion is chossen update the internal
% if "mono" or "free" inversion is chosen update the internal
% fixed relaxation times field
if strcmp(data.invstd.invtype,'mono') ||...
strcmp(data.invstd.invtype,'free')
Expand Down Expand Up @@ -120,6 +120,9 @@ function onListboxData(src,~)

% take all echoes
data.process.end = length(data.import.NMR.data{id}.signal);

% set default number of uncertainty runs
data.uncert.N = 10;

% ---
% special treatments
Expand Down Expand Up @@ -204,6 +207,10 @@ function onListboxData(src,~)
if ~isempty(findobj('Tag','FIXEDTIMEVIEW'))
FixedTimeView(gui.menu.extra_fixedtime);
end
% if the UncertView window is open update it
if ~isempty(findobj('Tag','UNCERTVIEW'))
UncertView(gui.menu.extra_uncert);
end
else
helpdlg({'onListboxData:','Only choose one data set at a time.'},...
'too many data');
Expand Down
87 changes: 87 additions & 0 deletions callbacks/menus/onMenuExtraEchoFlag.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
function onMenuExtraEchoFlag(src,~)
%onMenuExtraEchoFlag handles the call from the menu that swicth the "EchoFlag"
%
% Syntax:
% onMenuExtraEchoFlag
%
% Inputs:
% src - handle of the calling object
%
% Outputs:
% none
%
% Example:
% onMenuExtraEchoFlag(src,~)
%
% Other m-files required:
% NUCLEUSinv_updateInterface
% updateStatusInformation
%
% Subfunctions:
% none
%
% MAT-files required:
% none
%
% See also: NUCLEUSinv
% Author: see AUTHORS.md
% email: see AUTHORS.md
% License: MIT License (at end)

%------------- BEGIN CODE --------------

%% get GUI handle and data
fig = findobj('Tag','INV');
gui = getappdata(fig,'gui');
data = getappdata(fig,'data');

% on / off switch
onoff = get(src,'Checked');

% deactivate or activate the "EchoFlag"
switch onoff
case 'on' % if it's on, switch it off
data.info.EchoFlag = 'off';
% menu entry
set(gui.menu.extra_lsqlin_echoflag,'Checked','off');
case 'off' % if it's off, switch it on
data.info.EchoFlag = 'on';
% menu entry
set(gui.menu.extra_lsqlin_echoflag,'Checked','on');
end

% update GUI data
setappdata(fig,'data',data);
setappdata(fig,'gui',gui);
% update interface
NUCLEUSinv_updateInterface;
% update status information
updateStatusInformation(fig);
updateToolTips;

end

%------------- END OF CODE --------------

%% License:
% MIT License
%
% Copyright (c) 2019 Thomas Hiller
%
% Permission is hereby granted, free of charge, to any person obtaining a copy
% of this software and associated documentation files (the "Software"), to deal
% in the Software without restriction, including without limitation the rights
% to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
% copies of the Software, and to permit persons to whom the Software is
% furnished to do so, subject to the following conditions:
%
% The above copyright notice and this permission notice shall be included in all
% copies or substantial portions of the Software.
%
% THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
% IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
% FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
% AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
% LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
% OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
% SOFTWARE.
6 changes: 4 additions & 2 deletions callbacks/menus/onMenuSolver.m
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,16 @@ function onMenuSolver(src,~)
% menu entry
set(gui.menu.extra_solver_lsqlin,'Checked','on');
set(gui.menu.extra_solver_lsqnonneg,'Checked','off');
% update the tooltips

set(gui.menu.extra_lsqlin_echoflag,'Enable','on');

elseif strfind(solver,'LSQNONNEG')
data.info.solver = 'lsqnonneg';
% menu entry
set(gui.menu.extra_solver_lsqlin,'Checked','off');
set(gui.menu.extra_solver_lsqnonneg,'Checked','on');

set(gui.menu.extra_lsqlin_echoflag,'Enable','off');
end

% update GUI data
Expand Down
Loading

0 comments on commit 9408835

Please sign in to comment.