This repository has been archived by the owner on Dec 1, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
evaluateBatch.m
73 lines (69 loc) · 3.61 KB
/
evaluateBatch.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
% script for automatically evaluating Brillouin data
% copy this file to the folder with the data you want to evaluate and
% adjust the parameters below if necessary
%% path to the files
filelist = dir('**/*.h5');
%% parameter structure
% use this configuration for new calibrations with water + methanol
peakTypes = {'R', 'B', 'B', 'B', 'B', 'R'};
% use this configuration for old calibrations with only water or methanol
% peakTypes = {'R', 'B', 'B', 'R', 'NaN'};
parameters = struct( ...
'data', struct( ...
'rotate', -1, ... % {-1 , 0, 1} rotate the image by k*90 degrees
'flipud', false, ... % flip the image up-down
'fliplr', false, ... % flip the image left-right
'setup', 'S2' ... % The used setup
), ...
'extraction', struct( ... % parameters for the extraction
'do', true ... % execute extraction?
), ...
'calibration', struct( ... % parameters for the calibration
'do', true, ... % execute calibration?
'findPeaks', false, ... % find the Rayleigh and Brillouin peaks
'peakProminence', 15, ... % the minimal prominence of the peaks
'peakTypes', {peakTypes}, ... % expected types of peaks
'correctOffset', false, ... % correct the calibration offset?
'extrapolate', true, ... % extrapolate the calibration?
'weighted', false ... % use weighting for calibration calculation?
), ...
'peakSelection', struct( ... % parameters for the peak selection
'do', true, ... % execute peak selection?
'unit', 'GHz', ... % unit to use {'GHz' or 'pix'}
'valuesRayleigh', [12.0 18.0], ... % frequency range for Rayleigh peaks
'valuesBrillouin', [7.5 12.0] ... % frequency range for Brillouin peaks
), ...
'evaluation', struct( ... % parameters for the evaluation
'do', true, ... % execute evaluation?
'interpRayleigh', true, ... % interpolate Rayleigh peaks position?
'minRayleighPeakHeight', 50, ...% minimum height of Rayleigh peaks
'nrBrillouinPeaks', 2, ... % [1] number of Brillouin peaks to fit
'constraints', struct( ... % constraints for the Brillouin peak fit
'sa', struct( ... % first peak - frequency
'Lower', 7.65, ... % [GHz] lower border
'Upper', 7.85 ... % [GHz] upper border
), ...
'wa', struct( ... % first peak - width
'Lower', 3, ... % [pix] lower border
'Upper', Inf ... % [pix] upper border
), ...
'Ba', struct( ... % first peak - intensity
'Lower', 0, ... % [a.u.] lower border
'Upper', Inf ... % [a.u.] upper border
), ...
'sb', struct( ... % second peak - frequency
'Lower', 7.85, ... % [GHz] lower border
'Upper', 'max' ... % [GHz] upper border
), ...
'wb', struct( ... % second peak - width
'Lower', 3, ... % [pix] lower border
'Upper', Inf ... % [pix] upper border
), ...
'Bb', struct( ... % second peak - intensity
'Lower', 0, ... % [a.u.] lower border
'Upper', Inf ... % [a.u.] upper border
) ...
) ...
)...
);
BrillouinEvaluation_Auto(filelist, parameters);