-
Notifications
You must be signed in to change notification settings - Fork 0
/
decimate.config
89 lines (73 loc) · 4.06 KB
/
decimate.config
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
#
# Author Bin Dong Apr 7 2021
# This file demonstrates the usage of config file for decimate.cpp
# It perform the decimation on a directory "test-data/dir", which has test-das-1.h5 and test-das-2.h5
# It stores the result into another directory "test-data/dir-decimate"
#
# Note:
# Each config file starts with the "[parameter]"
# The comment lines starting with "#" ";" and "%" will be skipped
# The ";" can also be used to comment the line at the end
#
# In the blow text,
# -- I will use the "#" to comment a group of lines.
# We may have three groups, input parameter, output parameter and runtime parameter.
#
# -- I will use the ";" to comment each line
#
# Also, all parameters have default values (even for the input file)
# So, some missing will not report the error.
# Todo: we may classify the parameter as optional ones or essential ones
#
#
[parameter]
#############################
# Input data's parameters #
#############################
is_input_single_file = false ; true / false (default),
input_dir_file = test-data/dir ; directory info when is_input_single_file = false
; file info when is_input_single_file = true
; better to have full path from /
input_file_type = EP_HDF5 ; EP_HDF5(default), EP_TDMS
; File type for the input
input_dataset=/dat ; dataset name in HDF5, use (h5dump -A) to get it
; Not used for EP_TDMS
n_files_to_concatenate = 1 ; the number of files to concatenate
; only works when input is a directory
; 1 : not to concatenate
; 2 : concatenate every two files ...
; Note: better not to have leftover
is_input_search_rgx = false ; true / false(default)
input_search_rgx = (.*?)[123](\.tdms) ; filter the input file names as input
; See : https://www.cplusplus.com/reference/regex/ECMAScript/
; See is_channel_range for a simple way to do it
is_file_range = false ; false or 0, true/1 (by default 0)
; only works when is_input_single_file = flase, i.e., a directory
; pick the [file_range_start_index]th file to [file_range_end_index]th file
; All files are sorted by the filenames (kind of time order)
file_range_start_index = 0 ; Note: zero based and inclusive
file_range_end_index = 4
is_channel_range = false ; true / false(default)
channel_range_start = 0 ; Select a few channels to run
channel_range_end = 2 ; channel_range_start is "0" based.
################################
# Runtime parameters #
################################
dt = 0.002
dt_new = 0.008
is_space_decimate = false ; it may have space_decimate after (resample)
space_decimate_chs = 32 ; the number of channels to decimate
space_decimate_operation = ave ; ave(default)/median/min/max
#####################################
# Output data's parameters #
#####################################
is_output_single_file = false ; true / false(default)
output_type = EP_HDF5 ; only takes EP_HDF5 now
output_file_dir = test-data/dir-decimate ; when is_output_single_file = true, it points to a file
; when is_output_single_file = false, it points to a directory
output_dataset = /dat ; dataset for output file
is_dir_output_match_replace_rgx = false ; true / false(default), only works in directory mode
; whether it has a way to auto generate the output file
; name from the input file name
output_file_regex_match = ^(.*)\.h5$ ; regex pattern to match original file name
output_file_regex_replace = $1-decimation.h5 ; regex pattern to replace original file name