Skip to content

Commit

Permalink
see CHANGELOG
Browse files Browse the repository at this point in the history
  • Loading branch information
ThoHiller committed Feb 1, 2024
1 parent cfc0bc0 commit d792649
Show file tree
Hide file tree
Showing 94 changed files with 10,413 additions and 5,802 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog

## [0.2.0] - 2024-02-01

### Added
- New functionality to estimate the uncertainty of relaxation time distributions (RTDs) by using a simple bootstrapping method
- New sub GUI *UncertView* in **NUCLEUSinv** to process and evaluate the uncertainty data

### Fixed
- Fixed an issue when importing **NUCLEUSinv** session files older than version v.0.1.14 (there is a new general *T* field for *mono* and *N free exp. (2-5)* inversion results which was not initialized)
- Several minor improvements in GUI handling, usability and visualization.

## [0.1.14] - 2023-09-27

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

Initial Version

[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
[0.1.12]: https://github.com/ThoHiller/nmr-nucleus/compare/v.0.1.11...v.0.1.12
Expand Down
5 changes: 3 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.1.14';
myui.date = '27.09.2023';
myui.version = '0.2.0';
myui.date = '01.02.2024';
myui.author = {'Stephan Costabel','Thomas Hiller'};
myui.email = 'thomas.hiller[at]bgr.de';
myui.fontsize = 10;
Expand All @@ -65,6 +65,7 @@
data.process = defaults.process;
data.param = defaults.param;
data.invstd = defaults.invstd;
data.uncert = defaults.uncert;
data.calib = defaults.calib;
data.invjoint = defaults.invjoint;
data.pressure = defaults.pressure;
Expand Down
4 changes: 2 additions & 2 deletions NUCLEUSinv/NUCLEUSinv_createGUI.m
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,11 @@ 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 165 190 299];
myui.heights = [250 22 22 22 22; -1 109 165 221 299];
% panel header is always 22 high
set(gui.panels.main,'Heights',myui.heights(2,:),...
'MinimumHeights',[250 22 22 22 22]);
set(gui.left,'Heights',-1,'MinimumHeights',250+109+22+190+22);
set(gui.left,'Heights',-1,'MinimumHeights',250+109+22+221+22);

% 1. data panel
if wbon
Expand Down
3 changes: 3 additions & 0 deletions NUCLEUSinv/NUCLEUSinv_createMenus.m
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,9 @@
% 2.8 FixedTime VIEW
gui.menu.extra_fixedtime = uimenu(gui.menu.view,...
'Label','FixedTimeView GUI','Enable','off','Callback',@FixedTimeView);
% 2.9 Uncertainty VIEW
gui.menu.extra_uncert = uimenu(gui.menu.view,...
'Label','UncertView GUI','Enable','off','Callback',@UncertView);

%% 3. Extras
gui.menu.extra = uimenu(gui.figh,...
Expand Down
20 changes: 20 additions & 0 deletions NUCLEUSinv/NUCLEUSinv_createPanelInversionStd.m
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@
% RUN button
gui.panels.invstd.HBox6 = uix.HBox('Parent',gui.panels.invstd.VBox,...
'Spacing',3);
% RTD uncertainty
gui.panels.invstd.HBox7 = uix.HBox('Parent',gui.panels.invstd.VBox,...
'Spacing',3);

%% inversion method
gui.text_handles.invstd_InvType = uicontrol('Parent',gui.panels.invstd.HBox1,...
Expand Down Expand Up @@ -168,6 +171,21 @@
'Tag','std','UserData',1,'Callback',@onPushRun);
set(gui.panels.invstd.HBox6,'Widths',[200 -1]);

%% RTD uncertainty
gui.text_handles.uncert = uicontrol('Parent',gui.panels.invstd.HBox7,...
'Style','text','FontSize',myui.fontsize,'HorizontalAlignment','center',...
'String','RTD uncertainty | # models');
tstr = 'Number of uncertainty models to calculate.';
gui.edit_handles.uncert_N = uicontrol('Parent',gui.panels.invstd.HBox7,...
'Style','edit','String',num2str(data.uncert.N),...
'UserData',struct('Tooltipstr',tstr,'defaults',[data.uncert.N 1 1]),...
'Tag','uncert_N','FontSize',myui.fontsize,...
'Enable','off','Callback',@onEditValue);
gui.push_handles.uncert = uicontrol('Parent',gui.panels.invstd.HBox7,'Enable','off',...
'String','CALC.','FontSize',myui.fontsize,'BackGroundColor','g',...
'Tag','uncert','UserData',1,'Callback',@onPushRun);
set(gui.panels.invstd.HBox7,'Widths',[200 -1 -1]);

%% Java Hack to adjust vertical alignment of text fields
jh = findjobj(gui.text_handles.invstd_InvType);
jh.setVerticalAlignment(javax.swing.JLabel.CENTER);
Expand All @@ -181,6 +199,8 @@
jh.setVerticalAlignment(javax.swing.JLabel.CENTER);
jh = findjobj(gui.text_handles.invstd_run);
jh.setVerticalAlignment(javax.swing.JLabel.CENTER);
jh = findjobj(gui.text_handles.uncert);
jh.setVerticalAlignment(javax.swing.JLabel.CENTER);

return

Expand Down
7 changes: 7 additions & 0 deletions NUCLEUSinv/NUCLEUSinv_createPanelPlots.m
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,13 @@
gui.cm_handles.axes_rtd_view_cum = uimenu(gui.cm_handles.axes_rtd_view,...
'Label','cum','Tag','view','Callback',@onContextPlotsRTD);
set(gui.axes_handles.rtd,'UIContextMenu',gui.cm_handles.axes_rtd);
gui.cm_handles.axes_rtd_uncert = uimenu(gui.cm_handles.axes_rtd,...
'Label','uncert','Enable','off');
gui.cm_handles.axes_rtd_uncert_lines = uimenu(gui.cm_handles.axes_rtd_uncert,...
'Label','lines','Tag','uncert','Checked','on','Callback',@onContextPlotsRTD);
gui.cm_handles.axes_rtd_uncert_patch = uimenu(gui.cm_handles.axes_rtd_uncert,...
'Label','patch','Tag','uncert','Callback',@onContextPlotsRTD);
set(gui.axes_handles.rtd,'UIContextMenu',gui.cm_handles.axes_rtd);

%% 2.2 the PSD panel
gui.plots.Dist.PSD.box = uicontainer('Parent',gui.plots.Dist.PSDTab);
Expand Down
20 changes: 14 additions & 6 deletions NUCLEUSinv/NUCLEUSinv_loadDefaults.m
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@
out.info.RTDflag = 'freq';
out.info.PSDflag = 'freq';
out.info.PSDJflag = 'freq';
% plot switch for uncertainty line / patch plot
out.info.RTDuncert = 'lines';
% flags indicating expert mode / joint inversion / inversion info / tool
% tips
out.info.ExpertMode = 'off';
Expand All @@ -60,6 +62,8 @@
% re-sampling (gating) of the raw signal 'log' | 'lin' | 'none'
% depends on signal type 'T1' or 'T2'
out.process.gatetype = 'log';
% gateing flag for convenience
out.process.isgated = false;
% maximum number of echoes per gate
out.process.Nechoes = 50;
% normalize signal to 1 (no=0, yes=1)
Expand Down Expand Up @@ -135,12 +139,16 @@
% 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;
% uncertainty flag (intended for batch use)
out.uncert.use = 1;
% default uncertainty calculation method
out.uncert.Method = 'RMS_bound';
% uncertaintyx treshold (only need for method 'threshold')
out.uncert.Thresh = 0.05;
% number of uncertainty models to calculate
out.uncert.N = 10;
% number of unsuccesful tries before calculation stops
out.uncert.Max = 1e4;

%% joint inversion panel defaults
% joint inversion methods to choose 'free' | 'fixed' | 'shape'
Expand Down
44 changes: 42 additions & 2 deletions NUCLEUSinv/NUCLEUSinv_updateInterface.m
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,11 @@
gui = updateLambda(gui,data.invstd.regtype,0,0,0);
gui = updateLorder(gui,data.invstd.invtype,data.invstd.Lorder);
gui = updateInvstdTime(gui,data.invstd.invtype,0,0);

% RTD uncertainty
set(gui.edit_handles.uncert_N,'Enable','off',...
'String',num2str(data.uncert.N));
set(gui.push_handles.uncert,'Enable','off');

% Tbulk & Tdiff
set(gui.edit_handles.invstd_Tbulk,'Enable','off',...
Expand All @@ -108,6 +113,11 @@
gui = updateLambda(gui,data.invstd.regtype,0,0,0);
gui = updateLorder(gui,data.invstd.invtype,data.invstd.Lorder);
gui = updateInvstdTime(gui,data.invstd.invtype,0,0);

% RTD uncertainty
set(gui.edit_handles.uncert_N,'Enable','off',...
'String',num2str(data.uncert.N));
set(gui.push_handles.uncert,'Enable','off');

% Tbulk & Tdiff
set(gui.edit_handles.invstd_Tbulk,'Enable','off',...
Expand Down Expand Up @@ -148,7 +158,12 @@
gui = updateLorder(gui,data.invstd.invtype,data.invstd.Lorder);
gui = updateInvstdTime(gui,data.invstd.invtype,data.invstd.time,...
data.invstd.Ntime);


% RTD uncertainty
set(gui.edit_handles.uncert_N,'Enable','on',...
'String',num2str(data.uncert.N));
set(gui.push_handles.uncert,'Enable','on');

% Tbulk & Tdiff
set(gui.edit_handles.invstd_Tbulk,'Enable','on',...
'String',num2str(data.invstd.Tbulk));
Expand Down Expand Up @@ -180,6 +195,11 @@
gui = updateLorder(gui,data.invstd.invtype,data.invstd.Lorder);
gui = updateInvstdTime(gui,data.invstd.invtype,data.invstd.time,...
data.invstd.Ntime);

% RTD uncertainty
set(gui.edit_handles.uncert_N,'Enable','on',...
'String',num2str(data.uncert.N));
set(gui.push_handles.uncert,'Enable','on');

% Tbulk & Tdiff
set(gui.edit_handles.invstd_Tbulk,'Enable','on',...
Expand Down Expand Up @@ -208,6 +228,11 @@
% lambda, smoothness constraint and RTD limits
gui = updateLambda(gui,data.invstd.regtype,0,0,0);
gui = updateLorder(gui,data.invstd.invtype,data.invstd.Lorder);

% RTD uncertainty
set(gui.edit_handles.uncert_N,'Enable','on',...
'String',num2str(data.uncert.N));
set(gui.push_handles.uncert,'Enable','on');

% Tbulk & Tdiff
set(gui.edit_handles.invstd_Tbulk,'Enable','on',...
Expand Down Expand Up @@ -570,6 +595,11 @@
gui = updateLambda(gui,data.invstd.regtype,0,0,0);
gui = updateLorder(gui,data.invstd.invtype,data.invstd.Lorder);
gui = updateInvstdTime(gui,data.invstd.invtype,0,0);

% RTD uncertainty
set(gui.edit_handles.uncert_N,'Enable','off',...
'String',num2str(data.uncert.N));
set(gui.push_handles.uncert,'Enable','off');

% Tbulk & Tdiff
set(gui.edit_handles.invstd_Tbulk,'Enable','off',...
Expand All @@ -586,12 +616,17 @@
'Value',data.invstd.freeDT,...
'String',{'1','2','3','4','5'});
set(gui.text_handles.invstd_InvTypeOpt,...
'String','No. of relaxation decay times T');
'String','No. of free relaxation times T');

% lambda, smoothness constraint and RTD limits
gui = updateLambda(gui,data.invstd.regtype,0,0,0);
gui = updateLorder(gui,data.invstd.invtype,data.invstd.Lorder);
gui = updateInvstdTime(gui,data.invstd.invtype,0,0);

% RTD uncertainty
set(gui.edit_handles.uncert_N,'Enable','off',...
'String',num2str(data.uncert.N));
set(gui.push_handles.uncert,'Enable','off');

% Tbulk & Tdiff
set(gui.edit_handles.invstd_Tbulk,'Enable','off',...
Expand Down Expand Up @@ -631,6 +666,11 @@
'String',num2str(data.invstd.time(2)));
set(gui.edit_handles.invstd_Ntime,'Enable','off',...
'String',num2str(data.invstd.Ntime));

% RTD uncertainty
set(gui.edit_handles.uncert_N,'Enable','on',...
'String',num2str(data.uncert.N));
set(gui.push_handles.uncert,'Enable','on');

% Tbulk & Tdiff
set(gui.edit_handles.invstd_Tbulk,'Enable','on',...
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.1.14';
myui.date = '27.09.2023';
myui.version = '0.2.0';
myui.date = '01.02.2024';
myui.author = {'Stephan Costabel','Thomas Hiller'};
myui.email = 'thomas.hiller[at]bgr.de';
myui.fontsize = 10;
Expand Down
Loading

0 comments on commit d792649

Please sign in to comment.