diff --git a/.gitignore b/.gitignore
index 43a033e..a3774a7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,3 +4,4 @@
*.log
*.toc
*.sty
+/old_functions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index c4a1ab0..530ec39 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,22 @@
# Changelog
+## [0.1.12] - latest
+
+### Added
+- New *SNR*-option in **NUCLEUSmod** to set the noise of the forward modelled NMR data either by noise level or signal-to-noise ratio (SNR)
+- New *Multi modal* fitting option in **NUCLEUSinv** (only in Expert mode) with built-in uncertainty estimation for the final RTD
+- New import routines to **NUCLEUSinv** for *BGR* devices (*Mouse* and *Helios*)
+- Difussion relaxation time *Tdiff* is now considered in **NUCLEUSmod** (*NMR* panel) and **NUCLEUSinv** (*Petro Parameter* panel)
+- Added an `AUTHORS.md` file to the repository.
+
+### Changed
+- Changed the default export path and file name for graphics files in **NUCLEUSinv** to the current import path and data file
+- Changed the visualization of the imaginary part of the raw data (if available)
+- Minor internal changes
+
+### Fixed
+- Fixed an issue regarding the import of T1 data without noise (noise is now estimated on-the-fly via a fit with five free exponents)
+
## [0.1.11] - 2021-03-12
### Added
@@ -75,13 +92,13 @@
## [0.1.6] - 2019-06-24
### Added
-- Added a new *PhaseView* subGUI to view and change the phase between real and imaginary part of a T2 signal. **NUCLEUSinv**
+- Added a new *PhaseView* subGUI to view and change the phase between real and imaginary part of a T2 signal. **NUCLEUSinv**
- Added a new import filter for the BAM NMR tomograph. **NUCLEUSinv**
-- Added an export feature that allows to save T2 raw data into a csv-file (e.g. LIAG format); during save it is possible to overwrite the imaginary part with zeros. **NUCLEUSinv**
+- Added an export feature that allows to save T2 raw data into a csv-file (e.g. LIAG format); during save it is possible to overwrite the imaginary part with zeros. **NUCLEUSinv**
### Changed
-- If a T2 signal is imported it is automatically rotated to minimize its imaginary part (the fit incorporates real and imag. part of the signal). **NUCLEUSinv**
+- If a T2 signal is imported it is automatically rotated to minimize its imaginary part (the fit incorporates real and imag. part of the signal). **NUCLEUSinv**
- The *FitStatistics* window layout is now in line with the *PhaseView* layout for consistency reasons. **NUCLEUSinv**
### Fixed
@@ -115,7 +132,7 @@
- Due to the new error weights there is no default gating method anymore for the *free exp. inversion*. **NUCLEUSinv**
### Fixed
-- T1 inversion recovery factor (1 or 2 depending on inversion or saturation recovery) was missing in *free exp. inversion* and *free joint inversion* (in Jacobian calculation for angular pores). **NUCLEUSinv**
+- T1 inversion recovery factor (1 or 2 depending on inversion or saturation recovery) was missing in *free exp. inversion* and *free joint inversion* (in Jacobian calculation for angular pores). **NUCLEUSinv**
## [0.1.3] - 2019-02-22
@@ -154,6 +171,7 @@
Initial Version
+[0.1.12]: https://github.com/ThoHiller/nmr-nucleus/compare/v.0.1.11...v.0.1.12
[0.1.11]: https://github.com/ThoHiller/nmr-nucleus/compare/v.0.1.10...v.0.1.11
[0.1.10]: https://github.com/ThoHiller/nmr-nucleus/compare/v.0.1.9...v.0.1.10
[0.1.9]: https://github.com/ThoHiller/nmr-nucleus/compare/v.0.1.8...v.0.1.9
diff --git a/NUCLEUSinv/NUCLEUSinv.m b/NUCLEUSinv/NUCLEUSinv.m
index 0fbefb4..b3f772e 100644
--- a/NUCLEUSinv/NUCLEUSinv.m
+++ b/NUCLEUSinv/NUCLEUSinv.m
@@ -27,8 +27,8 @@
% none
%
% See also NUCLEUSmod
-% Author: Thomas Hiller
-% email: thomas.hiller[at]leibniz-liag.de
+% Author: see AUTHORS.md
+% email: see AUTHORS.md
% License: MIT License (at end)
%------------- BEGIN CODE --------------
@@ -38,10 +38,10 @@
if ~isempty(h0); close(h0); end
%% GUI 'header' info and defaults
-myui.version = '0.1.11';
-myui.date = '12.03.2021';
-myui.author = {'Thomas Hiller','Stephan Costabel'};
-myui.email = 'thomas.hiller[at]leibniz-liag.de';
+myui.version = '0.1.12';
+myui.date = '17.02.2022';
+myui.author = {'Stephan Costabel','Thomas Hiller'};
+myui.email = 'thomas.hiller[at]bgr.de';
myui.fontsize = 10;
myui.inifile = 'NUCLEUSinv.ini';
diff --git a/NUCLEUSinv/NUCLEUSinv_createGUI.m b/NUCLEUSinv/NUCLEUSinv_createGUI.m
index 8f1407f..dfd6bca 100644
--- a/NUCLEUSinv/NUCLEUSinv_createGUI.m
+++ b/NUCLEUSinv/NUCLEUSinv_createGUI.m
@@ -36,8 +36,8 @@ function NUCLEUSinv_createGUI(h,wbon)
% none
%
% See also: NUCLEUSinv
-% Author: Thomas Hiller
-% email: thomas.hiller[at]leibniz-liag.de
+% Author: see AUTHORS.md
+% email: see AUTHORS.md
% License: MIT License (at end)
%------------- BEGIN CODE --------------
@@ -118,7 +118,7 @@ function NUCLEUSinv_createGUI(h,wbon)
'TitleColor',myui.colors.BoxCPS,'ForegroundColor',myui.colors.BoxTitle);
% adjust the heights of all left-column-panels
-myui.heights = [250 22 22 22 22; -1 109 137 190 299];
+myui.heights = [250 22 22 22 22; -1 109 165 190 299];
% panel header is always 22 high
set(gui.panels.main,'Heights',myui.heights(2,:),...
'MinimumHeights',[250 22 22 22 22]);
@@ -199,7 +199,7 @@ function NUCLEUSinv_createGUI(h,wbon)
% otherwise "fixAxes" throws an error (in NUCLEUSmod); strangely here it
% also works without it, but I put it for consistency reasons
setappdata(h,'gui',gui);
-% changeColorTheme('INV',myui.colors.theme);
+changeColorTheme('INV',myui.colors.theme);
set(gui.main,'Visible','on');
%% enable all menus
diff --git a/NUCLEUSinv/NUCLEUSinv_createMenus.m b/NUCLEUSinv/NUCLEUSinv_createMenus.m
index a58b965..a89cb8a 100644
--- a/NUCLEUSinv/NUCLEUSinv_createMenus.m
+++ b/NUCLEUSinv/NUCLEUSinv_createMenus.m
@@ -24,8 +24,8 @@
% none
%
% See also: NUCLEUSinv
-% Author: Thomas Hiller
-% email: thomas.hiller[at]leibniz-liag.de
+% Author: see AUTHORS.md
+% email: see AUTHORS.md
% License: MIT License (at end)
%------------- BEGIN CODE --------------
@@ -61,12 +61,23 @@
% 1.1.1.2.1 BGR std
gui.menu.file_import_lab_bgr_std = uimenu(gui.menu.file_import_lab_bgr,...
'Label','BGR std','Tag','Lab','Callback',@onMenuImport);
-% 1.1.1.2.2 BGR org
-gui.menu.file_import_lab_bgr_org = uimenu(gui.menu.file_import_lab_bgr,...
- 'Label','BGR org','Tag','Lab','Callback',@onMenuImport);
-% 1.1.1.2.3 BGR mat
+% 1.1.1.2.2 BGR mat
gui.menu.file_import_lab_bgr_mat = uimenu(gui.menu.file_import_lab_bgr,...
'Label','BGR mat','Tag','Lab','Callback',@onMenuImport);
+% 1.1.1.2.3 Mouse CPMG data, single data subfolders from CPMG
+gui.menu.file_import_lab_bgr_mouse_cpmg = uimenu(gui.menu.file_import_lab_bgr,...
+ 'Label','MouseCPMG','Tag','Lab','Callback',@onMenuImport);
+% 1.1.1.2.4 Mouse plus Lift, single data subfolder from t1test,...
+% ...cpmgfastautotest, or (old Prospa Versions) cpmgfastauto
+gui.menu.file_import_lab_bgr_mouse_liftsingle = uimenu(gui.menu.file_import_lab_bgr,...
+ 'Label','MouseLiftSingle','Tag','Lab','Callback',@onMenuImport);
+% 1.1.1.2.5 Mouse plus Lift, all data subfolders from t1test,...
+% cpmgfastautotest, or (old Prospa Versions) cpmgfastauto
+gui.menu.file_import_lab_bgr_mouse_liftall = uimenu(gui.menu.file_import_lab_bgr,...
+ 'Label','MouseLiftAll','Tag','Lab','Callback',@onMenuImport);
+% 1.1.1.2.6 Helios
+gui.menu.file_import_lab_bgr_helios = uimenu(gui.menu.file_import_lab_bgr,...
+ 'Label','Helios','Tag','Lab','Callback',@onMenuImport);
% 1.1.1.3 LIAG
gui.menu.file_import_lab_liag = uimenu(gui.menu.file_import_lab,...
diff --git a/NUCLEUSinv/NUCLEUSinv_createPanelData.m b/NUCLEUSinv/NUCLEUSinv_createPanelData.m
index 0e751e5..d9af8c7 100644
--- a/NUCLEUSinv/NUCLEUSinv_createPanelData.m
+++ b/NUCLEUSinv/NUCLEUSinv_createPanelData.m
@@ -25,8 +25,8 @@
% none
%
% See also: NUCLEUSinv
-% Author: Thomas Hiller
-% email: thomas.hiller[at]leibniz-liag.de
+% Author: see AUTHORS.md
+% email: see AUTHORS.md
% License: MIT License (at end)
%------------- BEGIN CODE --------------
@@ -78,7 +78,7 @@
uimenu(gui.cm_handles.data_list_single,...
'Label','save','Tag','single','Callback',@onContextSignalList);
uimenu(gui.cm_handles.data_list_single,...
- 'Label','remove','Tag','single','Separator','on',...
+ 'Label','\remove','Tag','single','Separator','on',...
'Callback',@onContextSignalList);
uimenu(gui.cm_handles.data_list_single,...
'Label','use as calib.','Tag','single','Separator','on',...
diff --git a/NUCLEUSinv/NUCLEUSinv_createPanelInfo.m b/NUCLEUSinv/NUCLEUSinv_createPanelInfo.m
index a1757ce..e6cbf39 100644
--- a/NUCLEUSinv/NUCLEUSinv_createPanelInfo.m
+++ b/NUCLEUSinv/NUCLEUSinv_createPanelInfo.m
@@ -23,8 +23,8 @@
% none
%
% See also: NUCLEUSinv
-% Author: Thomas Hiller
-% email: thomas.hiller[at]leibniz-liag.de
+% Author: see AUTHORS.md
+% email: see AUTHORS.md
% License: MIT License (at end)
%------------- BEGIN CODE --------------
diff --git a/NUCLEUSinv/NUCLEUSinv_createPanelInversionJoint.m b/NUCLEUSinv/NUCLEUSinv_createPanelInversionJoint.m
index 5065213..3587bff 100644
--- a/NUCLEUSinv/NUCLEUSinv_createPanelInversionJoint.m
+++ b/NUCLEUSinv/NUCLEUSinv_createPanelInversionJoint.m
@@ -26,8 +26,8 @@
% none
%
% See also: NUCLEUSinv
-% Author: Thomas Hiller
-% email: thomas.hiller[at]leibniz-liag.de
+% Author: see AUTHORS.md
+% email: see AUTHORS.md
% License: MIT License (at end)
%------------- BEGIN CODE --------------
diff --git a/NUCLEUSinv/NUCLEUSinv_createPanelInversionStd.m b/NUCLEUSinv/NUCLEUSinv_createPanelInversionStd.m
index 408db21..e2dd4ef 100644
--- a/NUCLEUSinv/NUCLEUSinv_createPanelInversionStd.m
+++ b/NUCLEUSinv/NUCLEUSinv_createPanelInversionStd.m
@@ -26,8 +26,8 @@
% none
%
% See also: NUCLEUSinv
-% Author: Thomas Hiller
-% email: thomas.hiller[at]leibniz-liag.de
+% Author: see AUTHORS.md
+% email: see AUTHORS.md
% License: MIT License (at end)
%------------- BEGIN CODE --------------
@@ -62,10 +62,10 @@
switch data.info.ExpertMode
case 'on'
tstr = ' ';
- istring = {'Mono exp.','Several free exp. (2-5)','Multi exp. (LSQ)','Multi exp. (LU decomp.)'};
+ istring = {'Mono exp.','N free exp. (2-5)','Multi exp. (LSQ)','Multi exp. (LU decomp.)','Multi modal'};
case 'off'
tstr = ' ';
- istring = {'Mono exp.','Several free exp. (2-5)','Multi exp. (LSQ)'};
+ istring = {'Mono exp.','N free exp. (2-5)','Multi exp. (LSQ)'};
end
gui.popup_handles.invstd_InvType = uicontrol('Parent',gui.panels.invstd.HBox1,...
'Style','popup','String',istring,'FontSize',myui.fontsize,'Enable','off','Value',3,...
diff --git a/NUCLEUSinv/NUCLEUSinv_createPanelPetro.m b/NUCLEUSinv/NUCLEUSinv_createPanelPetro.m
index b8da803..c52f186 100644
--- a/NUCLEUSinv/NUCLEUSinv_createPanelPetro.m
+++ b/NUCLEUSinv/NUCLEUSinv_createPanelPetro.m
@@ -26,8 +26,8 @@
% none
%
% See also: NUCLEUSinv
-% Author: Thomas Hiller
-% email: thomas.hiller[at]leibniz-liag.de
+% Author: see AUTHORS.md
+% email: see AUTHORS.md
% License: MIT License (at end)
%------------- BEGIN CODE --------------
@@ -36,38 +36,65 @@
gui.panels.petro.VBox = uix.VBox('Parent',gui.panels.petro.main,...
'Spacing',3,'Padding',3);
-% Tbulk, surface relaxivity rho and geometry factor a
+% Tbulk and Tdiff
gui.panels.petro.HBox1 = uix.HBox('Parent',gui.panels.petro.VBox,...
'Spacing',3);
-% CBW and BVI
+% surface relaxivity rho and geometry factor a
gui.panels.petro.HBox2 = uix.HBox('Parent',gui.panels.petro.VBox,...
'Spacing',3);
-% calibration switch calib volume
+% CBW and BVI
gui.panels.petro.HBox3 = uix.HBox('Parent',gui.panels.petro.VBox,...
'Spacing',3);
-% sample volume, sample porosity
+% calibration switch calib volume
gui.panels.petro.HBox4 = uix.HBox('Parent',gui.panels.petro.VBox,...
'Spacing',3);
+% sample volume, sample porosity
+gui.panels.petro.HBox5 = uix.HBox('Parent',gui.panels.petro.VBox,...
+ 'Spacing',3);
-%% Tbulk, surface relaxivity rho and geometry factor a
+%% Tbulk and Tdiff
gui.text_handles.petro_Tbulk = uicontrol('Parent',gui.panels.petro.HBox1,...
'Style','text','FontSize',myui.fontsize,'HorizontalAlignment','center',...
- 'String',['Tbulk [s] | ',char(hex2dec('03C1')),' [µm/s] | geom']);
-tstr = 'Set the T bulk [s] value.
';
+ 'String','Tbulk [s] | Tdiff [s]');
+tstr = ['Bulk relaxation time in [s].
',...
+ '1/T = 1/Ts + 1/Tb + 1/Td
',...
+ 'Default value:
',...
+ '1e6 (so that 1/Tb is ignored)
'];
gui.edit_handles.invstd_Tbulk = uicontrol('Parent',gui.panels.petro.HBox1,...
'Style','edit','String',num2str(data.invstd.Tbulk),'FontSize',myui.fontsize,...
'UserData',struct('Tooltipstr',tstr,'defaults',[data.invstd.Tbulk 1 1]),...
'Tag','invstd_Tbulk','Enable','off','Callback',@onEditValue);
-tstr = ['Surface relaxivity rho in [m/s].
',...
- '1/T = rho*S/V = rho*a/R.
',...
+tstr = ['Diffusion relaxation time in [s].
',...
+ '1/T = 1/Ts + 1/Tb + 1/Td
',...
+ 'Td can be caluclated by
',...
+ 'Td = 12 / (D*(',char(hex2dec('03B3')),'*G*TE)2 )
',...
+ 'with
',...
+ 'D = diffusion coefficent of water
',...
+ char(hex2dec('03B3')),' = gyromagnetic ratio of hydrogen
',...
+ 'G = magnetic gradient
',...
+ 'TE = echo time
',...
+ 'Default value:
',...
+ '1e6 (so that 1/Td is ignored)
'];
+gui.edit_handles.invstd_Tdiff = uicontrol('Parent',gui.panels.petro.HBox1,...
+ 'Style','edit','String',num2str(data.invstd.Tdiff),'FontSize',myui.fontsize,...
+ 'UserData',struct('Tooltipstr',tstr,'defaults',[data.invstd.Tdiff 1 1]),...
+ 'Tag','invstd_Tdiff','Enable','off','Callback',@onEditValue);
+set(gui.panels.petro.HBox1,'Widths',[200 -1 -1]);
+
+%% surface relaxivity rho and geometry factor a
+gui.text_handles.petro_rho = uicontrol('Parent',gui.panels.petro.HBox2,...
+ 'Style','text','FontSize',myui.fontsize,'HorizontalAlignment','center',...
+ 'String',[char(hex2dec('03C1')),' [µm/s] | geom ']);
+tstr = ['Surface relaxivity in [µm/s].
',...
+ '1/Ts = rho*S/V = rho*a/R.
',...
'Default value:
',...
- '2.5e-5
'];
-gui.edit_handles.param_rho = uicontrol('Parent',gui.panels.petro.HBox1,...
+ '10
'];
+gui.edit_handles.param_rho = uicontrol('Parent',gui.panels.petro.HBox2,...
'Style','edit','String',num2str(data.param.rho),'FontSize',myui.fontsize,...
'UserData',struct('Tooltipstr',tstr,'defaults',[data.param.rho 1 1]),...
'Tag','param_rho','Enable','off','Callback',@onEditValue);
-tstr = ['Give the geometry factor "a" to convert relaxation times to pore radii
',...
- '1/T = rho*S/V = rho*a/R.
',...
+tstr = ['Geometry factor "a" to convert relaxation times to pore radii.
',...
+ '1/Ts = rho*S/V = rho*a/R.
',...
'Possible options:
',...
'2 capillaries with circular cross section
',...
'3 spheres
',...
@@ -77,17 +104,17 @@
'e.g. 2.72 is 90°-45°-45° | 2.87 is 90°-60°-30° | 5.64 is 90°-85°-5°
',...
'Default value:
',...
'2
'];
-gui.edit_handles.param_geom = uicontrol('Parent',gui.panels.petro.HBox1,...
+gui.edit_handles.param_geom = uicontrol('Parent',gui.panels.petro.HBox2,...
'Style','edit','String',num2str(data.param.a),'FontSize',myui.fontsize,...
'UserData',struct('Tooltipstr',tstr,'defaults',[data.param.a 1 1]),...
'Tag','param_a','Enable','off','Callback',@onEditValue);
-set(gui.panels.petro.HBox1,'Widths',[200 -1 -1 -1]);
+set(gui.panels.petro.HBox2,'Widths',[200 -1 -1]);
%% CBW and BVI
-gui.text_handles.petro_CBW = uicontrol('Parent',gui.panels.petro.HBox2,...
+gui.text_handles.petro_CBW = uicontrol('Parent',gui.panels.petro.HBox3,...
'Style','text','FontSize',myui.fontsize,'HorizontalAlignment','center',...
- 'String','CBW [ms] | BVI [ms]');
-tstr = ['Give cut-off time between CBW and BVI in [ms].',...
+ 'String','CBW [ms] | BVI [ms] ');
+tstr = ['Cut-off time between CBW and BVI in [ms].',...
' This value depends on lithology.
',...
'Abbreviations:
',...
'CBW clay bound water
',...
@@ -96,11 +123,11 @@
'The value is usually 3 [ms]
',...
'Default value:
',...
'3
'];
-gui.edit_handles.param_CBW = uicontrol('Parent',gui.panels.petro.HBox2,...
+gui.edit_handles.param_CBW = uicontrol('Parent',gui.panels.petro.HBox3,...
'Style','edit','String',num2str(data.param.CBWcutoff),'FontSize',myui.fontsize,...
'UserData',struct('Tooltipstr',tstr,'defaults',[data.param.CBWcutoff 1 1]),...
'Tag','param_CBWcutoff','Enable','off','Callback',@onEditValue);
-tstr = ['Give cut off time between BVI and BVM in [ms].',...
+tstr = ['Cut-off time between BVI and BVM in [ms].',...
' This value depends on lithology.
',...
'Abbreviations:
',...
'CBW clay bound water
',...
@@ -110,49 +137,51 @@
'For Carbonates the value is usually 92 [ms]
',...
'Default value:
',...
'33
'];
-gui.edit_handles.param_BVI = uicontrol('Parent',gui.panels.petro.HBox2,...
+gui.edit_handles.param_BVI = uicontrol('Parent',gui.panels.petro.HBox3,...
'Style','edit','String',num2str(data.param.BVIcutoff),'FontSize',myui.fontsize,...
'UserData',struct('Tooltipstr',tstr,'defaults',[data.param.BVIcutoff 1 1]),...
'Tag','param_BVIcutoff','Enable','off','Callback',@onEditValue);
-set(gui.panels.petro.HBox2,'Widths',[200 -1 -1]);
+set(gui.panels.petro.HBox3,'Widths',[200 -1 -1]);
%% calibration switch, calibration volume
-gui.text_handles.petro_calibVol = uicontrol('Parent',gui.panels.petro.HBox3,...
+gui.text_handles.petro_calibVol = uicontrol('Parent',gui.panels.petro.HBox4,...
'Style','text','FontSize',myui.fontsize,'HorizontalAlignment','center',...
- 'String','calib. Vol. | calib. Amp.');
+ 'String',' calib. Vol. | calib. Amp.');
tstr = '';
-gui.edit_handles.param_calibVol = uicontrol('Parent',gui.panels.petro.HBox3,...
+gui.edit_handles.param_calibVol = uicontrol('Parent',gui.panels.petro.HBox4,...
'Style','edit','String',num2str(data.param.calibVol),'FontSize',myui.fontsize,...
'UserData',struct('Tooltipstr',tstr,'defaults',[data.param.calibVol 1 1]),...
'Tag','param_calibVol','Enable','off','Callback',@onEditValue);
tstr = '';
-gui.edit_handles.param_calibAmp = uicontrol('Parent',gui.panels.petro.HBox3,...
+gui.edit_handles.param_calibAmp = uicontrol('Parent',gui.panels.petro.HBox4,...
'Style','edit','String',num2str(data.param.calibAmp),'FontSize',myui.fontsize,...
'UserData',struct('Tooltipstr',tstr,'defaults',[data.param.calibAmp 1 1]),...
'Tag','param_calibAmp','Enable','off','Callback',@onEditValue);
-set(gui.panels.petro.HBox3,'Widths',[200 -1 -1]);
+set(gui.panels.petro.HBox4,'Widths',[200 -1 -1]);
%% sample volume, porosity
-gui.text_handles.petro_sampVol = uicontrol('Parent',gui.panels.petro.HBox4,...
+gui.text_handles.petro_sampVol = uicontrol('Parent',gui.panels.petro.HBox5,...
'Style','text','FontSize',myui.fontsize,'HorizontalAlignment','center',...
- 'String','sample Vol. | porosity');
+ 'String','sample Vol. | porosity ');
tstr = ' ';
-gui.edit_handles.param_sampVol = uicontrol('Parent',gui.panels.petro.HBox4,...
+gui.edit_handles.param_sampVol = uicontrol('Parent',gui.panels.petro.HBox5,...
'Style','edit','String',num2str(data.param.sampVol),'FontSize',myui.fontsize,...
'UserData',struct('Tooltipstr',tstr,'defaults',[data.param.sampVol 1 1]),...
'Tag','param_sampVol','Enable','off','Callback',@onEditValue);
-tstr = ['Set porosity (between 0 and 1)
',...
+tstr = ['Porosity (between 0 and 1)
',...
'Default value:
',...
'1
'];
-gui.edit_handles.invstd_porosity = uicontrol('Parent',gui.panels.petro.HBox4,...
+gui.edit_handles.invstd_porosity = uicontrol('Parent',gui.panels.petro.HBox5,...
'Style','edit','String',num2str(data.invstd.porosity),'FontSize',myui.fontsize,...
'UserData',struct('Tooltipstr',tstr,'defaults',[data.invstd.porosity 1 1]),...
'Tag','invstd_porosity','Enable','off','Callback',@onEditValue);
-set(gui.panels.petro.HBox4,'Widths',[200 -1 -1]);
+set(gui.panels.petro.HBox5,'Widths',[200 -1 -1]);
%% Java Hack to adjust vertical alignment of text fields
jh = findjobj(gui.text_handles.petro_Tbulk);
jh.setVerticalAlignment(javax.swing.JLabel.CENTER);
+jh = findjobj(gui.text_handles.petro_rho);
+jh.setVerticalAlignment(javax.swing.JLabel.CENTER);
jh = findjobj(gui.text_handles.petro_CBW);
jh.setVerticalAlignment(javax.swing.JLabel.CENTER);
jh = findjobj(gui.text_handles.petro_calibVol);
diff --git a/NUCLEUSinv/NUCLEUSinv_createPanelPlots.m b/NUCLEUSinv/NUCLEUSinv_createPanelPlots.m
index fe4cf01..f91d292 100644
--- a/NUCLEUSinv/NUCLEUSinv_createPanelPlots.m
+++ b/NUCLEUSinv/NUCLEUSinv_createPanelPlots.m
@@ -26,8 +26,8 @@
% none
%
% See also: NUCLEUSinv
-% Author: Thomas Hiller
-% email: thomas.hiller[at]leibniz-liag.de
+% Author: see AUTHORS.md
+% email: see AUTHORS.md
% License: MIT License (at end)
%------------- BEGIN CODE --------------
diff --git a/NUCLEUSinv/NUCLEUSinv_createPanelProcess.m b/NUCLEUSinv/NUCLEUSinv_createPanelProcess.m
index 3d19158..439d8b3 100644
--- a/NUCLEUSinv/NUCLEUSinv_createPanelProcess.m
+++ b/NUCLEUSinv/NUCLEUSinv_createPanelProcess.m
@@ -26,8 +26,8 @@
% none
%
% See also: NUCLEUSinv
-% Author: Thomas Hiller
-% email: thomas.hiller[at]leibniz-liag.de
+% Author: see AUTHORS.md
+% email: see AUTHORS.md
% License: MIT License (at end)
%------------- BEGIN CODE --------------
diff --git a/NUCLEUSinv/NUCLEUSinv_createStatusbar.m b/NUCLEUSinv/NUCLEUSinv_createStatusbar.m
index b2d0a0a..a4055e4 100644
--- a/NUCLEUSinv/NUCLEUSinv_createStatusbar.m
+++ b/NUCLEUSinv/NUCLEUSinv_createStatusbar.m
@@ -24,8 +24,8 @@
%
% See also: NUCLEUSinv
-% Author: Thomas Hiller
-% email: thomas.hiller[at]leibniz-liag.de
+% Author: see AUTHORS.md
+% email: see AUTHORS.md
%------------- BEGIN CODE --------------
diff --git a/NUCLEUSinv/NUCLEUSinv_loadDefaults.m b/NUCLEUSinv/NUCLEUSinv_loadDefaults.m
index 7aa925d..5e3985b 100644
--- a/NUCLEUSinv/NUCLEUSinv_loadDefaults.m
+++ b/NUCLEUSinv/NUCLEUSinv_loadDefaults.m
@@ -23,8 +23,8 @@
% none
%
% See also: NUCLEUSinv
-% Author: Thomas Hiller
-% email: thomas.hiller[at]leibniz-liag.de
+% Author: see AUTHORS.md
+% email: see AUTHORS.md
% License: MIT License (at end)
%------------- BEGIN CODE --------------
@@ -127,9 +127,18 @@
out.invstd.noise = 0;
% water bulk relaxation time [s]
out.invstd.Tbulk = 1e6;
+% diffusion relaxation time [s]
+out.invstd.Tdiff = 1e6;
% porosity value between 0 and 1 [-]
out.invstd.porosity = 1;
+out.invstd.useUncert = 1;
+out.invstd.uncertMethod = 'thresh';
+out.invstd.uncertThresh = 0.05;
+out.invstd.uncertChi2 = 0.005;
+out.invstd.uncertN = 100;
+out.invstd.uncertMax = 1e4;
+
%% joint inversion panel defaults
% joint inversion methods to choose 'free' | 'fixed' | 'shape'
out.invjoint.invtype = 'free';
diff --git a/NUCLEUSinv/NUCLEUSinv_processINI.m b/NUCLEUSinv/NUCLEUSinv_processINI.m
index a5c939e..937542a 100644
--- a/NUCLEUSinv/NUCLEUSinv_processINI.m
+++ b/NUCLEUSinv/NUCLEUSinv_processINI.m
@@ -23,8 +23,8 @@
% none
%
% See also: NUCLEUSinv
-% Author: Thomas Hiller
-% email: thomas.hiller[at]leibniz-liag.de
+% Author: see AUTHORS.md
+% email: see AUTHORS.md
% License: MIT License (at end)
%------------- BEGIN CODE --------------
diff --git a/NUCLEUSinv/NUCLEUSinv_updateInterface.m b/NUCLEUSinv/NUCLEUSinv_updateInterface.m
index 80d65f9..9141613 100644
--- a/NUCLEUSinv/NUCLEUSinv_updateInterface.m
+++ b/NUCLEUSinv/NUCLEUSinv_updateInterface.m
@@ -32,8 +32,8 @@
% none
%
% See also: NUCLEUSinv
-% Author: Thomas Hiller
-% email: thomas.hiller[at]leibniz-liag.de
+% Author: see AUTHORS.md
+% email: see AUTHORS.md
% License: MIT License (at end)
%------------- BEGIN CODE --------------
@@ -69,7 +69,7 @@
%% update standard inversion panel
% inversion method popup
istring = {'Mono exp.','Several free exp. (2-5)',...
- 'Multi exp. (LSQ)','Multi exp. (LU decomp.)'};
+ 'Multi exp. (LSQ)','Multi exp. (LU decomp.)','Multi modal'};
set(gui.popup_handles.invstd_InvType,'String',istring);
switch data.invstd.invtype
case 'mono'
@@ -87,9 +87,11 @@
gui = updateLorder(gui,data.invstd.invtype,data.invstd.Lorder);
gui = updateInvstdTime(gui,data.invstd.invtype,0,0);
- % Tbulk
+ % Tbulk & Tdiff
set(gui.edit_handles.invstd_Tbulk,'Enable','off',...
'String',num2str(data.invstd.Tbulk));
+ set(gui.edit_handles.invstd_Tdiff,'Enable','off',...
+ 'String',num2str(data.invstd.Tdiff));
case 'free'
% inversion method popup
@@ -107,9 +109,11 @@
gui = updateLorder(gui,data.invstd.invtype,data.invstd.Lorder);
gui = updateInvstdTime(gui,data.invstd.invtype,0,0);
- % Tbulk
+ % Tbulk & Tdiff
set(gui.edit_handles.invstd_Tbulk,'Enable','off',...
'String',num2str(data.invstd.Tbulk));
+ set(gui.edit_handles.invstd_Tdiff,'Enable','off',...
+ 'String',num2str(data.invstd.Tdiff));
case 'NNLS'
% inversion method popup
@@ -145,9 +149,11 @@
gui = updateInvstdTime(gui,data.invstd.invtype,data.invstd.time,...
data.invstd.Ntime);
- % Tbulk
+ % Tbulk & Tdiff
set(gui.edit_handles.invstd_Tbulk,'Enable','on',...
'String',num2str(data.invstd.Tbulk));
+ set(gui.edit_handles.invstd_Tdiff,'Enable','on',...
+ 'String',num2str(data.invstd.Tdiff));
case 'LU'
% inversion method popup
@@ -175,9 +181,39 @@
gui = updateInvstdTime(gui,data.invstd.invtype,data.invstd.time,...
data.invstd.Ntime);
- % Tbulk
+ % Tbulk & Tdiff
set(gui.edit_handles.invstd_Tbulk,'Enable','on',...
'String',num2str(data.invstd.Tbulk));
+ set(gui.edit_handles.invstd_Tdiff,'Enable','on',...
+ 'String',num2str(data.invstd.Tdiff));
+
+ case 'MUMO'
+ % inversion method popup
+ set(gui.popup_handles.invstd_InvType,'Value',5,'Enable','on');
+
+ % additional inversion settings
+ set(gui.popup_handles.invstd_InvTypeOpt,'Enable','on',...
+ 'Value',data.invstd.freeDT,...
+ 'String',{'1','2','3','4','5'});
+ set(gui.text_handles.invstd_InvTypeOpt,...
+ 'String','No. of modes');
+
+% % lambda, smoothness constraint and RTD limits
+% gui = updateLambda(gui,data.invstd.regtype,data.invstd.lambda,...
+% data.invstd.lambdaR,data.invstd.NlambdaR);
+% gui = updateLorder(gui,data.invstd.invtype,data.invstd.Lorder);
+ gui = updateInvstdTime(gui,data.invstd.invtype,data.invstd.time,...
+ data.invstd.Ntime);
+
+ % lambda, smoothness constraint and RTD limits
+ gui = updateLambda(gui,data.invstd.regtype,0,0,0);
+ gui = updateLorder(gui,data.invstd.invtype,data.invstd.Lorder);
+
+ % Tbulk & Tdiff
+ set(gui.edit_handles.invstd_Tbulk,'Enable','on',...
+ 'String',num2str(data.invstd.Tbulk));
+ set(gui.edit_handles.invstd_Tdiff,'Enable','on',...
+ 'String',num2str(data.invstd.Tdiff));
end
% updates CBW, BVI, rho and a
@@ -535,9 +571,11 @@
gui = updateLorder(gui,data.invstd.invtype,data.invstd.Lorder);
gui = updateInvstdTime(gui,data.invstd.invtype,0,0);
- % Tbulk
+ % Tbulk & Tdiff
set(gui.edit_handles.invstd_Tbulk,'Enable','off',...
'String',num2str(data.invstd.Tbulk));
+ set(gui.edit_handles.invstd_Tdiff,'Enable','off',...
+ 'String',num2str(data.invstd.Tdiff));
case 'free'
% inversion method popup
@@ -555,9 +593,11 @@
gui = updateLorder(gui,data.invstd.invtype,data.invstd.Lorder);
gui = updateInvstdTime(gui,data.invstd.invtype,0,0);
- % Tbulk
+ % Tbulk & Tdiff
set(gui.edit_handles.invstd_Tbulk,'Enable','off',...
'String',num2str(data.invstd.Tbulk));
+ set(gui.edit_handles.invstd_Tdiff,'Enable','off',...
+ 'String',num2str(data.invstd.Tdiff));
case 'NNLS'
% inversion method popup
@@ -592,9 +632,11 @@
set(gui.edit_handles.invstd_Ntime,'Enable','off',...
'String',num2str(data.invstd.Ntime));
- % Tbulk
+ % Tbulk & Tdiff
set(gui.edit_handles.invstd_Tbulk,'Enable','on',...
'String',num2str(data.invstd.Tbulk));
+ set(gui.edit_handles.invstd_Tdiff,'Enable','on',...
+ 'String',num2str(data.invstd.Tdiff));
end
%% update petro parameter panel
@@ -681,16 +723,16 @@
set(gui.radio_handles.process_timescale_ms,'Enable','on','Value',0);
set(gui.text_handles.invstd_RTDtimes,'String','RTD - min [s] | max [s] | # / dec',...
'FontSize',10);
- set(gui.text_handles.petro_Tbulk,'String',...
- ['Tbulk [s] | ',char(hex2dec('03C1')),' [µm/s] | geom']);
+ set(gui.text_handles.petro_Tbulk,'String','Tbulk [s] | Tdiff [s]');
+ set(gui.text_handles.petro_rho,'String',[char(hex2dec('03C1')),' [µm/s] | geom ']);
case 'ms'
set(gui.radio_handles.process_timescale_s,'Enable','on','Value',0);
set(gui.radio_handles.process_timescale_ms,'Enable','on','Value',1);
set(gui.text_handles.invstd_RTDtimes,'String','RTD - min [ms] | max [ms] | # / dec',...
'FontSize',9);
- set(gui.text_handles.petro_Tbulk,'String',...
- ['Tbulk [ms] | ',char(hex2dec('03C1')),' [µm/s] | geom']);
+ set(gui.text_handles.petro_Tbulk,'String','Tbulk [ms] | Tdiff [ms]');
+ set(gui.text_handles.petro_rho,'String',[char(hex2dec('03C1')),' [µm/s] | geom ']);
end
end
@@ -704,7 +746,7 @@
set(gui.edit_handles.invstd_time_max,'Enable','off');
set(gui.edit_handles.invstd_Ntime,'Enable','off');
- case {'LU','NNLS'}
+ case {'LU','NNLS','MUMO'}
set(gui.edit_handles.invstd_time_min,'Enable','on','String',num2str(time(1)));
set(gui.edit_handles.invstd_time_max,'Enable','on','String',num2str(time(2)));
set(gui.edit_handles.invstd_Ntime,'Enable','on','String',num2str(Ntime));
@@ -809,7 +851,7 @@
function gui = updateLorder(gui,invtype,Lorder)
switch invtype
- case {'mono','free'}
+ case {'mono','free','MUMO'}
set(gui.radio_handles.invstd_Lorder0,'Enable','off');
set(gui.radio_handles.invstd_Lorder1,'Enable','off');
set(gui.radio_handles.invstd_Lorder2,'Enable','off');
@@ -881,7 +923,7 @@
set(gui.edit_handles.param_rho,'Enable','on','String',num2str(p.rho));
set(gui.edit_handles.param_geom,'Enable','on','String',num2str(p.a));
- case {'LU','NNLS'}
+ case {'LU','NNLS','MUMO'}
set(gui.edit_handles.param_CBW,'Enable','on','String',num2str(p.CBWcutoff));
set(gui.edit_handles.param_BVI,'Enable','on','String',num2str(p.BVIcutoff));
set(gui.edit_handles.param_rho,'Enable','on','String',num2str(p.rho));
diff --git a/NUCLEUSmod/NUCLEUSmod.m b/NUCLEUSmod/NUCLEUSmod.m
index 271b5cf..14bea02 100644
--- a/NUCLEUSmod/NUCLEUSmod.m
+++ b/NUCLEUSmod/NUCLEUSmod.m
@@ -30,8 +30,8 @@
% none
%
% See also: NUCLEUSinv
-% Author: Thomas Hiller
-% email: thomas.hiller[at]leibniz-liag.de
+% Author: see AUTHORS.md
+% email: see AUTHORS.md
% License: MIT License (at end)
%------------- BEGIN CODE --------------
@@ -41,10 +41,10 @@
if ~isempty(h0); close(h0); end
%% GUI 'header' info and defaults
-myui.version = '0.1.11';
-myui.date = '12.03.2021';
-myui.author = {'Thomas Hiller','Stephan Costabel'};
-myui.email = 'thomas.hiller[at]leibniz-liag.de';
+myui.version = '0.1.12';
+myui.date = '17.02.2022';
+myui.author = {'Stephan Costabel','Thomas Hiller'};
+myui.email = 'thomas.hiller[at]bgr.de';
myui.fontsize = 10;
%% Default data settings
diff --git a/NUCLEUSmod/NUCLEUSmod_createGUI.m b/NUCLEUSmod/NUCLEUSmod_createGUI.m
index 9579889..163c193 100644
--- a/NUCLEUSmod/NUCLEUSmod_createGUI.m
+++ b/NUCLEUSmod/NUCLEUSmod_createGUI.m
@@ -29,8 +29,8 @@ function NUCLEUSmod_createGUI(h,wbon)
% none
%
% See also: NUCLEUSmod
-% Author: Thomas Hiller
-% email: thomas.hiller[at]leibniz-liag.de
+% Author: see AUTHORS.md
+% email: see AUTHORS.md
% License: MIT License (at end)
%------------- BEGIN CODE --------------
diff --git a/NUCLEUSmod/NUCLEUSmod_createMenus.m b/NUCLEUSmod/NUCLEUSmod_createMenus.m
index 7b38e1d..462eff1 100644
--- a/NUCLEUSmod/NUCLEUSmod_createMenus.m
+++ b/NUCLEUSmod/NUCLEUSmod_createMenus.m
@@ -23,8 +23,8 @@
% none
%
% See also: NUCLEUSmod
-% Author: Thomas Hiller
-% email: thomas.hiller[at]leibniz-liag.de
+% Author: see AUTHORS.md
+% email: see AUTHORS.md
% License: MIT License (at end)
%------------- BEGIN CODE --------------
diff --git a/NUCLEUSmod/NUCLEUSmod_createPanelCPS.m b/NUCLEUSmod/NUCLEUSmod_createPanelCPS.m
index ac63e0d..0d1c5b0 100644
--- a/NUCLEUSmod/NUCLEUSmod_createPanelCPS.m
+++ b/NUCLEUSmod/NUCLEUSmod_createPanelCPS.m
@@ -24,8 +24,8 @@
% none
%
% See also: NUCLEUSmod
-% Author: Thomas Hiller
-% email: thomas.hiller[at]leibniz-liag.de
+% Author: see AUTHORS.md
+% email: see AUTHORS.md
% License: MIT License (at end)
%------------- BEGIN CODE --------------
diff --git a/NUCLEUSmod/NUCLEUSmod_createPanelGeometry.m b/NUCLEUSmod/NUCLEUSmod_createPanelGeometry.m
index 5d5feb1..5485372 100644
--- a/NUCLEUSmod/NUCLEUSmod_createPanelGeometry.m
+++ b/NUCLEUSmod/NUCLEUSmod_createPanelGeometry.m
@@ -24,8 +24,8 @@
% none
%
% See also: NUCLEUSmod
-% Author: Thomas Hiller
-% email: thomas.hiller[at]leibniz-liag.de
+% Author: see AUTHORS.md
+% email: see AUTHORS.md
% License: MIT License (at end)
%------------- BEGIN CODE --------------
diff --git a/NUCLEUSmod/NUCLEUSmod_createPanelNMR.m b/NUCLEUSmod/NUCLEUSmod_createPanelNMR.m
index 5755e45..4c707ad 100644
--- a/NUCLEUSmod/NUCLEUSmod_createPanelNMR.m
+++ b/NUCLEUSmod/NUCLEUSmod_createPanelNMR.m
@@ -24,8 +24,8 @@
% none
%
% See also: NUCLEUSmod
-% Author: Thomas Hiller
-% email: thomas.hiller[at]leibniz-liag.de
+% Author: see AUTHORS.md
+% email: see AUTHORS.md
% License: MIT License (at end)
%------------- BEGIN CODE --------------
@@ -34,10 +34,10 @@
gui.panels.nmr.VBox = uix.VBox('Parent',gui.panels.nmr.main,...
'Spacing',3,'Padding',3);
-% Tbulk & surface relaxivity rho
+% Tbulk & Tdiff
gui.panels.nmr.HBox1 = uix.HBox('Parent',gui.panels.nmr.VBox,...
'Spacing',3);
-% echo time TE & number of echos
+% surface relaxivity rho & echo time TE & number of echos
gui.panels.nmr.HBox2 = uix.HBox('Parent',gui.panels.nmr.VBox,...
'Spacing',3);
% RUN button
@@ -47,51 +47,62 @@
gui.panels.nmr.HBox4 = uix.HBox('Parent',gui.panels.nmr.VBox,...
'Spacing',3);
-%% Tbulk & surface relaxivity rho
+%% Tbulk & Tdiff
gui.text_handles.Tbulk = uicontrol('Parent',gui.panels.nmr.HBox1,...
'Style','text','FontSize',myui.fontsize,'HorizontalAlignment','center',...
- 'String','Tbulk [s]');
-tstr = ['Set relaxation time of bulk water.
',...
+ 'String','Tbulk [s] | Tdiff [s]');
+tstr = ['Bulk relaxation time in [s].
',...
+ '1/T = 1/Ts + 1/Tb + 1/Td
',...
'Default value:
',...
- '2 s
'];
+ '2
'];
gui.edit_handles.Tbulk = uicontrol('Parent',gui.panels.nmr.HBox1,...
'Style','edit','String',num2str(data.nmr.Tbulk),'FontSize',myui.fontsize,...
'UserData',struct('Tooltipstr',tstr,'defaults',[data.nmr.Tbulk 1 1]),...
'Tag','nmr_Tbulk','Enable','on','Callback',@onEditValue);
-gui.text_handles.rho = uicontrol('Parent',gui.panels.nmr.HBox1,...
+tstr = ['Diffusion relaxation time in [s].
',...
+ '1/T = 1/Ts + 1/Tb + 1/Td
',...
+ 'Td can be caluclated by
',...
+ 'Td = 12 / (D*(',char(hex2dec('03B3')),'*G*TE)2 )
',...
+ 'with
',...
+ 'D = diffusion coefficent of water
',...
+ char(hex2dec('03B3')),' = gyromagnetic ratio of hydrogen
',...
+ 'G = magnetic gradient
',...
+ 'TE = echo time
',...
+ 'Default value:
',...
+ '1e6 (so that 1/Td is ignored)
'];
+gui.edit_handles.Tdiff = uicontrol('Parent',gui.panels.nmr.HBox1,...
+ 'Style','edit','String',num2str(data.nmr.Tdiff),'FontSize',myui.fontsize,...
+ 'UserData',struct('Tooltipstr',tstr,'defaults',[data.nmr.Tdiff 1 1]),...
+ 'Tag','nmr_Tdiff','Enable','on','Callback',@onEditValue);
+set(gui.panels.nmr.HBox1,'Widths',[200 -1 -1]);
+
+%% surface relaxivity rho & echo time TE & number of echoes
+gui.text_handles.rho = uicontrol('Parent',gui.panels.nmr.HBox2,...
'Style','text','FontSize',myui.fontsize,'HorizontalAlignment','center',...
- 'String',[char(hex2dec('03C1')),' [µm/s]']);
-tstr = ['Set surface relaxivity &rho .
',...
+ 'String',[char(hex2dec('03C1')),' [µm/s] | TE [µs] | # echoes']);
+tstr = ['Surface relaxivity in [µm/s].
',...
+ '1/Ts = rho*S/V = rho*a/R.
',...
'Default value:
',...
- '10 µm/s
'];
-gui.edit_handles.rho = uicontrol('Parent',gui.panels.nmr.HBox1,...
+ '10
'];
+gui.edit_handles.rho = uicontrol('Parent',gui.panels.nmr.HBox2,...
'Style','edit','String',num2str(data.nmr.rho),'FontSize',myui.fontsize,...
'UserData',struct('Tooltipstr',tstr,'defaults',[data.nmr.rho 1 1]),...
'Tag','nmr_rho','Enable','on','Callback',@onEditValue);
-set(gui.panels.nmr.HBox1,'Widths',[100 -1 100 -1]);
-
-%% echo time TE & number of echoes
-gui.text_handles.TE = uicontrol('Parent',gui.panels.nmr.HBox2,...
- 'Style','text','FontSize',myui.fontsize,'HorizontalAlignment','center',...
- 'String','echo time [µs]');
-tstr = ['Set echo time.
',...
+tstr = ['Echo time TE in [µs].
',...
'Default value:
',...
- '1000 µs
'];
+ '1000
'];
gui.edit_handles.TE = uicontrol('Parent',gui.panels.nmr.HBox2,...
'Style','edit','String',num2str(data.nmr.TE),'FontSize',myui.fontsize,...
'UserData',struct('Tooltipstr',tstr,'defaults',[data.nmr.TE 1 1]),...
'Tag','nmr_TE','Enable','on','Callback',@onEditValue);
-gui.text_handles.echosN = uicontrol('Parent',gui.panels.nmr.HBox2,...
- 'Style','text','FontSize',myui.fontsize,'HorizontalAlignment','center',...
- 'String','# echoes');
-tstr = ['Set number of echoes.
',...
+tstr = ['Number of echoes.
',...
'Default value:
',...
'1001
'];
gui.edit_handles.echosN = uicontrol('Parent',gui.panels.nmr.HBox2,...
'Style','edit','String',num2str(data.nmr.echosN),'FontSize',myui.fontsize,...
'UserData',struct('Tooltipstr',tstr,'defaults',[data.nmr.echosN 1 1]),...
'Tag','nmr_echosN','Enable','on','Callback',@onEditValue);
-set(gui.panels.nmr.HBox2,'Widths',[100 -1 100 -1]);
+set(gui.panels.nmr.HBox2,'Widths',[200 -1 -1 -1]);
%% RUN button
gui.text_handles.nmr_RUN = uicontrol('Parent',gui.panels.nmr.HBox3,...
@@ -103,10 +114,19 @@
set(gui.panels.nmr.HBox3,'Widths',[200 -1]);
%% noise & porosity
-gui.text_handles.noise = uicontrol('Parent',gui.panels.nmr.HBox4,...
- 'Style','text','FontSize',myui.fontsize,'HorizontalAlignment','center',...
- 'String','add noise');
-tstr = ['Set NMR data noise.
',...
+
+tstr = ['NMR data noise method.
',...
+ 'A noise level will be used globally for all NMR signals.
',...
+ 'A signal-to-ratio will be used individually on every single NMR signal.
',...
+ 'Available options:
',...
+ 'noise level or SNR
',...
+ 'Default value:
',...
+ 'noise level
'];
+gui.popup_handles.noisetype = uicontrol('Parent',gui.panels.nmr.HBox4,...
+ 'Style','popup','String',{'noise level','SNR'},...
+ 'Value',1,'FontSize',myui.fontsize,'UserData',struct('Tooltipstr',tstr),...
+ 'Callback',@onPopupNMRNoiseType);
+tstr = ['NMR data noise.
',...
'Hint:
',...
'You do not need to press RUN to add noise to the NMR signals.
',...
'The raw NMR signals are stored internally and the noise is
',...
@@ -120,7 +140,7 @@
gui.text_handles.porosity = uicontrol('Parent',gui.panels.nmr.HBox4,...
'Style','text','FontSize',myui.fontsize,'HorizontalAlignment','center',...
'String','porosity');
-tstr = ['Set porosity value in the range [0, 1].
',...
+tstr = ['Porosity value in the range [0, 1].
',...
'Note:
',...
'This value is applied only as a scaling factor to the NMR amplitudes.
',...
'Hence, saturation becomes water content.'];
@@ -135,14 +155,8 @@
jh.setVerticalAlignment(javax.swing.JLabel.CENTER);
jh = findjobj(gui.text_handles.rho);
jh.setVerticalAlignment(javax.swing.JLabel.CENTER);
-jh = findjobj(gui.text_handles.TE );
-jh.setVerticalAlignment(javax.swing.JLabel.CENTER);
-jh = findjobj(gui.text_handles.echosN );
-jh.setVerticalAlignment(javax.swing.JLabel.CENTER);
jh = findjobj(gui.text_handles.nmr_RUN);
jh.setVerticalAlignment(javax.swing.JLabel.CENTER);
-jh = findjobj(gui.text_handles.noise);
-jh.setVerticalAlignment(javax.swing.JLabel.CENTER);
jh = findjobj(gui.text_handles.porosity);
jh.setVerticalAlignment(javax.swing.JLabel.CENTER);
diff --git a/NUCLEUSmod/NUCLEUSmod_createPanelPlots.m b/NUCLEUSmod/NUCLEUSmod_createPanelPlots.m
index 9a18aa6..46bf877 100644
--- a/NUCLEUSmod/NUCLEUSmod_createPanelPlots.m
+++ b/NUCLEUSmod/NUCLEUSmod_createPanelPlots.m
@@ -24,8 +24,8 @@
% none
%
% See also: NUCLEUSmod
-% Author: Thomas Hiller
-% email: thomas.hiller[at]leibniz-liag.de
+% Author: see AUTHORS.md
+% email: see AUTHORS.md
% License: MIT License (at end)
%------------- BEGIN CODE --------------
diff --git a/NUCLEUSmod/NUCLEUSmod_createStatusbar.m b/NUCLEUSmod/NUCLEUSmod_createStatusbar.m
index 66c9b2a..8f2af5d 100644
--- a/NUCLEUSmod/NUCLEUSmod_createStatusbar.m
+++ b/NUCLEUSmod/NUCLEUSmod_createStatusbar.m
@@ -24,8 +24,8 @@
%
% See also: NUCLEUSmod
-% Author: Thomas Hiller
-% email: thomas.hiller[at]leibniz-liag.de
+% Author: see AUTHORS.md
+% email: see AUTHORS.md
%------------- BEGIN CODE --------------
diff --git a/NUCLEUSmod/NUCLEUSmod_loadDefaults.m b/NUCLEUSmod/NUCLEUSmod_loadDefaults.m
index c382e05..e187ae7 100644
--- a/NUCLEUSmod/NUCLEUSmod_loadDefaults.m
+++ b/NUCLEUSmod/NUCLEUSmod_loadDefaults.m
@@ -21,8 +21,8 @@
% none
%
% See also: NUCLEUSmod
-% Author: Thomas Hiller
-% email: thomas.hiller[at]leibniz-liag.de
+% Author: see AUTHORS.md
+% email: see AUTHORS.md
% License: MIT License (at end)
%------------- BEGIN CODE --------------
@@ -73,10 +73,14 @@
out.nmr.TE = 1000;
% number of echoes
out.nmr.echosN = 1001;
-% noise level [%]
+% noise creation type 'level' or 'SNR'
+out.nmr.noisetype = 'level';
+% noise level [0:1] or SNR [-]
out.nmr.noise = 0;
% water bulk relaxation time [s]
out.nmr.Tbulk = 2;
+% diffusion relaxation time [s]
+out.nmr.Tdiff = 1e6;
% surface relaxivity [µm/s]
out.nmr.rho = 10;
% porosity value between 0 and 1 [-]
diff --git a/NUCLEUSmod/NUCLEUSmod_updateInterface.m b/NUCLEUSmod/NUCLEUSmod_updateInterface.m
index ea8b086..4f0cef9 100644
--- a/NUCLEUSmod/NUCLEUSmod_updateInterface.m
+++ b/NUCLEUSmod/NUCLEUSmod_updateInterface.m
@@ -22,8 +22,8 @@
% none
%
% See also: NUCLEUSmod
-% Author: Thomas Hiller
-% email: thomas.hiller[at]leibniz-liag.de
+% Author: see AUTHORS.md
+% email: see AUTHORS.md
% License: MIT License (at end)
%------------- BEGIN CODE --------------
@@ -125,6 +125,14 @@
end
%% update NMR panel
+% noise type
+switch data.nmr.noisetype
+ case 'level' % noise level
+ set(gui.popup_handles.noisetype,'Value',1);
+ case 'SNR' % signal-to-noise ratio (SNR)
+ set(gui.popup_handles.noisetype,'Value',2);
+end
+
% all edit fields
set(gui.edit_handles.Tbulk,'String',num2str(data.nmr.Tbulk));
set(gui.edit_handles.rho,'String',num2str(data.nmr.rho));
diff --git a/README.md b/README.md
index 36192bc..ce8f44b 100644
--- a/README.md
+++ b/README.md
@@ -22,7 +22,7 @@ modeling and i**N**version of n**UCL**ear magnetic r**E**sonance data with ang**
### About
-**NUCLEUS** is a set of MATLABTM tools, that allow forward and inverse modeling of nuclear magnetic resonance (NMR) relaxometry data. The main front-ends to these tools are two graphical user interfaces, **NUCLEUSmod** and **NUCLEUSinv** for forward and inverse modeling, respectively. For simple NMR relaxometry data inversion, the **NUCLEUSinv** GUI may be a little *feature-rich*. But one of the ideas, when starting to develop this code, was to help students understand the basic concepts of NMR relaxometry data inversion.
+**NUCLEUS** is a set of MATLABTM tools, that allow forward and inverse modeling of nuclear magnetic resonance (NMR) relaxometry data (T1 and T2 relaxation). The main front-ends to these tools are two graphical user interfaces, **NUCLEUSmod** and **NUCLEUSinv** for forward and inverse modeling, respectively. For simple NMR relaxometry data inversion, the **NUCLEUSinv** GUI may be a little *feature-rich*. But one of the ideas, when starting to develop this code, was to help students understand the basic concepts of NMR relaxometry data inversion.
###### NUCLEUSmod basic features:
@@ -62,7 +62,7 @@ If you do not have the Optimization or Statistics toolboxes then not all feature
#### Operating System
-I tested it successfully under Windows 7 (64bit) and 10 (64bit) with Matlab R2014b and newer. Always with the latest version of the GUI Layout Toolbox (current version is v2.3.4)
+I tested it successfully under Windows 7 (64bit) and 10 (64bit) with Matlab R2014b and newer. Always with the latest version of the GUI Layout Toolbox (current version is v2.3.5)
**NOTE:** So far I did not test anything on Linux or a Mac. If you get it to work on either of the two systems (which it basically should I guess) please let me know.
@@ -108,13 +108,15 @@ 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. (2021, March 12). ThoHiller/nmr-nucleus: v0.1.11 (Version v0.1.11). Zenodo. [https://doi.org/10.5281/zenodo.4022195]
+Thomas Hiller. (2021, March 12). ThoHiller/nmr-nucleus: v0.1.12 (Version v0.1.12). 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.
+
### References
-1. Hiller, T. and Klitzsch, N., "Joint inversion of nuclear magnetic resonance data from partially saturated rocks using a triangular pore model", *GEOPHYSICS* **83**(4), JM15-JM28, 2018, [DOI](https://doi.org/10.1190/geo2017-0697.1)
-2. Costabel, S. and Hiller, T., "Soil hydraulic interpretation of nuclear magnetic resonance measurements based on circular and triangular capillary models", *Vadose Zone Journal*, 2021, e20104, [DOI](https://doi.org/10.1002/vzj2.20104)
+1. Hiller, T., Costabel, S., Radic, T., Dlugosch, R. and Müller-Petke, M. "Feasibility study on prepolarized surface nuclear magnetic resonance for soil moisture measurements", *Vadose Zone Journal*, **20**(5), 2021, e20138, [DOI](https://doi.org/10.1002/vzj2.20138)
+2. Costabel, S. and Hiller, T., "Soil hydraulic interpretation of nuclear magnetic resonance measurements based on circular and triangular capillary models", *Vadose Zone Journal*, **20**(2), 2021, e20104, [DOI](https://doi.org/10.1002/vzj2.20104)
+3. Hiller, T. and Klitzsch, N., "Joint inversion of nuclear magnetic resonance data from partially saturated rocks using a triangular pore model", *GEOPHYSICS*, **83**(4), JM15-JM28, 2018, [DOI](https://doi.org/10.1190/geo2017-0697.1)
- - -
MATLAB is a registered trademark of The Mathworks, Inc.
\ No newline at end of file diff --git a/callbacks/contextmenus/onContextAxisLogLin.m b/callbacks/contextmenus/onContextAxisLogLin.m index 47da942..5911082 100644 --- a/callbacks/contextmenus/onContextAxisLogLin.m +++ b/callbacks/contextmenus/onContextAxisLogLin.m @@ -26,8 +26,8 @@ function onContextAxisLogLin(src,~) % none % % See also: NUCLEUSmod, NUCLEUSinv -% Author: Thomas Hiller -% email: thomas.hiller[at]leibniz-liag.de +% Author: see AUTHORS.md +% email: see AUTHORS.md % License: MIT License (at end) %------------- BEGIN CODE -------------- diff --git a/callbacks/contextmenus/onContextAxisT1T2.m b/callbacks/contextmenus/onContextAxisT1T2.m index cfb049a..e97c777 100644 --- a/callbacks/contextmenus/onContextAxisT1T2.m +++ b/callbacks/contextmenus/onContextAxisT1T2.m @@ -24,8 +24,8 @@ function onContextAxisT1T2(src,~) % none % % See also: NUCLEUSmod -% Author: Thomas Hiller -% email: thomas.hiller[at]leibniz-liag.de +% Author: see AUTHORS.md +% email: see AUTHORS.md % License: MIT License (at end) %------------- BEGIN CODE -------------- diff --git a/callbacks/contextmenus/onContextPlotsPSD.m b/callbacks/contextmenus/onContextPlotsPSD.m index 1ffb49c..7c28f30 100644 --- a/callbacks/contextmenus/onContextPlotsPSD.m +++ b/callbacks/contextmenus/onContextPlotsPSD.m @@ -27,8 +27,8 @@ function onContextPlotsPSD(src,~) % none % % See also: NUCLEUSmod -% Author: Thomas Hiller -% email: thomas.hiller[at]leibniz-liag.de +% Author: see AUTHORS.md +% email: see AUTHORS.md % License: MIT License (at end) %------------- BEGIN CODE -------------- diff --git a/callbacks/contextmenus/onContextPlotsPSDJ.m b/callbacks/contextmenus/onContextPlotsPSDJ.m index 38cdbea..3313671 100644 --- a/callbacks/contextmenus/onContextPlotsPSDJ.m +++ b/callbacks/contextmenus/onContextPlotsPSDJ.m @@ -24,8 +24,8 @@ function onContextPlotsPSDJ(src,~) % none % % See also: NUCLEUSinv -% Author: Thomas Hiller -% email: thomas.hiller[at]leibniz-liag.de +% Author: see AUTHORS.md +% email: see AUTHORS.md % License: MIT License (at end) %------------- BEGIN CODE -------------- diff --git a/callbacks/contextmenus/onContextPlotsRTD.m b/callbacks/contextmenus/onContextPlotsRTD.m index bf64784..91ec38d 100644 --- a/callbacks/contextmenus/onContextPlotsRTD.m +++ b/callbacks/contextmenus/onContextPlotsRTD.m @@ -25,8 +25,8 @@ function onContextPlotsRTD(src,~) % none % % See also: NUCLEUSinv -% Author: Thomas Hiller -% email: thomas.hiller[at]leibniz-liag.de +% Author: see AUTHORS.md +% email: see AUTHORS.md % License: MIT License (at end) %------------- BEGIN CODE -------------- diff --git a/callbacks/contextmenus/onContextSignalList.m b/callbacks/contextmenus/onContextSignalList.m index 8bbffa6..74f784f 100644 --- a/callbacks/contextmenus/onContextSignalList.m +++ b/callbacks/contextmenus/onContextSignalList.m @@ -31,8 +31,8 @@ function onContextSignalList(src,~) % none % % See also: NUCLEUSinv -% Author: Thomas Hiller -% email: thomas.hiller[at]leibniz-liag.de +% Author: see AUTHORS.md +% email: see AUTHORS.md % License: MIT License (at end) %------------- BEGIN CODE -------------- diff --git a/callbacks/contextmenus/onContextTableSelect.m b/callbacks/contextmenus/onContextTableSelect.m index 3dd4d82..ca17b45 100644 --- a/callbacks/contextmenus/onContextTableSelect.m +++ b/callbacks/contextmenus/onContextTableSelect.m @@ -25,8 +25,8 @@ function onContextTableSelect(src,~) % none % % See also: NUCLEUSmod -% Author: Thomas Hiller -% email: thomas.hiller[at]leibniz-liag.de +% Author: see AUTHORS.md +% email: see AUTHORS.md % License: MIT License (at end) %------------- BEGIN CODE -------------- diff --git a/callbacks/edits/onEditCPSTable.m b/callbacks/edits/onEditCPSTable.m index c80bfa4..5570d20 100644 --- a/callbacks/edits/onEditCPSTable.m +++ b/callbacks/edits/onEditCPSTable.m @@ -23,8 +23,8 @@ function onEditCPSTable(src,~) % none % % See also: NUCLEUSinv -% Author: Thomas Hiller -% email: thomas.hiller[at]leibniz-liag.de +% Author: see AUTHORS.md +% email: see AUTHORS.md % License: MIT License (at end) %------------- BEGIN CODE -------------- diff --git a/callbacks/edits/onEditValue.m b/callbacks/edits/onEditValue.m index 6ef57cf..db2d7a3 100644 --- a/callbacks/edits/onEditValue.m +++ b/callbacks/edits/onEditValue.m @@ -26,7 +26,6 @@ function onEditValue(src,~) % updateInfo % updateNMRsignals % updatePlotsDistribution -% updatePlotsNMR % updatePlotsSignal % % Subfunctions: @@ -36,8 +35,8 @@ function onEditValue(src,~) % none % % See also: NUCLEUSinv -% Author: Thomas Hiller -% email: thomas.hiller[at]leibniz-liag.de +% Author: see AUTHORS.md +% email: see AUTHORS.md % License: MIT License (at end) %------------- BEGIN CODE -------------- @@ -146,6 +145,12 @@ function onEditValue(src,~) setappdata(fig,'data',data); set(src,'String',num2str(data.invstd.Tbulk)); end + case 'Tdiff' + if data.invstd.Tdiff <=0 + data.invstd.Tdiff = 1e6; + setappdata(fig,'data',data); + set(src,'String',num2str(data.invstd.Tdiff)); + end case 'porosity' if data.invstd.porosity < 0 || data.invstd.porosity > 1 data.invstd.porosity = 1; @@ -225,9 +230,17 @@ function onEditValue(src,~) case 'nmr' switch out.field case 'noise' + switch data.nmr.noisetype + case 'level' + case 'SNR' + if data.nmr.noise == 0 + data.nmr.noise = Inf; + set(src,'String',num2str(data.nmr.noise)); + end + end + setappdata(fig,'data',data); if isfield(data.results,'NMR') updateNMRsignals; - updatePlotsNMR; end case 'porosity' if data.nmr.porosity <= 0 || data.nmr.porosity > 1 @@ -237,7 +250,6 @@ function onEditValue(src,~) end if isfield(data.results,'NMR') updateNMRsignals; - updatePlotsNMR; end otherwise data = removeCalculationFields(data,'nmr'); diff --git a/callbacks/listboxes/onListboxData.m b/callbacks/listboxes/onListboxData.m index c3d5558..07706f7 100644 --- a/callbacks/listboxes/onListboxData.m +++ b/callbacks/listboxes/onListboxData.m @@ -32,8 +32,8 @@ function onListboxData(src,~) % none % % See also: NUCLEUSinv -% Author: Thomas Hiller -% email: thomas.hiller[at]leibniz-liag.de +% Author: see AUTHORS.md +% email: see AUTHORS.md % License: MIT License (at end) %------------- BEGIN CODE -------------- @@ -98,7 +98,7 @@ function onListboxData(src,~) data.process.start = 1; case 'T2' switch data.import.fileformat - case {'dart','field','mouse','NMRMOD','excel'} + case {'dart','excel','field','helios','mouse','NMRMOD'} data.process.gatetype = 'raw'; data.process.start = 1; otherwise @@ -147,7 +147,8 @@ function onListboxData(src,~) end if isfield(data.import,'NMRMOD') data.param.rho = data.import.NMR.para{id}.rho*1e6; - data.invstd.Tbulk = data.import.NMR.para{id}.Tbulk; + data.invstd.Tbulk = data.import.NMR.para{id}.Tbulk; + data.invstd.Tdiff = data.import.NMR.para{id}.Tdiff; data.invstd.porosity = data.import.NMR.para{id}.porosity; end % --- diff --git a/callbacks/menus/onMenuExpert.m b/callbacks/menus/onMenuExpert.m index 02076ab..f566e50 100644 --- a/callbacks/menus/onMenuExpert.m +++ b/callbacks/menus/onMenuExpert.m @@ -31,8 +31,8 @@ function onMenuExpert(src,~) % none % % See also: NUCLEUSinv -% Author: Thomas Hiller -% email: thomas.hiller[at]leibniz-liag.de +% Author: see AUTHORS.md +% email: see AUTHORS.md % License: MIT License (at end) %------------- BEGIN CODE -------------- @@ -48,7 +48,7 @@ function onMenuExpert(src,~) % deactivate or activate expert mode switch onoff - case 'on' % it it's on, switch it off + case 'on' % if it's on, switch it off data.info.ExpertMode = 'off'; % menu entry set(gui.menu.extra_expert,'Checked','off'); diff --git a/callbacks/menus/onMenuExportData.m b/callbacks/menus/onMenuExportData.m index bbd2a59..9765c05 100644 --- a/callbacks/menus/onMenuExportData.m +++ b/callbacks/menus/onMenuExportData.m @@ -24,8 +24,8 @@ function onMenuExportData(src,~) % none % % See also: NUCLEUSinv -% Author: Thomas Hiller -% email: thomas.hiller[at]leibniz-liag.de +% Author: see AUTHORS.md +% email: see AUTHORS.md % License: MIT License (at end) %------------- BEGIN CODE -------------- diff --git a/callbacks/menus/onMenuExportGraphics.m b/callbacks/menus/onMenuExportGraphics.m index db838cc..faca7ae 100644 --- a/callbacks/menus/onMenuExportGraphics.m +++ b/callbacks/menus/onMenuExportGraphics.m @@ -26,8 +26,8 @@ function onMenuExportGraphics(src,~) % none % % See also: NUCLEUSinv, NUCLEUSmod -% Author: Thomas Hiller -% email: thomas.hiller[at]leibniz-liag.de +% Author: see AUTHORS.md +% email: see AUTHORS.md % License: MIT License (at end) %------------- BEGIN CODE -------------- diff --git a/callbacks/menus/onMenuExtraColor.m b/callbacks/menus/onMenuExtraColor.m index ffc4bf6..2c0860a 100644 --- a/callbacks/menus/onMenuExtraColor.m +++ b/callbacks/menus/onMenuExtraColor.m @@ -23,8 +23,8 @@ function onMenuExtraColor(src,~) % none % % See also: NUCLEUSinv, NUCLEUSmod -% Author: Thomas Hiller -% email: thomas.hiller[at]leibniz-liag.de +% Author: see AUTHORS.md +% email: see AUTHORS.md % License: MIT License (at end) %------------- BEGIN CODE -------------- diff --git a/callbacks/menus/onMenuExtraRhoBounds.m b/callbacks/menus/onMenuExtraRhoBounds.m index 42193d5..ffda8e3 100644 --- a/callbacks/menus/onMenuExtraRhoBounds.m +++ b/callbacks/menus/onMenuExtraRhoBounds.m @@ -23,8 +23,8 @@ function onMenuExtraRhoBounds(src,~) % none % % See also: NUCLEUSinv -% Author: Thomas Hiller -% email: thomas.hiller[at]leibniz-liag.de +% Author: see AUTHORS.md +% email: see AUTHORS.md % License: MIT License (at end) %------------- BEGIN CODE -------------- diff --git a/callbacks/menus/onMenuHelp.m b/callbacks/menus/onMenuHelp.m index 3c5b94e..8f97786 100644 --- a/callbacks/menus/onMenuHelp.m +++ b/callbacks/menus/onMenuHelp.m @@ -23,8 +23,8 @@ function onMenuHelp(src,~) % none % % See also: NUCLEUSinv, NUCLEUSmod -% Author: Thomas Hiller -% email: thomas.hiller[at]leibniz-liag.de +% Author: see AUTHORS.md +% email: see AUTHORS.md % License: MIT License (at end) %------------- BEGIN CODE -------------- diff --git a/callbacks/menus/onMenuImport.m b/callbacks/menus/onMenuImport.m index 23e07e3..4114d12 100644 --- a/callbacks/menus/onMenuImport.m +++ b/callbacks/menus/onMenuImport.m @@ -29,8 +29,8 @@ function onMenuImport(src,~) % none % % See also: NUCLEUSinv, NUCLEUSmod -% Author: Thomas Hiller -% email: thomas.hiller[at]leibniz-liag.de +% Author: see AUTHORS.md +% email: see AUTHORS.md % License: MIT License (at end) %------------- BEGIN CODE -------------- @@ -68,13 +68,15 @@ function onMenuImport(src,~) % activate the PhaseView GUI in case real data is imported switch menu_tag - case {'NUCLEUSinv','NUCLEUSmod'} + case 'NUCLEUSmod' set(gui.menu.extra_phaseview,'Enable','off'); otherwise set(gui.menu.extra_phaseview,'Enable','on'); end - % update the "last import" value within the ini-file + % get updated gui data + gui = getappdata(fig,'gui'); + % update the "last import" value within the ini-file gui.myui.inidata.lastimport = [menu_tag,'_',label]; setappdata(fig,'gui',gui); gui = makeINIfile(gui,'update'); diff --git a/callbacks/menus/onMenuJointInversion.m b/callbacks/menus/onMenuJointInversion.m index 2f989d4..4b74e72 100644 --- a/callbacks/menus/onMenuJointInversion.m +++ b/callbacks/menus/onMenuJointInversion.m @@ -30,8 +30,8 @@ function onMenuJointInversion(src,~) % none % % See also: NUCLEUSinv -% Author: Thomas Hiller -% email: thomas.hiller[at]leibniz-liag.de +% Author: see AUTHORS.md +% email: see AUTHORS.md % License: MIT License (at end) %------------- BEGIN CODE -------------- diff --git a/callbacks/menus/onMenuRestartQuit.m b/callbacks/menus/onMenuRestartQuit.m index 6466507..ff947f8 100644 --- a/callbacks/menus/onMenuRestartQuit.m +++ b/callbacks/menus/onMenuRestartQuit.m @@ -24,8 +24,8 @@ function onMenuRestartQuit(src,~) % none % % See also: NUCLEUSinv, NUCLEUSmod -% Author: Thomas Hiller -% email: thomas.hiller[at]leibniz-liag.de +% Author: see AUTHORS.md +% email: see AUTHORS.md % License: MIT License (at end) %------------- BEGIN CODE -------------- diff --git a/callbacks/menus/onMenuSolver.m b/callbacks/menus/onMenuSolver.m index fe32035..c668573 100644 --- a/callbacks/menus/onMenuSolver.m +++ b/callbacks/menus/onMenuSolver.m @@ -25,8 +25,8 @@ function onMenuSolver(src,~) % none % % See also: NUCLEUSinv -% Author: Thomas Hiller -% email: thomas.hiller[at]leibniz-liag.de +% Author: see AUTHORS.md +% email: see AUTHORS.md % License: MIT License (at end) %------------- BEGIN CODE -------------- diff --git a/callbacks/menus/onMenuView.m b/callbacks/menus/onMenuView.m index 77dc216..66c699f 100644 --- a/callbacks/menus/onMenuView.m +++ b/callbacks/menus/onMenuView.m @@ -24,8 +24,8 @@ function onMenuView(src,~) % none % % See also: NUCLEUSinv, NUCLEUSmod -% Author: Thomas Hiller -% email: thomas.hiller[at]leibniz-liag.de +% Author: see AUTHORS.md +% email: see AUTHORS.md % License: MIT License (at end) %------------- BEGIN CODE -------------- diff --git a/callbacks/menus/onMenuViewFigures.m b/callbacks/menus/onMenuViewFigures.m index b964396..7a87499 100644 --- a/callbacks/menus/onMenuViewFigures.m +++ b/callbacks/menus/onMenuViewFigures.m @@ -24,8 +24,8 @@ function onMenuViewFigures(src,~) % none % % See also: NUCLEUSinv -% Author: Thomas Hiller -% email: thomas.hiller[at]leibniz-liag.de +% Author: see AUTHORS.md +% email: see AUTHORS.md % License: MIT License (at end) %------------- BEGIN CODE -------------- diff --git a/callbacks/popup/onPopupGeometryModesN.m b/callbacks/popup/onPopupGeometryModesN.m index e2f8ad6..8a12182 100644 --- a/callbacks/popup/onPopupGeometryModesN.m +++ b/callbacks/popup/onPopupGeometryModesN.m @@ -25,8 +25,8 @@ function onPopupGeometryModesN(src,~) % none % % See also: NUCLEUSmod -% Author: Thomas Hiller -% email: thomas.hiller[at]leibniz-liag.de +% Author: see AUTHORS.md +% email: see AUTHORS.md % License: MIT License (at end) %------------- BEGIN CODE -------------- diff --git a/callbacks/popup/onPopupGeometryPolyN.m b/callbacks/popup/onPopupGeometryPolyN.m index 12512ec..89bf707 100644 --- a/callbacks/popup/onPopupGeometryPolyN.m +++ b/callbacks/popup/onPopupGeometryPolyN.m @@ -25,8 +25,8 @@ function onPopupGeometryPolyN(src,~) % none % % See also: NUCLEUSmod -% Author: Thomas Hiller -% email: thomas.hiller[at]leibniz-liag.de +% Author: see AUTHORS.md +% email: see AUTHORS.md % License: MIT License (at end) %------------- BEGIN CODE -------------- diff --git a/callbacks/popup/onPopupGeometrySinglePSD.m b/callbacks/popup/onPopupGeometrySinglePSD.m index de70f90..69457f7 100644 --- a/callbacks/popup/onPopupGeometrySinglePSD.m +++ b/callbacks/popup/onPopupGeometrySinglePSD.m @@ -25,8 +25,8 @@ function onPopupGeometrySinglePSD(src,~) % none % % See also: NUCLEUSmod -% Author: Thomas Hiller -% email: thomas.hiller[at]leibniz-liag.de +% Author: see AUTHORS.md +% email: see AUTHORS.md % License: MIT License (at end) %------------- BEGIN CODE -------------- diff --git a/callbacks/popup/onPopupGeometryType.m b/callbacks/popup/onPopupGeometryType.m index 85a791a..5d30471 100644 --- a/callbacks/popup/onPopupGeometryType.m +++ b/callbacks/popup/onPopupGeometryType.m @@ -25,8 +25,8 @@ function onPopupGeometryType(src,~) % none % % See also: NUCLEUSmod -% Author: Thomas Hiller -% email: thomas.hiller[at]leibniz-liag.de +% Author: see AUTHORS.md +% email: see AUTHORS.md % License: MIT License (at end) %------------- BEGIN CODE -------------- diff --git a/callbacks/popup/onPopupInvjointGeometryType.m b/callbacks/popup/onPopupInvjointGeometryType.m index 904c966..d284620 100644 --- a/callbacks/popup/onPopupInvjointGeometryType.m +++ b/callbacks/popup/onPopupInvjointGeometryType.m @@ -24,8 +24,8 @@ function onPopupInvjointGeometryType(src,~) % none % % See also: NUCLEUSinv -% Author: Thomas Hiller -% email: thomas.hiller[at]leibniz-liag.de +% Author: see AUTHORS.md +% email: see AUTHORS.md % License: MIT License (at end) %------------- BEGIN CODE -------------- diff --git a/callbacks/popup/onPopupInvjointPolyN.m b/callbacks/popup/onPopupInvjointPolyN.m index eda133a..ad02068 100644 --- a/callbacks/popup/onPopupInvjointPolyN.m +++ b/callbacks/popup/onPopupInvjointPolyN.m @@ -24,8 +24,8 @@ function onPopupInvjointPolyN(src,~) % none % % See also: NUCLEUSmod -% Author: Thomas Hiller -% email: thomas.hiller[at]leibniz-liag.de +% Author: see AUTHORS.md +% email: see AUTHORS.md % License: MIT License (at end) %------------- BEGIN CODE -------------- diff --git a/callbacks/popup/onPopupInvjointType.m b/callbacks/popup/onPopupInvjointType.m index e6100e0..ddfaa3c 100644 --- a/callbacks/popup/onPopupInvjointType.m +++ b/callbacks/popup/onPopupInvjointType.m @@ -24,8 +24,8 @@ function onPopupInvjointType(src,~) % none % % See also: NUCLEUSmod -% Author: Thomas Hiller -% email: thomas.hiller[at]leibniz-liag.de +% Author: see AUTHORS.md +% email: see AUTHORS.md % License: MIT License (at end) %------------- BEGIN CODE -------------- diff --git a/callbacks/popup/onPopupInvjointTypeOptional.m b/callbacks/popup/onPopupInvjointTypeOptional.m index 5faede1..444305d 100644 --- a/callbacks/popup/onPopupInvjointTypeOptional.m +++ b/callbacks/popup/onPopupInvjointTypeOptional.m @@ -25,8 +25,8 @@ function onPopupInvjointTypeOptional(src,~) % none % % See also: NUCLEUSinv -% Author: Thomas Hiller -% email: thomas.hiller[at]leibniz-liag.de +% Author: see AUTHORS.md +% email: see AUTHORS.md % License: MIT License (at end) %------------- BEGIN CODE -------------- diff --git a/callbacks/popup/onPopupInvstdType.m b/callbacks/popup/onPopupInvstdType.m index 62edaa9..fe4c6ee 100644 --- a/callbacks/popup/onPopupInvstdType.m +++ b/callbacks/popup/onPopupInvstdType.m @@ -25,8 +25,8 @@ function onPopupInvstdType(src,~) % none % % See also: NUCLEUSinv -% Author: Thomas Hiller -% email: thomas.hiller[at]leibniz-liag.de +% Author: see AUTHORS.md +% email: see AUTHORS.md % License: MIT License (at end) %------------- BEGIN CODE -------------- @@ -62,6 +62,11 @@ function onPopupInvstdType(src,~) data.invstd.invtype = 'LU'; data.invstd.regtype = 'auto'; data.invstd.lambda = -1; + + case 5 + data.invstd.invtype = 'MUMO'; + data.invstd.regtype = 'none'; + data.invstd.lambda = 1; end case 'off' @@ -89,12 +94,17 @@ function onPopupInvstdType(src,~) else data.invstd.regtype = 'manual'; data.invstd.lambda = 1e-2; - end + end % update GUI data setappdata(fig,'data',data); % because the gate type could have changed update data onRadioGates(gui.radio_handles.process_gates_log); data = getappdata(fig,'data'); + + case 4 + data.invstd.invtype = 'MUMO'; + data.invstd.regtype = 'none'; + data.invstd.lambda = 1; end end % update GUI data diff --git a/callbacks/popup/onPopupInvstdTypeOptional.m b/callbacks/popup/onPopupInvstdTypeOptional.m index ca3a91d..e9b6278 100644 --- a/callbacks/popup/onPopupInvstdTypeOptional.m +++ b/callbacks/popup/onPopupInvstdTypeOptional.m @@ -27,8 +27,8 @@ function onPopupInvstdTypeOptional(src,~) % none % % See also: NUCLEUSinv -% Author: Thomas Hiller -% email: thomas.hiller[at]leibniz-liag.de +% Author: see AUTHORS.md +% email: see AUTHORS.md % License: MIT License (at end) %------------- BEGIN CODE -------------- @@ -135,6 +135,10 @@ function onPopupInvstdTypeOptional(src,~) data.invstd.regtype = 'auto'; data.invstd.lambda = -1; end + + case 'MUMO' + % # free distributions = value (1 to 4) + data.invstd.freeDT = value; end % update GUI data diff --git a/callbacks/popup/onPopupNMRNoiseType.m b/callbacks/popup/onPopupNMRNoiseType.m new file mode 100644 index 0000000..1d381d0 --- /dev/null +++ b/callbacks/popup/onPopupNMRNoiseType.m @@ -0,0 +1,92 @@ +function onPopupNMRNoiseType(src,~) +%onPopupNMRNoiseType selects the noise type to be aplied to the forward +%modelled NMR data +% +% Syntax: +% onPopupNMRNoiseType +% +% Inputs: +% src - handle of the calling object +% +% Outputs: +% none +% +% Example: +% onPopupNMRNoiseType(src,~) +% +% Other m-files required: +% clearSingleAxis.m +% updateCPSTable.m +% +% Subfunctions: +% none +% +% MAT-files required: +% none +% +% See also: NUCLEUSmod +% Author: see AUTHORS.md +% email: see AUTHORS.md +% License: MIT License (at end) + +%------------- BEGIN CODE -------------- + +%% get GUI handle and data +fig = findobj('Tag','MOD'); +data = getappdata(fig,'data'); +gui = getappdata(fig,'gui'); + +% get the value of the popup menu +value = get(src,'Value'); + +% change settings accordingly +switch value + case 1 % noise level + data.nmr.noisetype = 'level'; + if data.nmr.noise > 0 + data.nmr.noise = 1/data.nmr.noise; + end + case 2 % signal-to-noise ratio (SNR) + data.nmr.noisetype = 'SNR'; + if data.nmr.noise == 0 + data.nmr.noise = inf; + else + data.nmr.noise = 1/data.nmr.noise; + end +end +% update the corresponding edit field +set(gui.edit_handles.noise,'String',num2str(data.nmr.noise)); + +% update GUI data +setappdata(fig,'data',data); +% update NMR data (if available) +if isfield(data.results,'NMR') + updateNMRsignals; +end + +end + +%------------- END OF CODE -------------- + +%% License: +% MIT License +% +% Copyright (c) 2021 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. \ No newline at end of file diff --git a/callbacks/popup/onPopupPressureLoglin.m b/callbacks/popup/onPopupPressureLoglin.m index 6255b01..d752af6 100644 --- a/callbacks/popup/onPopupPressureLoglin.m +++ b/callbacks/popup/onPopupPressureLoglin.m @@ -25,8 +25,8 @@ function onPopupPressureLoglin(src,~) % none % % See also: NUCLEUSmod -% Author: Thomas Hiller -% email: thomas.hiller[at]leibniz-liag.de +% Author: see AUTHORS.md +% email: see AUTHORS.md % License: MIT License (at end) %------------- BEGIN CODE -------------- diff --git a/callbacks/popup/onPopupPressureUnits.m b/callbacks/popup/onPopupPressureUnits.m index 47cfcd3..48b3eb1 100644 --- a/callbacks/popup/onPopupPressureUnits.m +++ b/callbacks/popup/onPopupPressureUnits.m @@ -24,8 +24,8 @@ function onPopupPressureUnits(src,~) % none % % See also: NUCLEUSinv -% Author: Thomas Hiller -% email: thomas.hiller[at]leibniz-liag.de +% Author: see AUTHORS.md +% email: see AUTHORS.md % License: MIT License (at end) %------------- BEGIN CODE -------------- diff --git a/callbacks/push/onPushCPSTable.m b/callbacks/push/onPushCPSTable.m index 053dacf..b0160e9 100644 --- a/callbacks/push/onPushCPSTable.m +++ b/callbacks/push/onPushCPSTable.m @@ -24,8 +24,8 @@ function onPushCPSTable(src,~) % none % % See also: NUCLEUSinv -% Author: Thomas Hiller -% email: thomas.hiller[at]leibniz-liag.de +% Author: see AUTHORS.md +% email: see AUTHORS.md % License: MIT License (at end) %------------- BEGIN CODE -------------- diff --git a/callbacks/push/onPushRun.m b/callbacks/push/onPushRun.m index ebc1f02..8ad7eb4 100644 --- a/callbacks/push/onPushRun.m +++ b/callbacks/push/onPushRun.m @@ -27,8 +27,8 @@ function onPushRun(src,~) % calculateNMR % % See also: NUCLEUSinv -% Author: Thomas Hiller -% email: thomas.hiller[at]leibniz-liag.de +% Author: see AUTHORS.md +% email: see AUTHORS.md % License: MIT License (at end) %------------- BEGIN CODE -------------- diff --git a/callbacks/push/onPushShowHide.m b/callbacks/push/onPushShowHide.m index 898878e..78eb9cf 100644 --- a/callbacks/push/onPushShowHide.m +++ b/callbacks/push/onPushShowHide.m @@ -23,8 +23,8 @@ function onPushShowHide(src,~) % none % % See also: NUCLEUSinv -% Author: Thomas Hiller -% email: thomas.hiller[at]leibniz-liag.de +% Author: see AUTHORS.md +% email: see AUTHORS.md % License: MIT License (at end) %------------- BEGIN CODE -------------- diff --git a/callbacks/push/onPushStop.m b/callbacks/push/onPushStop.m index 25fa4ba..123b302 100644 --- a/callbacks/push/onPushStop.m +++ b/callbacks/push/onPushStop.m @@ -26,8 +26,8 @@ function onPushStop(src,~) % none % % See also: NUCLEUSinv -% Author: Thomas Hiller -% email: thomas.hiller[at]leibniz-liag.de +% Author: see AUTHORS.md +% email: see AUTHORS.md % License: MIT License (at end) %------------- BEGIN CODE -------------- diff --git a/callbacks/radio/onRadioGates.m b/callbacks/radio/onRadioGates.m index 876be07..51404ec 100644 --- a/callbacks/radio/onRadioGates.m +++ b/callbacks/radio/onRadioGates.m @@ -26,8 +26,8 @@ function onRadioGates(src,~) % none % % See also: NUCLEUSinv -% Author: Thomas Hiller -% email: thomas.hiller[at]leibniz-liag.de +% Author: see AUTHORS.md +% email: see AUTHORS.md % License: MIT License (at end) %------------- BEGIN CODE -------------- diff --git a/callbacks/radio/onRadioLorder.m b/callbacks/radio/onRadioLorder.m index b69dbd8..45a9f56 100644 --- a/callbacks/radio/onRadioLorder.m +++ b/callbacks/radio/onRadioLorder.m @@ -24,8 +24,8 @@ function onRadioLorder(src,~) % none % % See also: NUCLEUSinv -% Author: Thomas Hiller -% email: thomas.hiller[at]leibniz-liag.de +% Author: see AUTHORS.md +% email: see AUTHORS.md % License: MIT License (at end) %------------- BEGIN CODE -------------- diff --git a/callbacks/radio/onRadioNormalize.m b/callbacks/radio/onRadioNormalize.m index 12ed20b..bcaa50a 100644 --- a/callbacks/radio/onRadioNormalize.m +++ b/callbacks/radio/onRadioNormalize.m @@ -26,8 +26,8 @@ function onRadioNormalize(src,~) % none % % See also: NUCLEUSinv -% Author: Thomas Hiller -% email: thomas.hiller[at]leibniz-liag.de +% Author: see AUTHORS.md +% email: see AUTHORS.md % License: MIT License (at end) %------------- BEGIN CODE -------------- diff --git a/callbacks/radio/onRadioTimescale.m b/callbacks/radio/onRadioTimescale.m index d70df46..e0afa54 100644 --- a/callbacks/radio/onRadioTimescale.m +++ b/callbacks/radio/onRadioTimescale.m @@ -26,8 +26,8 @@ function onRadioTimescale(src,~) % none % % See also: NUCLEUSinv -% Author: Thomas Hiller -% email: thomas.hiller[at]leibniz-liag.de +% Author: see AUTHORS.md +% email: see AUTHORS.md % License: MIT License (at end) %------------- BEGIN CODE -------------- @@ -55,6 +55,7 @@ function onRadioTimescale(src,~) data.process.timefac = 1; data.invstd.time = data.invstd.time ./ 1000; data.invstd.Tbulk = data.invstd.Tbulk ./ 1000; + data.invstd.Tdiff = data.invstd.Tdiff ./ 1000; end case 'ms' @@ -63,6 +64,7 @@ function onRadioTimescale(src,~) data.process.timefac = 1000; data.invstd.time = data.invstd.time .* 1000; data.invstd.Tbulk = data.invstd.Tbulk .* 1000; + data.invstd.Tdiff = data.invstd.Tdiff .* 1000; end end diff --git a/doc/menu.html b/doc/menu.html index c55120a..1cd7e85 100644 --- a/doc/menu.html +++ b/doc/menu.html @@ -16,7 +16,7 @@onPopupNMRNoiseType selects the noise type to be aplied to the forward +modelled NMR data + + Syntax: + onPopupNMRNoiseType + + Inputs: + src - handle of the calling object + + Outputs: + none + + Example: + onPopupNMRNoiseType(src,~) + + Other m-files required: + clearSingleAxis.m + updateCPSTable.m + + Subfunctions: + none + + MAT-files required: + none + + See also: NUCLEUSmod + Author: see AUTHORS.md + email: see AUTHORS.md + License: MIT License (at end)
0001 function onPopupNMRNoiseType(src,~) +0002 %onPopupNMRNoiseType selects the noise type to be aplied to the forward +0003 %modelled NMR data +0004 % +0005 % Syntax: +0006 % onPopupNMRNoiseType +0007 % +0008 % Inputs: +0009 % src - handle of the calling object +0010 % +0011 % Outputs: +0012 % none +0013 % +0014 % Example: +0015 % onPopupNMRNoiseType(src,~) +0016 % +0017 % Other m-files required: +0018 % clearSingleAxis.m +0019 % updateCPSTable.m +0020 % +0021 % Subfunctions: +0022 % none +0023 % +0024 % MAT-files required: +0025 % none +0026 % +0027 % See also: NUCLEUSmod +0028 % Author: see AUTHORS.md +0029 % email: see AUTHORS.md +0030 % License: MIT License (at end) +0031 +0032 %------------- BEGIN CODE -------------- +0033 +0034 %% get GUI handle and data +0035 fig = findobj('Tag','MOD'); +0036 data = getappdata(fig,'data'); +0037 gui = getappdata(fig,'gui'); +0038 +0039 % get the value of the popup menu +0040 value = get(src,'Value'); +0041 +0042 % change settings accordingly +0043 switch value +0044 case 1 % noise level +0045 data.nmr.noisetype = 'level'; +0046 if data.nmr.noise > 0 +0047 data.nmr.noise = 1/data.nmr.noise; +0048 end +0049 case 2 % signal-to-noise ratio (SNR) +0050 data.nmr.noisetype = 'SNR'; +0051 if data.nmr.noise == 0 +0052 data.nmr.noise = inf; +0053 else +0054 data.nmr.noise = 1/data.nmr.noise; +0055 end +0056 end +0057 % update the corresponding edit field +0058 set(gui.edit_handles.noise,'String',num2str(data.nmr.noise)); +0059 +0060 % update GUI data +0061 setappdata(fig,'data',data); +0062 % update NMR data (if available) +0063 if isfield(data.results,'NMR') +0064 updateNMRsignals; +0065 end +0066 +0067 end +0068 +0069 %------------- END OF CODE -------------- +0070 +0071 %% License: +0072 % MIT License +0073 % +0074 % Copyright (c) 2021 Thomas Hiller +0075 % +0076 % Permission is hereby granted, free of charge, to any person obtaining a copy +0077 % of this software and associated documentation files (the "Software"), to deal +0078 % in the Software without restriction, including without limitation the rights +0079 % to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +0080 % copies of the Software, and to permit persons to whom the Software is +0081 % furnished to do so, subject to the following conditions: +0082 % +0083 % The above copyright notice and this permission notice shall be included in all +0084 % copies or substantial portions of the Software. +0085 % +0086 % THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +0087 % IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +0088 % FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +0089 % AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +0090 % LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +0091 % OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +0092 % SOFTWARE.