2% For LICENSE / TERMS OF USE, see the file LICENSE in the root directory of the repository.
6%% get data path and files
8datapath = fullfile(datapath,
"self_captured/240213_pressure_membrane");
10% get all the .BIN files in the directory
11files = dir(fullfile(datapath,
"*.BIN"));
14for i = 1:length(files)
15data(i) = jumpReadData(fullfile(datapath, files(i).name));
18% downsample the data to 5 Hz (actual pressure data is 5 Hz)
20data(i).tt = retime(data(i).tt,
"regular",
"nearest",
"SampleRate", 5);
24% sensor 1 (indices found by hand)
25start_idx_1 = [ 1, 163, 326, 518, 693, 892, 1061, 1267];
26stop_idx_1 = [146, 289, 453, 670, 868, 1044, 1227, 1347];
28% sensor 2 (indices found by hand)
29start_idx_2 = [ 3, 157, 296, 490, 685, 883, 1057, 1262];
30stop_idx_2 = [147, 281, 448, 676, 871, 1043, 1217, 1345];
32% sensor 3 (indices found by hand)
33start_idx_3 = [ 6, 158, 298, 506, 691, 885, 1056, 1262];
34stop_idx_3 = [148, 281, 448, 673, 871, 1046, 1224, 1350];
36start_idx = [start_idx_1; start_idx_2; start_idx_3];
37stop_idx = [stop_idx_1; stop_idx_2; stop_idx_3];
44 for j=1:length(start_idx)
45 risetimes(i,j) = risetime(data(i).tt.prs(start_idx(i,j):stop_idx(i,j)),5);
47 risetime(data(i).tt.prs(start_idx(i,j):stop_idx(i,j)),5);
48 title(sprintf(
"Risetime %0.2f s", round(risetimes(j),2)));
49 ylabel(
"Level (mbar)")
54risetimes = reshape(risetimes, [1, numel(risetimes)]);
58% result: it seems that the risetimes are not very consistent, but the
59% average risetime is around 0.52 s. for the model I'm assuming a mean risetime
60% of 0.6 s with a standard deviation of 0.2 s.