diff --git a/Parser/readWQMdat.m b/Parser/readWQMdat.m index ac3531482..532042a6e 100644 --- a/Parser/readWQMdat.m +++ b/Parser/readWQMdat.m @@ -173,11 +173,11 @@ % % This array contains the column headers which must be in the input file. % - required = { + required = upper({ 'SN', 'WQM-SN' 'MMDDYY', 'MM/DD/YY' 'HHMMSS', 'HH:MM:SS' - }; + }); % open file, get header and use it to generate a % format string which we can pass to textscan @@ -292,19 +292,19 @@ data = samples{k-1}; % some fields are not in IMOS uom - scale them so that they are - switch fields{k} + switch upper(fields{k}) % WQM provides conductivity S/m; exactly like we want it to be! % WQM can provide Dissolved Oxygen in mmol/m3, % hopefully 1 mmol/m3 = 1 umol/l % exactly like we want it to be! - case 'DO(mmol/m^3)' % DOX1_1 + case upper('DO(mmol/m^3)') % DOX1_1 comment = 'Originally expressed in mmol/m3, 1l = 0.001m3 was assumed.'; isUmolPerL = true; % convert dissolved oxygen in ml/l to umol/l - case 'DO(ml/l)' % DOX1_2 + case upper('DO(ml/l)') % DOX1_2 comment = 'Originally expressed in ml/l, 1ml/l = 44.660umol/l was assumed.'; isUmolPerL = true; @@ -318,7 +318,7 @@ data = data .* 44.660; % convert dissolved oxygen in mg/L to umol/l. - case 'DO(mg/l)' % DOX1_3 + case upper('DO(mg/l)') % DOX1_3 data = data * 44.660/1.429; % O2 density = 1.429 kg/m3 comment = 'Originally expressed in mg/l, O2 density = 1.429kg/m3 and 1ml/l = 44.660umol/l were assumed.'; isUmolPerL = true; @@ -339,7 +339,7 @@ sample_data.variables{end}.comment = comment; % WQM uses SeaBird pressure sensor - if strncmp('PRES_REL', sample_data.variables{k-3}.name, 8) + if strncmp('PRES_REL', sample_data.variables{end}.name, 8) % let's document the constant pressure atmosphere offset previously % applied by SeaBird software on the absolute presure measurement sample_data.variables{end}.applied_offset = sample_data.variables{end}.typeCastFunc(-14.7*0.689476); @@ -438,8 +438,8 @@ iThere = false(size(required, 1), 1); jThere = 1; for j=1:size(required, 2) - if sum(ismember(required(:,j), fields)) > sum(iThere) - iThere = ismember(required(:,j), fields); + if sum(ismember(required(:,j), upper(fields))) > sum(iThere) + iThere = ismember(required(:,j), upper(fields)); jThere = j; end if all(iThere) @@ -470,14 +470,14 @@ format = ''; % WQM column, if present -if strcmp('WQM', fields{1}) +if strcmpi('WQM', fields{1}) format = 'WQM '; fields(1) = []; end % serial and time/date % try to take into account files with State variable included -if strcmp('State',fields{2}) +if strcmpi('State', fields{2}) switch jThere case 2 nChar = 17; @@ -528,7 +528,7 @@ entry = {}; for k = 1:length(params) - if strcmp(params{k}{1}, field) + if strcmpi(params{k}{1}, field) entry = params{k}; break; end @@ -550,7 +550,7 @@ for k = 1:length(params) - if strcmp(params{k}{1}, field) + if strcmpi(params{k}{1}, field) supported = true; break; end diff --git a/Parser/readWQMraw.m b/Parser/readWQMraw.m index 46d8a187d..0641f6571 100644 --- a/Parser/readWQMraw.m +++ b/Parser/readWQMraw.m @@ -249,10 +249,10 @@ sample_data.variables{end}.comment = comment; % WQM uses SeaBird pressure sensor - if strncmp('PRES_REL', sample_data.variables{k}.name, 8) + if strncmp('PRES_REL', sample_data.variables{end}.name, 8) % let's document the constant pressure atmosphere offset previously % applied by SeaBird software on the absolute presure measurement - sample_data.variables{k}.applied_offset = sample_data.variables{k}.typeCastFunc(-14.7*0.689476); + sample_data.variables{end}.applied_offset = sample_data.variables{end}.typeCastFunc(-14.7*0.689476); end end diff --git a/imosToolbox.m b/imosToolbox.m index 70ee2f423..87e129c98 100644 --- a/imosToolbox.m +++ b/imosToolbox.m @@ -73,7 +73,7 @@ function imosToolbox(auto, varargin) end % Set current toolbox version -toolboxVersion = ['2.5.14 - ' computer]; +toolboxVersion = ['2.5.15 - ' computer]; switch auto case 'auto', autoIMOSToolbox(toolboxVersion, varargin{:}); diff --git a/imosToolbox_Linux64.bin b/imosToolbox_Linux64.bin index ce6af4aac..943b6248e 100755 Binary files a/imosToolbox_Linux64.bin and b/imosToolbox_Linux64.bin differ diff --git a/imosToolbox_Win32.exe b/imosToolbox_Win32.exe index a0986df93..96fe9fab4 100644 Binary files a/imosToolbox_Win32.exe and b/imosToolbox_Win32.exe differ diff --git a/imosToolbox_Win64.exe b/imosToolbox_Win64.exe index 3e83759f8..4ac2536ee 100644 Binary files a/imosToolbox_Win64.exe and b/imosToolbox_Win64.exe differ