diff --git a/GUI/updateViewMetadata.m b/GUI/updateViewMetadata.m index 551baced5..5fda8a4b6 100644 --- a/GUI/updateViewMetadata.m +++ b/GUI/updateViewMetadata.m @@ -62,9 +62,10 @@ function updateViewMetadata(parent, sample_data, mode) dims = sample_data.dimensions; lenDims = length(dims); for k = 1:lenDims - dims{k} = rmfield(dims{k}, {'data', 'typeCastFunc'}); - if isfield(dims{k}, 'flags') - dims{k} = rmfield(dims{k}, 'flags'); + fieldsToBeRemoved = {'data', 'typeCastFunc', 'flags'}; + iToBeRemoved = isfield(dims{k}, fieldsToBeRemoved); + if any(iToBeRemoved) + dims{k} = rmfield(dims{k}, fieldsToBeRemoved(iToBeRemoved)); end dims{k} = orderfields(dims{k}); end @@ -72,7 +73,12 @@ function updateViewMetadata(parent, sample_data, mode) vars = sample_data.variables; lenVars = length(vars); for k = 1:lenVars - vars{k} = orderfields(rmfield(vars{k}, {'data', 'dimensions', 'flags', 'typeCastFunc'})); + fieldsToBeRemoved = {'data', 'dimensions', 'typeCastFunc', 'flags'}; + iToBeRemoved = isfield(vars{k}, fieldsToBeRemoved); + if any(iToBeRemoved) + vars{k} = rmfield(vars{k}, fieldsToBeRemoved(iToBeRemoved)); + end + vars{k} = orderfields(vars{k}); end % create a cell array containing global attribute data diff --git a/GUI/viewMetadata.m b/GUI/viewMetadata.m index 97dc571b1..eb7bf1890 100644 --- a/GUI/viewMetadata.m +++ b/GUI/viewMetadata.m @@ -242,11 +242,12 @@ function viewMetadata(parent, sample_data, updateCallback, repCallback, mode) % create a button for replicate option repButton = uicontrol(... - 'Parent', panel,... - 'Style', 'pushbutton',... - 'String', 'Replicate',... - 'Callback', @repButtonCallback... - ); + 'Parent', panel,... + 'Style', 'pushbutton',... + 'String', 'Replicate',... + 'ToolTip', 'Replicate the content of the selected cell across all imported datasets',... + 'Callback', @repButtonCallback... + ); % % create a button for adding metadata fields % addButton = uicontrol(... diff --git a/NetCDF/exportNetCDF.m b/NetCDF/exportNetCDF.m index cd2b52dce..4eaa323df 100644 --- a/NetCDF/exportNetCDF.m +++ b/NetCDF/exportNetCDF.m @@ -364,10 +364,12 @@ data = data - datenum('1950-01-01 00:00:00'); end - iNaNData = isnan(data); - if isnumeric(data) && any(any(iNaNData)) - fprintf('%s\n', ['Warning : in ' sample_data.toolbox_input_file ... - ', there are NaNs in ' dims{m}.name ' dimension (not CF).']); + if isnumeric(data) + iNaNData = isnan(data); + if any(any(iNaNData)) + fprintf('%s\n', ['Warning : in ' sample_data.toolbox_input_file ... + ', there are NaNs in ' dims{m}.name ' dimension (not CF).']); + end end data = typeCastFunction(data); diff --git a/Parser/convertECOrawVar.m b/Parser/convertECOrawVar.m new file mode 100644 index 000000000..65b77055c --- /dev/null +++ b/Parser/convertECOrawVar.m @@ -0,0 +1,154 @@ +function [name, comment, data, calibration] = convertECOrawVar(columnsInfo, sample) +%CONVERTECORAWVAR Processes data from a WetLabs ECO .raw file. +% +% This function is able to convert data retrieved from a .raw WetLabs ECO +% data file. This function is called from the different read???raw functions. +% +% Inputs: +% columnsInfo - ECO parameters infos. +% sample - ECO raw data. +% +% Outputs: +% name - IMOS parameter code. +% comment - any comment on the parameter. +% data - data converted to fit IMOS parameter unit. +% calibration - coefficients calibration used to convert data. +% +% Author: Guillaume Galibert +% + +% +% Copyright (c) 2009, eMarine Information Infrastructure (eMII) and Integrated +% Marine Observing System (IMOS). +% All rights reserved. +% +% Redistribution and use in source and binary forms, with or without +% modification, are permitted provided that the following conditions are met: +% +% * Redistributions of source code must retain the above copyright notice, +% this list of conditions and the following disclaimer. +% * Redistributions in binary form must reproduce the above copyright +% notice, this list of conditions and the following disclaimer in the +% documentation and/or other materials provided with the distribution. +% * Neither the name of the eMII/IMOS nor the names of its contributors +% may be used to endorse or promote products derived from this software +% without specific prior written permission. +% +% THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +% AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +% IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +% ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +% LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +% CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +% SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +% INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +% CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +% ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +% POSSIBILITY OF SUCH DAMAGE. +% +narginchk(2, 2); + +name = ''; +comment = ''; +data = []; +calibration = struct([]); + +switch upper(columnsInfo.type) + case {'N/U', 'DATE', 'TIME'} + % ignored + + case 'IENGR' + % not identified by IMOS, won't be output in NetCDF + name = ['ECO3_' columnsInfo.type]; + data = sample; + + case 'PAR' %umol/m2/s + name = 'PAR'; + data = columnsInfo.im*10.^((sample-columnsInfo.a0)/columnsInfo.a1); + calibration(1).formula = 'value_engineering_units = calibration_im x 10^((counts - calibration_a0) x calibration_a1)'; + calibration(1).im = columnsInfo.im; + calibration(1).a0 = columnsInfo.a0; + calibration(1).a1 = columnsInfo.a1; + + case 'CHL' %ug/l (470/695nm) + name = 'CPHL'; + comment = ['Artificial chlorophyll data computed from bio-optical ' ... + 'sensor raw counts measurements. Originally expressed in ' ... + 'ug/l, 1l = 0.001m3 was assumed.']; + data = (sample - columnsInfo.offset)*columnsInfo.scale; + calibration(1).formula = 'value_engineering_units = (counts - calibration_dark_count) x calibration_scale_factor'; + calibration(1).dark_count = columnsInfo.offset; + calibration(1).scale_factor = columnsInfo.scale; + + case 'PHYCOERYTHRIN' %ug/l (540/570nm) + % not identified by IMOS, won't be output in NetCDF + name = ['ECO3_' columnsInfo.type]; + comment = 'Expressed in ug/l.'; + data = (sample - columnsInfo.offset)*columnsInfo.scale; + calibration(1).formula = 'value_engineering_units = (counts - calibration_dark_count) x calibration_scale_factor'; + calibration(1).dark_count = columnsInfo.offset; + calibration(1).scale_factor = columnsInfo.scale; + + case 'PHYCOCYANIN' %ug/l (630/680nm) + % not identified by IMOS, won't be output in NetCDF + name = ['ECO3_' columnsInfo.type]; + comment = 'Expressed in ug/l.'; + data = (sample - columnsInfo.offset)*columnsInfo.scale; + calibration(1).formula = 'value_engineering_units = (counts - calibration_dark_count) x calibration_scale_factor'; + calibration(1).dark_count = columnsInfo.offset; + calibration(1).scale_factor = columnsInfo.scale; + + case 'URANINE' %ppb (470/530nm) + % not identified by IMOS, won't be output in NetCDF + name = ['ECO3_' columnsInfo.type]; + comment = 'Expressed in ppb.'; + data = (sample - columnsInfo.offset)*columnsInfo.scale; + calibration(1).formula = 'value_engineering_units = (counts - calibration_dark_count) x calibration_scale_factor'; + calibration(1).dark_count = columnsInfo.offset; + calibration(1).scale_factor = columnsInfo.scale; + + case 'RHODAMINE' %ug/l (540/570nm) + % not identified by IMOS, won't be output in NetCDF + name = ['ECO3_' columnsInfo.type]; + comment = 'Expressed in ug/l.'; + data = (sample - columnsInfo.offset)*columnsInfo.scale; + calibration(1).formula = 'value_engineering_units = (counts - calibration_dark_count) x calibration_scale_factor'; + calibration(1).dark_count = columnsInfo.offset; + calibration(1).scale_factor = columnsInfo.scale; + + case 'CDOM' %ppb + name = 'CDOM'; + data = (sample - columnsInfo.offset)*columnsInfo.scale; + calibration(1).formula = 'value_engineering_units = (counts - calibration_dark_count) x calibration_scale_factor'; + calibration(1).dark_count = columnsInfo.offset; + calibration(1).scale_factor = columnsInfo.scale; + + case 'NTU' + name = 'TURB'; + data = (sample - columnsInfo.offset)*columnsInfo.scale; + calibration(1).formula = 'value_engineering_units = (counts - calibration_dark_count) x calibration_scale_factor'; + calibration(1).dark_count = columnsInfo.offset; + calibration(1).scale_factor = columnsInfo.scale; + + case 'LAMBDA' %m-1 sr-1 + name = ['VSF' num2str(columnsInfo.measWaveLength)]; + data = (sample - columnsInfo.offset)*columnsInfo.scale; + calibration(1).formula = 'value_engineering_units = (counts - calibration_dark_count) x calibration_scale_factor'; + calibration(1).dark_count = columnsInfo.offset; + calibration(1).scale_factor = columnsInfo.scale; + + otherwise + % not identified by IMOS, won't be output in NetCDF + name = ['ECO3_' columnsInfo.type]; + data = sample; + if isfield(columnsInfo, 'offset') + data = data - columnsInfo.offset; + calibration(1).dark_count = columnsInfo.offset; + end + if isfield(columnsInfo, 'scale') + data = data * columnsInfo.scale; + calibration(1).scale_factor = columnsInfo.scale; + end + +end +end \ No newline at end of file diff --git a/Parser/readBB9raw.m b/Parser/readBB9raw.m index 6cba7a27f..348a800c3 100644 --- a/Parser/readBB9raw.m +++ b/Parser/readBB9raw.m @@ -120,7 +120,7 @@ sample_data.variables{end}.dimensions = []; for i=2:nColumns - [name, comment, data] = getParamDetails(deviceInfo.columns{i}, samples{i}); + [name, comment, data, calibration] = convertECOrawVar(deviceInfo.columns{i}, samples{i}); if ~isempty(data) % dimensions definition must stay in this order : T, Z, Y, X, others; @@ -132,6 +132,14 @@ sample_data.variables{end}.coordinates = 'TIME LATITUDE LONGITUDE NOMINAL_DEPTH'; sample_data.variables{end}.comment = comment; + if ~isempty(calibration) + fields = fielnames(calibration); + for j=1:length(fields) + attribute = ['calibration_' fields{j}]; + sample_data.variables{end}.(attribute) = calibration.(fields{j}); + end + end + % WQM uses SeaBird pressure sensor if strncmp('PRES_REL', name, 8) % let's document the constant pressure atmosphere offset previously @@ -140,92 +148,4 @@ end end end - -end - -function [name, comment, data] = getParamDetails(columnsInfo, sample) -name = ''; -comment = ''; -data = []; - -switch upper(columnsInfo.type) - case 'N/U' - % ignored - - case 'IENGR' - % not identified by IMOS, won't be output in NetCDF - name = ['ECO3_' columnsInfo.type]; - data = sample; - - case 'PAR' - % not sure about what to do with this measurement from this - % instrument so for the time being won't be output in NetCDF - name = ['ECO3_' columnsInfo.type]; - data = sample; - if isfield(columnsInfo, 'offset') - data = data - columnsInfo.offset; - end - if isfield(columnsInfo, 'scale') - data = data * columnsInfo.scale; - end - - case 'CHL' %ug/l (470/695nm) - name = 'CPHL'; - comment = ['Artificial chlorophyll data computed from bio-optical ' ... - 'sensor raw counts measurements. Originally expressed in ' ... - 'ug/l, 1l = 0.001m3 was assumed.']; - data = sample; - data = (data - columnsInfo.offset)*columnsInfo.scale; - - case 'PHYCOERYTHRIN' %ug/l (540/570nm) - % not identified by IMOS, won't be output in NetCDF - name = ['ECO3_' columnsInfo.type]; - data = sample; - data = (data - columnsInfo.offset)*columnsInfo.scale; - - case 'PHYCOCYANIN' %ug/l (630/680nm) - % not identified by IMOS, won't be output in NetCDF - name = ['ECO3_' columnsInfo.type]; - data = sample; - data = (data - columnsInfo.offset)*columnsInfo.scale; - - case 'URANINE' %ppb (470/530nm) - % not identified by IMOS, won't be output in NetCDF - name = ['ECO3_' columnsInfo.type]; - data = sample; - data = (data - columnsInfo.offset)*columnsInfo.scale; - - case 'RHODAMINE' %ug/l (540/570nm) - % not identified by IMOS, won't be output in NetCDF - name = ['ECO3_' columnsInfo.type]; - data = sample; - data = (data - columnsInfo.offset)*columnsInfo.scale; - - case 'CDOM' %ppb - name = 'CDOM'; - data = sample; - data = (data - columnsInfo.offset)*columnsInfo.scale; - - case 'NTU' - name = 'TURB'; - data = sample; - data = (data - columnsInfo.offset)*columnsInfo.scale; - - case 'LAMBDA' %m-1 sr-1 - name = ['VSF' num2str(columnsInfo.measWaveLength)]; - data = sample; - data = (data - columnsInfo.offset)*columnsInfo.scale; - - otherwise - % not identified by IMOS, won't be output in NetCDF - name = ['ECO3_' columnsInfo.type]; - data = sample; - if isfield(columnsInfo, 'offset') - data = data - columnsInfo.offset; - end - if isfield(columnsInfo, 'scale') - data = data * columnsInfo.scale; - end - -end -end +end \ No newline at end of file diff --git a/Parser/readECODevice.m b/Parser/readECODevice.m index f8d9557ac..6bfc238ab 100644 --- a/Parser/readECODevice.m +++ b/Parser/readECODevice.m @@ -1,5 +1,5 @@ function deviceInfo = readECODevice( filename ) -%READECODEVICE parses a .dev device file retrieved from a Wetlabs ECO Triplet instrument. +%READECODEVICE parses a .dev device file retrieved from a Wetlabs ECO instrument. % % % Inputs: @@ -116,8 +116,31 @@ case {'N/U', 'DKDC'} % do nothing - % measurements with possible scale, offset and wavelengths infos + case 'PAR' + % measurements in counts with coefficients calibration + deviceInfo.columns{i}.type = upper(type); + im = []; + a1 = []; + a0 = []; + + for j=j+1:nLines + if isempty(im), im = regexp(lines{j}, 'im=[\s]*([0-9\.]*)', 'tokens'); end + if isempty(a1), a1 = regexp(lines{j}, 'a1=[\s]*([0-9\.]*)', 'tokens'); end + if isempty(a0), a0 = regexp(lines{j}, 'a0=[\s]*([0-9\.]*)', 'tokens'); end + if ~isempty(im) && ~isempty(a1) && ~isempty(a0) + deviceInfo.columns{i}.im = str2double(im{1}); + deviceInfo.columns{i}.a0 = str2double(a0{1}); + deviceInfo.columns{i}.a1 = str2double(a1{1}); + break; + end + end + + if isempty(im) || isempty(a1) || isempty(a0) + error(['couldn''t read PAR coefficients calibration from ' filename]); + end + otherwise + % measurements with possible scale, offset and wavelengths infos deviceInfo.columns{i}.type = upper(type); format = '%*s\t%f\t%f\t%f\t%f'; output = cell(1, 4); diff --git a/Parser/readECOraw.m b/Parser/readECOraw.m index c0e3ee163..63f1585f4 100644 --- a/Parser/readECOraw.m +++ b/Parser/readECOraw.m @@ -1,5 +1,5 @@ function sample_data = readECOraw( filename, deviceInfo, mode ) -%READECORAW parses a .raw data file retrieved from a Wetlabs ECO Triplet instrument. +%READECORAW parses a .raw data file retrieved from a Wetlabs ECO Triplet or PARSB instrument. % % % Inputs: @@ -167,8 +167,10 @@ iNaN(:, i-2) = isnan(str2double(samples{i})); end iNaN = any(iNaN, 2); -for i=1:nColumns - samples{i}(iNaN) = []; +if any(iNaN) + for i=1:nColumns + samples{i}(iNaN) = []; + end end clear iNaN; @@ -177,15 +179,6 @@ samples{i} = str2double(samples{i}); end -% count value 4130 and over look like to be the maximum -% possible count value the instrument can deliver -maxCount = 4130; -for i=3:nColumns - iMaxCount = samples{i} >= maxCount; - samples{i}(iMaxCount) = NaN; -end -clear iMaxCount; - %fill in sample and cal data sample_data = struct; sample_data.meta = struct; @@ -225,8 +218,8 @@ sample_data.variables{end}.data = sample_data.variables{end}.typeCastFunc(NaN); sample_data.variables{end}.dimensions = []; -for i=1:nColumns - [name, comment, data] = getParamDetails(deviceInfo.columns{i}, samples{i}); +for i=3:nColumns + [name, comment, data, calibration] = convertECOrawVar(deviceInfo.columns{i}, samples{i}); if ~isempty(data) % dimensions definition must stay in this order : T, Z, Y, X, others; @@ -238,6 +231,14 @@ sample_data.variables{end}.coordinates = 'TIME LATITUDE LONGITUDE NOMINAL_DEPTH'; sample_data.variables{end}.comment = comment; + if ~isempty(calibration) + fields = fieldnames(calibration); + for j=1:length(fields) + attribute = ['calibration_' fields{j}]; + sample_data.variables{end}.(attribute) = calibration.(fields{j}); + end + end + % WQM uses SeaBird pressure sensor if strncmp('PRES_REL', name, 8) % let's document the constant pressure atmosphere offset previously @@ -246,92 +247,4 @@ end end end - -end - -function [name, comment, data] = getParamDetails(columnsInfo, sample) -name = ''; -comment = ''; -data = []; - -switch upper(columnsInfo.type) - case 'N/U' - % ignored - - case 'IENGR' - % not identified by IMOS, won't be output in NetCDF - name = ['ECO3_' columnsInfo.type]; - data = sample; - - case 'PAR' - % not sure about what to do with this measurement from this - % instrument so for the time being won't be output in NetCDF - name = ['ECO3_' columnsInfo.type]; - data = sample; - if isfield(columnsInfo, 'offset') - data = data - columnsInfo.offset; - end - if isfield(columnsInfo, 'scale') - data = data * columnsInfo.scale; - end - - case 'CHL' %ug/l (470/695nm) - name = 'CPHL'; - comment = ['Artificial chlorophyll data computed from bio-optical ' ... - 'sensor raw counts measurements. Originally expressed in ' ... - 'ug/l, 1l = 0.001m3 was assumed.']; - data = sample; - data = (data - columnsInfo.offset)*columnsInfo.scale; - - case 'PHYCOERYTHRIN' %ug/l (540/570nm) - % not identified by IMOS, won't be output in NetCDF - name = ['ECO3_' columnsInfo.type]; - data = sample; - data = (data - columnsInfo.offset)*columnsInfo.scale; - - case 'PHYCOCYANIN' %ug/l (630/680nm) - % not identified by IMOS, won't be output in NetCDF - name = ['ECO3_' columnsInfo.type]; - data = sample; - data = (data - columnsInfo.offset)*columnsInfo.scale; - - case 'URANINE' %ppb (470/530nm) - % not identified by IMOS, won't be output in NetCDF - name = ['ECO3_' columnsInfo.type]; - data = sample; - data = (data - columnsInfo.offset)*columnsInfo.scale; - - case 'RHODAMINE' %ug/l (540/570nm) - % not identified by IMOS, won't be output in NetCDF - name = ['ECO3_' columnsInfo.type]; - data = sample; - data = (data - columnsInfo.offset)*columnsInfo.scale; - - case 'CDOM' %ppb - name = 'CDOM'; - data = sample; - data = (data - columnsInfo.offset)*columnsInfo.scale; - - case 'NTU' - name = 'TURB'; - data = sample; - data = (data - columnsInfo.offset)*columnsInfo.scale; - - case 'LAMBDA' %m-1 sr-1 - name = ['VSF' num2str(columnsInfo.measWaveLength)]; - data = sample; - data = (data - columnsInfo.offset)*columnsInfo.scale; - - otherwise - % not identified by IMOS, won't be output in NetCDF - name = ['ECO3_' columnsInfo.type]; - data = sample; - if isfield(columnsInfo, 'offset') - data = data - columnsInfo.offset; - end - if isfield(columnsInfo, 'scale') - data = data * columnsInfo.scale; - end - -end -end +end \ No newline at end of file diff --git a/Parser/readWetStarraw.m b/Parser/readWetStarraw.m index 57cfb8f96..9ae790171 100644 --- a/Parser/readWetStarraw.m +++ b/Parser/readWetStarraw.m @@ -118,7 +118,7 @@ sample_data.variables{end}.data = sample_data.variables{end}.typeCastFunc(NaN); sample_data.variables{end}.dimensions = []; -[name, comment, data] = getParamDetails(deviceInfo.columns{1}, samples{1}); +[name, comment, data, calibration] = convertECOrawVar(deviceInfo.columns{1}, samples{1}); if ~isempty(data) % dimensions definition must stay in this order : T, Z, Y, X, others; @@ -130,6 +130,14 @@ sample_data.variables{end}.coordinates = 'TIME LATITUDE LONGITUDE NOMINAL_DEPTH'; sample_data.variables{end}.comment = comment; + if ~isempty(calibration) + fields = fielnames(calibration); + for j=1:length(fields) + attribute = ['calibration_' fields{j}]; + sample_data.variables{end}.(attribute) = calibration.(fields{j}); + end + end + % WQM uses SeaBird pressure sensor if strncmp('PRES_REL', name, 8) % let's document the constant pressure atmosphere offset previously @@ -137,92 +145,4 @@ sample_data.variables{end}.applied_offset = sample_data.variables{end}.typeCastFunc(-14.7*0.689476); end end - -end - -function [name, comment, data] = getParamDetails(columnsInfo, sample) -name = ''; -comment = ''; -data = []; - -switch upper(columnsInfo.type) - case 'N/U' - % ignored - - case 'IENGR' - % not identified by IMOS, won't be output in NetCDF - name = ['ECO3_' columnsInfo.type]; - data = sample; - - case 'PAR' - % not sure about what to do with this measurement from this - % instrument so for the time being won't be output in NetCDF - name = ['ECO3_' columnsInfo.type]; - data = sample; - if isfield(columnsInfo, 'offset') - data = data - columnsInfo.offset; - end - if isfield(columnsInfo, 'scale') - data = data * columnsInfo.scale; - end - - case 'CHL' %ug/l (470/695nm) - name = 'CPHL'; - comment = ['Artificial chlorophyll data computed from bio-optical ' ... - 'sensor raw counts measurements. Originally expressed in ' ... - 'ug/l, 1l = 0.001m3 was assumed.']; - data = sample; - data = (data - columnsInfo.offset)*columnsInfo.scale; - - case 'PHYCOERYTHRIN' %ug/l (540/570nm) - % not identified by IMOS, won't be output in NetCDF - name = ['ECO3_' columnsInfo.type]; - data = sample; - data = (data - columnsInfo.offset)*columnsInfo.scale; - - case 'PHYCOCYANIN' %ug/l (630/680nm) - % not identified by IMOS, won't be output in NetCDF - name = ['ECO3_' columnsInfo.type]; - data = sample; - data = (data - columnsInfo.offset)*columnsInfo.scale; - - case 'URANINE' %ppb (470/530nm) - % not identified by IMOS, won't be output in NetCDF - name = ['ECO3_' columnsInfo.type]; - data = sample; - data = (data - columnsInfo.offset)*columnsInfo.scale; - - case 'RHODAMINE' %ug/l (540/570nm) - % not identified by IMOS, won't be output in NetCDF - name = ['ECO3_' columnsInfo.type]; - data = sample; - data = (data - columnsInfo.offset)*columnsInfo.scale; - - case 'CDOM' %ppb - name = 'CDOM'; - data = sample; - data = (data - columnsInfo.offset)*columnsInfo.scale; - - case 'NTU' - name = 'TURB'; - data = sample; - data = (data - columnsInfo.offset)*columnsInfo.scale; - - case 'LAMBDA' %m-1 sr-1 - name = ['VSF' num2str(columnsInfo.measWaveLength)]; - data = sample; - data = (data - columnsInfo.offset)*columnsInfo.scale; - - otherwise - % not identified by IMOS, won't be output in NetCDF - name = ['ECO3_' columnsInfo.type]; - data = sample; - if isfield(columnsInfo, 'offset') - data = data - columnsInfo.offset; - end - if isfield(columnsInfo, 'scale') - data = data * columnsInfo.scale; - end - -end -end +end \ No newline at end of file diff --git a/imosToolbox.m b/imosToolbox.m index ff62ca405..00006a3a2 100644 --- a/imosToolbox.m +++ b/imosToolbox.m @@ -73,7 +73,7 @@ function imosToolbox(auto, varargin) end % Set current toolbox version -toolboxVersion = ['2.5.8 - ' computer]; +toolboxVersion = ['2.5.9 - ' computer]; switch auto case 'auto', autoIMOSToolbox(toolboxVersion, varargin{:}); diff --git a/imosToolbox_Linux64.bin b/imosToolbox_Linux64.bin index 84d0841e4..38dccbbc0 100755 Binary files a/imosToolbox_Linux64.bin and b/imosToolbox_Linux64.bin differ diff --git a/imosToolbox_Win32.exe b/imosToolbox_Win32.exe index 62330125a..7b2c950b4 100644 Binary files a/imosToolbox_Win32.exe and b/imosToolbox_Win32.exe differ diff --git a/imosToolbox_Win64.exe b/imosToolbox_Win64.exe index 4e93dd6d0..80decd20e 100644 Binary files a/imosToolbox_Win64.exe and b/imosToolbox_Win64.exe differ