Skip to content

Commit 2816436

Browse files
committed
Merge branch 'release/v0.1.3'
2 parents 1abf2a0 + 003da6b commit 2816436

38 files changed

+3592
-1994
lines changed

@Chromatography/Chromatography.m

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,18 @@
55
% obj = Chromatography
66
%
77
% Methods
8+
%
89
% Import
910
% data = obj.import(filetype, 'OptionName', optionvalue...)
1011
%
11-
% Baseline
12+
% Preprocessing
1213
% data = obj.baseline(data, 'OptionName', optionvalue...)
13-
%
14-
% Smooth
1514
% data = obj.smooth(data, 'OptionName', optionvalue...)
1615
%
1716
% Integration
1817
% data = obj.integrate(data, 'OptionName', optionvalue...)
1918
%
20-
% Visualize
19+
% Visualization
2120
% fig = obj.visualize(data, 'OptionName', optionvalue...)
2221

2322
classdef Chromatography
@@ -34,15 +33,19 @@
3433
% General informations
3534
obj.options.system_os = computer;
3635
obj.options.matlab_version = version('-release');
37-
obj.options.toolbox_version = '0.1.2';
36+
obj.options.toolbox_version = '0.1.3';
3837

3938
% Import options
4039
obj.options.import = {...
4140
'.CDF', 'netCDF (*.CDF)';
42-
'.D', 'Agilent (*.D)';
43-
'.MS', 'Agilent (*.MS)';
41+
'.D', 'Agilent (*.D)';
42+
'.MS', 'Agilent (*.MS)';
4443
'.RAW', 'Thermo (*.RAW)'};
4544

45+
% Export options
46+
obj.options.export = {...
47+
'.CSV', '(*.CSV)'};
48+
4649
% Baseline options
4750
obj.options.baseline.smoothness = 10^6;
4851
obj.options.baseline.asymmetry = 10^-4;

@Chromatography/baseline.m

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,16 @@
4242
% Calculate baseline
4343
for i = 1:length(samples)
4444

45+
% Variables
46+
n = length(data(samples(i)).xic.values(:,1));
47+
m = length(data(samples(i)).xic.values(1,:));
48+
4549
% Pre-allocate memory
4650
if isempty(data(samples(i)).xic.baseline)
47-
data(samples(i)).xic.baseline = zeros(...
48-
length(data(samples(i)).xic.values(:,1)),...
49-
length(data(samples(i)).xic.values(1,:)));
51+
data(samples(i)).xic.baseline = zeros(n, m);
52+
53+
elseif length(data(samples(i)).xic.baseline(1,:)) ~= m
54+
data(samples(i)).xic.baseline = zeros(n, m);
5055
end
5156

5257
% Check ion options
@@ -91,11 +96,11 @@
9196

9297
% Check input
9398
if nargin < 1
94-
error('Not enough input arguments');
99+
error('Not enough input arguments.');
95100
elseif isstruct(varargin{1})
96101
data = DataStructure('validate', varargin{1});
97102
else
98-
error('Undefined input arguments of type ''data''');
103+
error('Undefined input arguments of type ''data''.');
99104
end
100105

101106
% Check user input

0 commit comments

Comments
 (0)