Skip to content

Commit

Permalink
Added
Browse files Browse the repository at this point in the history
- New sub GUI 2DInv in NUCLEUSinv for 2D T1-T2 inversion (works so far for HELIOS, DART and JAVELIN (Vista Clara) and RockCoreAnalyzer (Magritek) data)
- New import routines in NUCLEUSinv for the NMR Dart Logging tool
- New Extra menu entry in NUCLEUSinv to find duplicate NMR signals in the file list
- New fitting options in the PhaseView sub GUI of NUCLEUSinv

Changed
- Unified the appearance along several sub GUIs for consistency
- Updated the wait bar increments for very long batch runs
- When HELIOS data is imported, the user can now decide if several files should be stacked together

Fixed
- Fixed a bug when importing data and the Statistics Toolbox is not available
  • Loading branch information
ThoHiller committed Nov 27, 2024
1 parent 9408835 commit 0ec7056
Show file tree
Hide file tree
Showing 147 changed files with 21,188 additions and 8,030 deletions.
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# Changelog

## [0.3.0] - 2024-11-27

### Added
- New sub GUI *2DInv* in **NUCLEUSinv** for 2D T1-T2 inversion (works so far for HELIOS, DART and JAVELIN (Vista Clara) and RockCoreAnalyzer (Magritek) data)
- New import routines in **NUCLEUSinv** for the NMR Dart Logging tool
- New *Extra* menu entry in **NUCLEUSinv** to find duplicate NMR signals in the file list
- New fitting options in the *PhaseView* sub GUI of **NUCLEUSinv**

### Changed
- Unified the appearance along several sub GUIs for consistency
- Updated the wait bar increments for very long batch runs
- When *HELIOS* data is imported, the user can now decide if several files should be stacked together

### Fixed
- Fixed a bug when importing data and the Statistics Toolbox is not available

## [0.2.1] - 2024-02-11

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

Initial Version

[0.3.0]: https://github.com/ThoHiller/nmr-nucleus/compare/v.0.2.1...v.0.3.0
[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
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.2.1';
myui.date = '11.02.2024';
myui.version = '0.3.0';
myui.date = '27.11.2024';
myui.author = {'Stephan Costabel','Thomas Hiller'};
myui.email = 'thomas.hiller[at]bgr.de';
myui.fontsize = 10;
Expand Down Expand Up @@ -68,6 +68,7 @@
data.uncert = defaults.uncert;
data.calib = defaults.calib;
data.invjoint = defaults.invjoint;
data.inv2D = defaults.inv2D;
data.pressure = defaults.pressure;
gui.myui = myui;

Expand Down
81 changes: 56 additions & 25 deletions NUCLEUSinv/NUCLEUSinv_createMenus.m
Original file line number Diff line number Diff line change
Expand Up @@ -48,88 +48,108 @@
gui.menu.file_import_lab = uimenu(gui.menu.file_import,...
'Label','Lab');

% 1.1.1.1 BAM
% 1.1.1.1 AARHUS
gui.menu.file_import_lab_aarhus = uimenu(gui.menu.file_import_lab,...
'Label','AARHUS');
% 1.1.1.1.1 AARHUS Dart T1T2
gui.menu.file_import_lab_aarhus_dartT1T2 = uimenu(gui.menu.file_import_lab_aarhus,...
'Label','Dart T1T2','Tag','Lab','Callback',@onMenuImport);
% 1.1.1.1.2 AARHUS Dart T2 logging
gui.menu.file_import_lab_aarhus_dartT2 = uimenu(gui.menu.file_import_lab_aarhus,...
'Label','Dart T2 logging','Tag','Lab','Callback',@onMenuImport);

% 1.1.1.2 BAM
gui.menu.file_import_lab_bam = uimenu(gui.menu.file_import_lab,...
'Label','BAM');
% 1.1.1.1.1 BAM TOM
% 1.1.1.2.1 BAM TOM
gui.menu.file_import_lab_bam_tom = uimenu(gui.menu.file_import_lab_bam,...
'Label','BAM TOM','Tag','Lab','Callback',@onMenuImport);

% 1.1.1.2 BGR
% 1.1.1.3 BGR
gui.menu.file_import_lab_bgr = uimenu(gui.menu.file_import_lab,...
'Label','BGR');
% 1.1.1.2.1 BGR std
% 1.1.1.3.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 mat
% 1.1.1.3.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
% 1.1.1.3.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, all data subfolders from t1test,...
% 1.1.1.3.4 Mouse plus Lift, all data subfolders from t1test,...
% cpmgfastautotest, or (old Prospa Versions) cpmgfastauto
gui.menu.file_import_lab_bgr_mouse_lift = uimenu(gui.menu.file_import_lab_bgr,...
'Label','MouseLift','Tag','Lab','Callback',@onMenuImport);
% 1.1.1.2.5 Helios CPMG standard data, single subfolders with individual data files
% 1.1.1.3.5 Helios CPMG standard data, single subfolders with individual data files
gui.menu.file_import_lab_bgr_helios_cpmg = uimenu(gui.menu.file_import_lab_bgr,...
'Label','HeliosCPMG','Tag','Lab','Callback',@onMenuImport);
% 1.1.1.2.6 Helios series of CPMG data, several files of a series in the target
% 1.1.1.3.6 Helios series of CPMG data, several files of a series in the target
% folder, as used e.g. for T1 measurements
gui.menu.file_import_lab_bgr_helios_series = uimenu(gui.menu.file_import_lab_bgr,...
'Label','HeliosSeries','Tag','Lab','Callback',@onMenuImport);

% 1.1.1.3 LIAG
% 1.1.1.4 LIAG
gui.menu.file_import_lab_liag = uimenu(gui.menu.file_import_lab,...
'Label','LIAG');
% 1.1.1.3.1 LIAG
% 1.1.1.4.1 LIAG
gui.menu.file_import_lab_liag_single = uimenu(gui.menu.file_import_lab_liag,...
'Label','LIAG single','Tag','Lab','Callback',@onMenuImport);
% 1.1.1.3.2 LIAG
% 1.1.1.4.2 LIAG
gui.menu.file_import_lab_liag_project = uimenu(gui.menu.file_import_lab_liag,...
'Label','LIAG from project','Tag','Lab','Callback',@onMenuImport);
% 1.1.1.3.3 LIAG
% 1.1.1.4.3 LIAG
gui.menu.file_import_lab_liag_core = uimenu(gui.menu.file_import_lab_liag,...
'Label','LIAG core','Tag','Lab','Callback',@onMenuImport);

% 1.1.1.4 RWTH
% 1.1.1.5 RUTGERS
gui.menu.file_import_lab_rutgers = uimenu(gui.menu.file_import_lab,...
'Label','RUTGERS');
% 1.1.1.5.1 RUTGERS
gui.menu.file_import_lab_rutgers_T1T2 = uimenu(gui.menu.file_import_lab_rutgers,...
'Label','RoCA T1T2','Tag','Lab','Callback',@onMenuImport);

% 1.1.1.6 RWTH
gui.menu.file_import_lab_rwth = uimenu(gui.menu.file_import_lab,...
'Label','RWTH');
% 1.1.1.4.1 IBAC
% 1.1.1.6.1 IBAC
gui.menu.file_import_lab_ibac = uimenu(gui.menu.file_import_lab_rwth,...
'Label','IBAC');
% 1.1.1.4.1.1 IBAC
% 1.1.1.6.1.1 IBAC
gui.menu.file_import_lab_ibac_pm5 = uimenu(gui.menu.file_import_lab_ibac,...
'Label','PM5','Tag','Lab','Callback',@onMenuImport);
% 1.1.1.4.1.2 IBAC
% 1.1.1.6.1.2 IBAC
gui.menu.file_import_lab_ibac_pm25 = uimenu(gui.menu.file_import_lab_ibac,...
'Label','PM25','Tag','Lab','Callback',@onMenuImport);

% 1.1.1.4.2 GGE
% 1.1.1.6.2 GGE
gui.menu.file_import_lab_gge = uimenu(gui.menu.file_import_lab_rwth,...
'Label','GGE');
% 1.1.1.4.2.1 GGE ascii
% 1.1.1.6.2.1 GGE ascii
gui.menu.file_import_lab_gge_ascii = uimenu(gui.menu.file_import_lab_gge,...
'Label','GGE ascii','Tag','Lab','Callback',@onMenuImport);
% 1.1.1.4.2.2 GGE field
% 1.1.1.6.2.2 GGE field
gui.menu.file_import_lab_gge_field = uimenu(gui.menu.file_import_lab_gge,...
'Label','GGE field','Tag','Lab','Callback',@onMenuImport);
% 1.1.1.4.2.3 GGE Dart
% 1.1.1.6.2.3 GGE Dart
gui.menu.file_import_lab_gge_dart = uimenu(gui.menu.file_import_lab_gge,...
'Label','GGE Dart','Tag','Lab','Callback',@onMenuImport);

% 1.1.1.5 OTHER
% 1.1.1.7 OTHER
gui.menu.file_import_lab_other = uimenu(gui.menu.file_import_lab,...
'Label','OTHER');
% 1.1.1.5.1 CoreLab ascii
% 1.1.1.7.1 CoreLab ascii
gui.menu.file_import_lab_corelab = uimenu(gui.menu.file_import_lab_other,...
'Label','CoreLab ascii','Tag','Lab','Callback',@onMenuImport);
% 1.1.1.5.2 MOUSE
% 1.1.1.7.2 MOUSE
gui.menu.file_import_lab_mouse = uimenu(gui.menu.file_import_lab_other,...
'Label','MOUSE','Tag','Lab','Callback',@onMenuImport);
% 1.1.1.5.3 DART (University of Vienna)
% 1.1.1.7.3 DART (University of Vienna)
gui.menu.file_import_lab_dart = uimenu(gui.menu.file_import_lab_other,...
'Label','DART','Tag','Lab','Callback',@onMenuImport);
% 1.1.1.7.4 DART (incl. Burst echoes)
gui.menu.file_import_lab_dartburst = uimenu(gui.menu.file_import_lab_other,...
'Label','DART (+Burst)','Tag','Lab','Callback',@onMenuImport);

% 1.1.2 Ascii
gui.menu.file_import_ascii = uimenu(gui.menu.file_import,...
Expand Down Expand Up @@ -167,6 +187,9 @@
% 1.1.5.2 NUCLEUSmod from GUI
gui.menu.file_import_nmrmod_gui = uimenu(gui.menu.file_import_nmrmod,....
'Label','GUI','Tag','NUCLEUSmod','Callback',@onMenuImport);
% 1.1.5.3 NUCLEUSmod from 2D GUI
gui.menu.file_import_nmrmod_gui2d = uimenu(gui.menu.file_import_nmrmod,....
'Label','2D GUI','Tag','NUCLEUSmod2d','Callback',@onMenuImport);

% 1.2 Export
gui.menu.file_export = uimenu(gui.menu.file,...
Expand Down Expand Up @@ -318,6 +341,9 @@
% 2.9 UncertaintyVIEW GUI
gui.menu.extra_uncert = uimenu(gui.menu.view,...
'Label','UncertView GUI','Enable','off','Callback',@onMenuSubGUIs);
% 2.9 2DInv GUI
gui.menu.extra_T1T2map = uimenu(gui.menu.view,...
'Label','2DInv GUI','Enable','off','Callback',@onMenuSubGUIs);

%% 3. Extras
gui.menu.extra = uimenu(gui.figh,...
Expand Down Expand Up @@ -374,6 +400,11 @@
'Label','Surface relaxivity bounds','Enable','off',...
'Callback',@onMenuExtraRhoBounds);

% 3.6 find duplicate data
gui.menu.extra_find_duplicates = uimenu(gui.menu.extra,...
'Label','Find duplicate signals','Enable','on',...
'Callback',@onMenuExtraFindDuplicates);


%% 4. Color theme
gui.menu.color_theme = uimenu(gui.figh,...
Expand Down
2 changes: 1 addition & 1 deletion NUCLEUSinv/NUCLEUSinv_createPanelInversionStd.m
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@
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]);
set(gui.panels.invstd.HBox7,'Widths',[200 -1 -2]);

%% Java Hack to adjust vertical alignment of text fields
jh = findjobj(gui.text_handles.invstd_InvType);
Expand Down
59 changes: 59 additions & 0 deletions NUCLEUSinv/NUCLEUSinv_loadDefaults.m
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,65 @@
% corresponding scale factors - 1 | 1e-3 | 1e-6 | 1e-5
out.pressure.unitfac = 1;

%% 2D inversion GUI settings
% system / fluid properties
% diffusion coefficient [m²/s]
out.inv2D.prop.D = 2.025e-9;
% gradient [T/m]
out.inv2D.prop.G0 = 0;
% echo time [s]
out.inv2D.prop.te = 200e-6;
% start echo
out.inv2D.prop.first = 1;
% last echo
out.inv2D.prop.last = 1;

% inversion settings
% IR/SR factor
out.inv2D.inv.T1IRfac = 2;
% IR kernel type (1 or 2)
out.inv2D.inv.IRtype = 1;
% T1 range minimum [s]
out.inv2D.inv.T1min = 1e-4;
% T1 range maximum [s]
out.inv2D.inv.T1max = 10;
% T1 number of points in range
out.inv2D.inv.T1N = 51;
% T2 range minimum [s]
out.inv2D.inv.T2min = 1e-4;
% T2 range maximum [s]
out.inv2D.inv.T2max = 10;
% T2 number of points in range
out.inv2D.inv.T2N = 51;
% T1 regularization parameter lambda
out.inv2D.inv.T1lambda = 5;
% T1 order of smoothness constraint
out.inv2D.inv.T1order = 1;
% T2 regularization parameter lambda
out.inv2D.inv.T2lambda = 2;
% T2 order of smoothness constraint
out.inv2D.inv.T2order = 1;

% information settings / properties
% T1 minimum [s]
out.inv2D.info.T1min = 1e-3;
% T1 maximum [s]
out.inv2D.info.T1max = 1;
% T2 minimum [s]
out.inv2D.info.T2min = 1e-3;
% T2 minimum [s]
out.inv2D.info.T2max = 1;
% initial amplitude E0 [a.u.]
out.inv2D.info.E0 = 0;
% T1 log mean time
out.inv2D.info.T1tlgm = 0;
% T2 log mean time
out.inv2D.info.T2tlgm = 0;
% T1 maximum time
out.inv2D.info.T1tmax = 0;
% T2 maximum time
out.inv2D.info.T2tmax = 0;

return

%------------- END OF CODE --------------
Expand Down
5 changes: 3 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.1';
myui.date = '11.02.2024';
myui.version = '0.3.0';
myui.date = '27.11.2024';
myui.author = {'Stephan Costabel','Thomas Hiller'};
myui.email = 'thomas.hiller[at]bgr.de';
myui.fontsize = 10;
Expand All @@ -65,6 +65,7 @@
data.geometry = defaults.geometry;
data.pressure = defaults.pressure;
data.nmr = defaults.nmr;
data.mod2D = defaults.mod2D;
gui.myui = myui;

% save the data struct within the GUI
Expand Down
8 changes: 6 additions & 2 deletions NUCLEUSmod/NUCLEUSmod_createMenus.m
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,13 @@
% 2.2 Figure Toolbar
gui.menu.view_toolbar = uimenu(gui.menu.view,...
'Label','Figure Toolbar','Callback',@onMenuView);
% 2.3 hydraulic conductivity
% 2.3 2D modelling GUI
gui.menu.view_2dmod = uimenu(gui.menu.view,...
'Label','2DMod GUI','Separator','on','Enable','on',...
'Callback',@onMenuSubGUIs);
% 2.4 hydraulic conductivity
gui.menu.view_conduct = uimenu(gui.menu.view,...
'Label','ConductView GUI','Separator','on','Enable','off',...
'Label','ConductView GUI','Enable','off',...
'Callback',@onMenuSubGUIs);

%% 3. Color theme
Expand Down
1 change: 0 additions & 1 deletion NUCLEUSmod/NUCLEUSmod_createPanelNMR.m
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@
set(gui.panels.nmr.HBox3,'Widths',[200 -1]);

%% noise & porosity

tstr = ['<HTML>NMR data noise method.<br><br>',...
'A noise level will be used globally for all NMR signals.<br>',...
'A signal-to-ratio will be used individually on every single NMR signal.<br><br>',...
Expand Down
51 changes: 51 additions & 0 deletions NUCLEUSmod/NUCLEUSmod_loadDefaults.m
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,57 @@
% use linear y-axes as default (log=1, lin=2)
out.nmr.logliny = 2;

%% 2D settings
% system / fluid properties
% diffusion coefficient [m²/s]
out.mod2D.prop.D = 2.025e-9;
% gradient [T/m]
out.mod2D.prop.G0 = 0;
% echo time [s]
out.mod2D.prop.te = 0;
% bulk relaxation [s]
out.mod2D.prop.Tbulk = 1e6;

% model space settings
% 2D type
out.mod2D.mod.type = 'T1T2';
% T1 range minimum [s]
out.mod2D.mod.T1min = 1e-4;
% T1 range maximum [s]
out.mod2D.mod.T1max = 10;
% T1 number of points in range
out.mod2D.mod.T1N = 151;
% T2 range minimum [s]
out.mod2D.mod.T2min = 1e-4;
% T2 range maximum [s]
out.mod2D.mod.T2max = 10;
% T2 number of points in range
out.mod2D.mod.T2N = 151;

% number of 2D distribution
out.mod2D.mod.Ndist = 3;
% center point of 2D distribution
out.mod2D.mod.mu = [1 1;0.01 0.03;0.5 0.005];
% covariance matrix of 2D distribution
out.mod2D.mod.sigma{1} = [0.1 0;0 0.1];
out.mod2D.mod.sigma{2} = [0.2 0.3;0 0.2];
out.mod2D.mod.sigma{3} = [0.3 0;0 0.01];
% amplitude of 2D distribution
out.mod2D.mod.amp = [1 1 1];

% NMR data
out.mod2D.nmr.T1IRfac = 2;
out.mod2D.nmr.IRtype = 1;
out.mod2D.nmr.T1trmin = 1e-3;
out.mod2D.nmr.T1trmax = 1;
out.mod2D.nmr.T1trN = 21;
out.mod2D.nmr.T2te = 200e-6;
out.mod2D.nmr.T2teN = 500;
% noise creation type 'level' or 'SNR'
out.mod2D.nmr.noisetype = 'level';
% noise level [0:1] or SNR [-]
out.mod2D.nmr.noise = 0;

return

%------------- END OF CODE --------------
Expand Down
Loading

0 comments on commit 0ec7056

Please sign in to comment.