Skip to content

Commit

Permalink
Merge pull request #370 from aodn/2.5.15
Browse files Browse the repository at this point in the history
2.5.15
  • Loading branch information
ggalibert authored Aug 12, 2016
2 parents aebeb79 + 3b6d7a5 commit 891a219
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 16 deletions.
26 changes: 13 additions & 13 deletions Parser/readWQMdat.m
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;

Expand All @@ -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;
Expand All @@ -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);
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions Parser/readWQMraw.m
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion imosToolbox.m
Original file line number Diff line number Diff line change
Expand Up @@ -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{:});
Expand Down
Binary file modified imosToolbox_Linux64.bin
Binary file not shown.
Binary file modified imosToolbox_Win32.exe
Binary file not shown.
Binary file modified imosToolbox_Win64.exe
Binary file not shown.

0 comments on commit 891a219

Please sign in to comment.