Skip to content

Commit

Permalink
see CHANGELOG.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ThoHiller committed Mar 12, 2021
1 parent 33627cc commit 2086284
Show file tree
Hide file tree
Showing 78 changed files with 6,596 additions and 2,902 deletions.
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
# Changelog

## [0.1.11] - 2021-03-12

### Added
- New *ConductView* figure in **NUCLEUSinv** and **NUCLEUSmod** that shows the hydraulic conductivity and permeability
- New import routines to **NUCLEUSinv** for *IBAC* institute
- New parameter file values in **NUCLEUSinv** for the *BAM TOM* import

### Changed
- Changed the behavior of the *number of echoes per gate* field. Zero is no longer allowed and will be automatically set to 1
- Rearrangement of some menues regarding the *ConductView* implementation
- Restructured the import menu of **NUCLEUSinv** so that the *GGE* and *IBAC* institute are now in *RWTH*
- The y-axis label of the RTD and PSD plots in **NUCLEUSinv** now only shows *water content [vol %]* if the porosity is not 1. This is much more intuitive

### Fixed
- Fixed two import bugs for *LIAG single/project* data in **NUCLEUSinv** (time scale conversion and background signal treatment)
- Fixed output data when using the *LU* inversion in **NUCLEUSinv** (before the wrong kernel matrix was stored)
- Fixed an internal data managment bug when activating/deactivating the joint inversion options
- Fixed an issue regarding the use of only a single signal for the joint inversion and the inversion-geometry exhibits corners

## [0.1.10] - 2020-09-10

### Added
Expand Down Expand Up @@ -135,6 +154,7 @@

Initial Version

[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
[0.1.8]: https://github.com/ThoHiller/nmr-nucleus/compare/v.0.1.7...v.0.1.8
Expand Down
6 changes: 3 additions & 3 deletions NUCLEUSinv/NUCLEUSinv.m
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@
if ~isempty(h0); close(h0); end

%% GUI 'header' info and defaults
myui.version = '0.1.10';
myui.date = '10.09.2020';
myui.author = 'Thomas Hiller';
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.fontsize = 10;
myui.inifile = 'NUCLEUSinv.ini';
Expand Down
67 changes: 45 additions & 22 deletions NUCLEUSinv/NUCLEUSinv_createMenus.m
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,14 @@
% 1.1.1 Lab
gui.menu.file_import_lab = uimenu(gui.menu.file_import,...
'Label','Lab');

% 1.1.1.1 BAM
gui.menu.file_import_lab_bam = uimenu(gui.menu.file_import_lab,...
'Label','BAM');
% 1.1.1.1.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
gui.menu.file_import_lab_bgr = uimenu(gui.menu.file_import_lab,...
'Label','BGR');
Expand All @@ -65,33 +67,52 @@
% 1.1.1.2.3 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.3 CoreLab ascii
gui.menu.file_import_lab_corelab = uimenu(gui.menu.file_import_lab,...
'Label','CoreLab ascii','Tag','Lab','Callback',@onMenuImport);
% 1.1.1.4 LIAG

% 1.1.1.3 LIAG
gui.menu.file_import_lab_liag = uimenu(gui.menu.file_import_lab,...
'Label','LIAG');
% 1.1.1.4.1 LIAG
% 1.1.1.3.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.4.2 LIAG
% 1.1.1.3.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.5 MOUSE
gui.menu.file_import_lab_mouse = uimenu(gui.menu.file_import_lab,...
'Label','MOUSE','Tag','Lab','Callback',@onMenuImport);
% 1.1.1.6 RWTH

% 1.1.1.4 RWTH
gui.menu.file_import_lab_rwth = uimenu(gui.menu.file_import_lab,...
'Label','RWTH');
% 1.1.1.6.1 RWTH ascii
gui.menu.file_import_lab_rwth_ascii = uimenu(gui.menu.file_import_lab_rwth,...
'Label','RWTH ascii','Tag','Lab','Callback',@onMenuImport);
% 1.1.1.6.2 RWTH field
gui.menu.file_import_lab_rwth_field = uimenu(gui.menu.file_import_lab_rwth,...
'Label','RWTH field','Tag','Lab','Callback',@onMenuImport);
% 1.1.1.6.3 Dart
gui.menu.file_import_lab_rwth_dart = uimenu(gui.menu.file_import_lab_rwth,...
'Label','Dart','Tag','Lab','Callback',@onMenuImport);
% 1.1.1.4.1 IBAC
gui.menu.file_import_lab_ibac = uimenu(gui.menu.file_import_lab_rwth,...
'Label','IBAC');
% 1.1.1.4.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
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
gui.menu.file_import_lab_gge = uimenu(gui.menu.file_import_lab_rwth,...
'Label','GGE');
% 1.1.1.4.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
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
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
gui.menu.file_import_lab_other = uimenu(gui.menu.file_import_lab,...
'Label','OTHER');
% 1.1.1.5.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
gui.menu.file_import_lab_mouse = uimenu(gui.menu.file_import_lab_other,...
'Label','MOUSE','Tag','Lab','Callback',@onMenuImport);

% 1.1.2 Ascii
gui.menu.file_import_ascii = uimenu(gui.menu.file_import,...
Expand Down Expand Up @@ -262,13 +283,15 @@
'Label','AMP vs TLGM','Enable','off','Callback',@onMenuViewFigures);
% 2.5.5 relaxation time distribution over time
gui.menu.extra_graphics_rtd = uimenu(gui.menu.extra_graphics,...
'Label','RTD','Enable','off','Callback',@onMenuViewFigures);
'Label','RTD','Enable','off','Callback',@onMenuViewFigures);
end

% 2.6 PhaseView
gui.menu.extra_phaseview = uimenu(gui.menu.view,...
'Label','PhaseView GUI','Callback',@PhaseView);

'Label','PhaseView GUI','Enable','off','Callback',@PhaseView);
% 2.7 ConductVIEW -> hydraulic conductivity
gui.menu.extra_conduct = uimenu(gui.menu.view,...
'Label','ConductView GUI','Enable','off','Callback',@onMenuViewFigures);

%% 3. Extras
gui.menu.extra = uimenu(gui.figh,...
Expand Down
7 changes: 3 additions & 4 deletions NUCLEUSmod/NUCLEUSmod.m
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@
if ~isempty(h0); close(h0); end

%% GUI 'header' info and defaults
myui.version = '0.1.10';
myui.date = '10.09.2020';
myui.author = 'Thomas Hiller';
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.fontsize = 10;

Expand Down Expand Up @@ -76,7 +76,6 @@

%% Calculate Initial Geometry
calculateGeometry;

end

%------------- END OF CODE --------------
Expand Down
4 changes: 4 additions & 0 deletions NUCLEUSmod/NUCLEUSmod_createMenus.m
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@
% 2.2 Figure Toolbar
gui.menu.view_toolbar = uimenu(gui.menu.view,...
'Label','Figure Toolbar','Callback',@onMenuView);
% 2.3 hydraulic conductivity
gui.menu.view_conduct = uimenu(gui.menu.view,...
'Label','ConductView GUI','Separator','on','Enable','off',...
'Callback',@onMenuViewFigures);

%% 3. Color theme
gui.menu.color_theme = uimenu(gui.figh,...
Expand Down
4 changes: 2 additions & 2 deletions NUCLEUSmod/NUCLEUSmod_createPanelCPS.m
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
%% pressure range and number of total points
gui.text_handles.press_range = uicontrol('Parent',gui.panels.cps.HBox3,...
'Style','text','FontSize',myui.fontsize,'HorizontalAlignment','center',...
'String','pressure - min | max | total steps');
'String','pressure - min | max | # steps');
tstr = ['<HTML>Set minimum pressure value<br><br>',...
'<u>Default value:</u><br>',...
'<b>1000 Pa</b><br>'];
Expand Down Expand Up @@ -142,7 +142,7 @@
set(gui.panels.cps.HBox4,'Widths',[200 -1]);

%% drainage & imbibition lists
tstr = ['<HTML>Choose <b>drainage</b> and <b>drainage</b> saturation levels for NMR forward calculation.<br><br>',...
tstr = ['<HTML>Choose <b>drainage</b> and <b>imbibition</b> saturation levels for NMR forward calculation.<br><br>',...
'<u>Hint:</u><br>',...
'You can select multiple values with a context menu.<br>'];
gui.cm_handles.select = uicontextmenu(gui.figh);
Expand Down
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ I tested it successfully under Windows 7 (64bit) and 10 (64bit) with Matlab R201
1. It is recommended to install the GUI Layout Toolbox directly into MATLAB<sup>TM</sup> via the mltbx-file (but it should also work via the old-school way of adding the toolbox folders to the MATLAB<sup>TM</sup> path)
2. To use **NUCLEUS** you just need to place the `nucleus` folder from the git repository on your hard drive and use the start scripts `startNUCLEUSinv` and `startNUCLEUSmod`, respectively (within these scripts all necessary **NUCLEUS** folders are added to the MATLAB<sup>TM</sup> path)

**NOTE:** It is recommended to have only *one* version of **NUCLEUS** on your current MATLAB<sup>TM</sup> path.

- - -
<a name="usage"></a>
### Usage
Expand Down Expand Up @@ -106,12 +108,13 @@ 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. (2020, September 10). ThoHiller/nmr-nucleus: v0.1.10 (Version v0.1.10). Zenodo. [https://doi.org/10.5281/zenodo.4022195]
Thomas Hiller. (2021, March 12). ThoHiller/nmr-nucleus: v0.1.11 (Version v0.1.11). 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)
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)

- - -
<p style="text-align: center;"> MATLAB is a registered trademark of The Mathworks, Inc. </p>
41 changes: 20 additions & 21 deletions callbacks/edits/onEditValue.m
Original file line number Diff line number Diff line change
Expand Up @@ -83,40 +83,39 @@ function onEditValue(src,~)
% switch depending on the parent panel
switch out.panel
case 'process'
% remove temporary data fields
data = removeInversionFields(data);
setappdata(fig,'data',data);
% process the current selected signal
id = get(gui.listbox_handles.signal,'Value');
switch out.field
case {'start','Nechoes'}
% remove temporary data fields
data = removeInversionFields(data);
setappdata(fig,'data',data);
% process the current selected signal
id = get(gui.listbox_handles.signal,'Value');
processNMRDataControl(fig,id);
updatePlotsSignal;
updateInfo(src);
% clear axes
clearSingleAxis(gui.axes_handles.rtd);
clearSingleAxis(gui.axes_handles.psd);
% set focus on data
set(gui.plots.SignalPanel,'Selection',1);
case {'Nechoes'}
if value == 0
data.process.Nechoes = 1;
set(src,'String',num2str(data.process.Nechoes));
setappdata(fig,'data',data);
end
case 'end'
% remove temporary data fields
data = removeInversionFields(data);
setappdata(fig,'data',data);
% check if the first sample is really smaller than
% the last one; if not reset everything
first = str2double(get(gui.edit_handles.process_start,'String'));
last = value;
id = get(gui.listbox_handles.signal,'Value');
maxL = length(data.import.NMR.data{id}.signal);
if last == 0 || last <= first || last > maxL
data.process.end = maxL;
set(src,'String',num2str(data.process.end));
setappdata(fig,'data',data);
end
% process the current selected signal
processNMRDataControl(fig,id);
updatePlotsSignal;
end
% process the current selected signal
processNMRDataControl(fig,id);
updatePlotsSignal;
updateInfo(src);
% clear axes
clearSingleAxis(gui.axes_handles.rtd);
clearSingleAxis(gui.axes_handles.psd);
% set focus on data
set(gui.plots.SignalPanel,'Selection',1);
case 'param'
switch out.field
case {'rho','a','CBWcutoff','BVIcutoff'}
Expand Down
2 changes: 1 addition & 1 deletion callbacks/menus/onMenuHelp.m
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ function onMenuHelp(src,~)
header{1,1} = 'NUCLEUSmod:';
end
header{end+1,1} = ' ';
header{end+1,1} = ['author: ',gui.myui.author];
header{end+1,1} = ['authors: ',gui.myui.author{1},', ',gui.myui.author{2}];
header{end+1,1} = ' ';
header{end+1,1} = ['version: ',gui.myui.version];
header{end+1,1} = ' ';
Expand Down
17 changes: 13 additions & 4 deletions callbacks/menus/onMenuImport.m
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ function onMenuImport(src,~)
%% get GUI handle and data
fig = ancestor(src,'figure','toplevel');
fig_tag = get(fig,'Tag');
gui = getappdata(fig,'gui');

label = get(src,'Label');
menu_tag = get(src,'Tag');
Expand All @@ -53,19 +54,27 @@ function onMenuImport(src,~)
case 'NUCLEUSinv'
importINV2INV(src);
case 'NUCLEUSmod'
importMOD2INV(src);
importMOD2INV(src);
case 'Excel'
importEXCELdata(src);
case 'Ascii'
importASCIIdata(src);
case 'Lab'
importNMRdata(src);
otherwise
helpdlg({'function: onMenuImport','Menu tag no known.'},...
helpdlg({'function: onMenuImport','Menu tag not known.'},...
'menu not known')
end
% update the "last import" value within the ini-file
gui = getappdata(fig,'gui');

% activate the PhaseView GUI in case real data is imported
switch menu_tag
case {'NUCLEUSinv','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
gui.myui.inidata.lastimport = [menu_tag,'_',label];
setappdata(fig,'gui',gui);
gui = makeINIfile(gui,'update');
Expand Down
7 changes: 5 additions & 2 deletions callbacks/menus/onMenuJointInversion.m
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,16 @@ function onMenuJointInversion(src,~)

% clear axes
clearSingleAxis(gui.axes_handles.all);
clearSingleAxis(gui.axes_handles.err_joint);
clearSingleAxis(gui.axes_handles.psdj);
clearSingleAxis(gui.axes_handles.cps);

% menu entries
set(gui.menu.extra_joint,'Checked','off');
set(gui.menu.extra_joint_rhobounds,'Enable','off');
set(gui.menu.file_export_data_invjoint_mat,'Enable','off');

set(gui.menu.file_export_data_invjoint_mat,'Enable','off');
set(gui.menu.extra_conduct,'Enable','off');

% settings panel
set(gui.popup_handles.invjoint_InvType,'Enable','off');
set(gui.popup_handles.invjoint_geometry_type,'Enable','off');
Expand Down Expand Up @@ -181,6 +183,7 @@ function onMenuJointInversion(src,~)
end

setappdata(fig,'data',data);
setappdata(fig,'INVdata',INVdata);
setappdata(fig,'gui',gui);
NUCLEUSinv_updateInterface;
updateStatusInformation(fig);
Expand Down
2 changes: 2 additions & 0 deletions callbacks/menus/onMenuViewFigures.m
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ function onMenuViewFigures(src,~)
showExtraGraphics('ampvst');
case 'RTD'
showExtraGraphics('rtd');
case 'ConductView GUI'
ConductView(src);
end

end
Expand Down
Loading

0 comments on commit 2086284

Please sign in to comment.