[
{
"name": "pad_center_3_to_7",
"function": "pad_center",
"input": [
1.0,
2.0,
3.0
],
"size": 7,
"expected": [
0.0,
0.0,
1.0,
2.0,
3.0,
0.0,
0.0
]
},
{
"name": "pad_center_3_to_8",
"function": "pad_center",
"input": [
1.0,
2.0,
3.0
],
"size": 8,
"expected": [
0.0,
0.0,
1.0,
2.0,
3.0,
0.0,
0.0,
0.0
]
},
{
"name": "pad_center_4_to_8",
"function": "pad_center",
"input": [
1.0,
2.0,
3.0,
4.0
],
"size": 8,
"expected": [
0.0,
0.0,
1.0,
2.0,
3.0,
4.0,
0.0,
0.0
]
},
{
"name": "pad_center_1_to_5",
"function": "pad_center",
"input": [
1.0
],
"size": 5,
"expected": [
0.0,
0.0,
1.0,
0.0,
0.0
]
},
{
"name": "pad_center_2_to_2",
"function": "pad_center",
"input": [
1.0,
2.0
],
"size": 2,
"expected": [
1.0,
2.0
]
},
{
"name": "fix_length_5_to_3",
"function": "fix_length",
"input": [
1.0,
2.0,
3.0,
4.0,
5.0
],
"size": 3,
"expected": [
1.0,
2.0,
3.0
]
},
{
"name": "fix_length_3_to_6",
"function": "fix_length",
"input": [
1.0,
2.0,
3.0
],
"size": 6,
"expected": [
1.0,
2.0,
3.0,
0.0,
0.0,
0.0
]
},
{
"name": "fix_length_3_to_3",
"function": "fix_length",
"input": [
1.0,
2.0,
3.0
],
"size": 3,
"expected": [
1.0,
2.0,
3.0
]
},
{
"name": "fix_length_0_to_4",
"function": "fix_length",
"input": [],
"size": 4,
"expected": [
0.0,
0.0,
0.0,
0.0
]
},
{
"name": "fix_length_2_to_0",
"function": "fix_length",
"input": [
1.0,
2.0
],
"size": 0,
"expected": []
},
{
"name": "normalize_linf",
"function": "normalize",
"input": [
3.0,
-1.0,
2.0,
-4.0
],
"norm": "inf",
"expected": [
0.75,
-0.25,
0.5,
-1.0
]
},
{
"name": "normalize_l1",
"function": "normalize",
"input": [
3.0,
-1.0,
2.0,
-4.0
],
"norm": "1",
"expected": [
0.3,
-0.1,
0.2,
-0.4
]
},
{
"name": "normalize_l2",
"function": "normalize",
"input": [
3.0,
-1.0,
2.0,
-4.0
],
"norm": "2",
"expected": [
0.5477225575051661,
-0.18257418583505536,
0.3651483716701107,
-0.7302967433402214
]
},
{
"name": "normalize_linf_unit",
"function": "normalize",
"input": [
0.0,
0.5,
1.0
],
"norm": "inf",
"expected": [
0.0,
0.5,
1.0
]
},
{
"name": "normalize_l2_unit",
"function": "normalize",
"input": [
0.0,
0.5,
1.0
],
"norm": "2",
"expected": [
0.0,
0.4472135954999579,
0.8944271909999159
]
},
{
"name": "normalize_zeros",
"function": "normalize",
"input": [
0.0,
0.0,
0.0
],
"norm": "inf",
"expected": [
0.0,
0.0,
0.0
]
},
{
"name": "localmax_simple",
"function": "localmax",
"input": [
0.0,
1.0,
0.5,
2.0,
1.0
],
"expected": [
false,
true,
false,
true,
false
]
},
{
"name": "localmax_plateau",
"function": "localmax",
"input": [
0.0,
1.0,
1.0,
0.0
],
"expected": [
false,
true,
false,
false
]
},
{
"name": "localmax_ascending",
"function": "localmax",
"input": [
1.0,
2.0,
3.0,
4.0
],
"expected": [
false,
false,
false,
true
]
},
{
"name": "localmax_single",
"function": "localmax",
"input": [
5.0
],
"expected": [
false
]
},
{
"name": "localmax_two",
"function": "localmax",
"input": [
1.0,
2.0
],
"expected": [
false,
true
]
},
{
"name": "localmin_simple",
"function": "localmin",
"input": [
2.0,
0.5,
1.0,
0.0,
1.0
],
"expected": [
false,
true,
false,
true,
false
]
},
{
"name": "localmin_plateau",
"function": "localmin",
"input": [
1.0,
0.0,
0.0,
1.0
],
"expected": [
false,
true,
false,
false
]
},
{
"name": "localmin_descending",
"function": "localmin",
"input": [
4.0,
3.0,
2.0,
1.0
],
"expected": [
false,
false,
false,
true
]
},
{
"name": "localmin_single",
"function": "localmin",
"input": [
5.0
],
"expected": [
false
]
},
{
"name": "localmin_two",
"function": "localmin",
"input": [
2.0,
1.0
],
"expected": [
false,
true
]
},
{
"name": "softmask_simple",
"function": "softmask",
"x": [
2.0,
3.0,
1.0
],
"x_ref": [
1.0,
1.0,
4.0
],
"power": 1.0,
"expected": [
0.6666666666666666,
0.75,
0.2
]
},
{
"name": "softmask_power2",
"function": "softmask",
"x": [
2.0,
3.0,
1.0
],
"x_ref": [
1.0,
1.0,
4.0
],
"power": 2.0,
"expected": [
0.8,
0.8999999999999999,
0.058823529411764705
]
},
{
"name": "softmask_zeros",
"function": "softmask",
"x": [
0.0,
0.0,
0.0
],
"x_ref": [
0.0,
0.0,
0.0
],
"power": 1.0,
"expected": [
0.0,
0.0,
0.0
]
},
{
"name": "softmask_one_zero",
"function": "softmask",
"x": [
1.0,
0.0,
3.0
],
"x_ref": [
0.0,
2.0,
3.0
],
"power": 1.0,
"expected": [
1.0,
0.0,
0.5
]
},
{
"name": "maximum_filter1d_simple_3",
"function": "maximum_filter1d",
"input": [
1.0,
3.0,
2.0,
5.0,
1.0,
4.0,
2.0
],
"size": 3,
"expected": [
3.0,
3.0,
5.0,
5.0,
5.0,
4.0,
4.0
]
},
{
"name": "maximum_filter1d_simple_5",
"function": "maximum_filter1d",
"input": [
1.0,
3.0,
2.0,
5.0,
1.0,
4.0,
2.0
],
"size": 5,
"expected": [
3.0,
5.0,
5.0,
5.0,
5.0,
5.0,
4.0
]
},
{
"name": "maximum_filter1d_size_1",
"function": "maximum_filter1d",
"input": [
1.0,
3.0,
2.0,
5.0,
1.0
],
"size": 1,
"expected": [
1.0,
3.0,
2.0,
5.0,
1.0
]
},
{
"name": "maximum_filter1d_size_2",
"function": "maximum_filter1d",
"input": [
1.0,
3.0,
2.0,
5.0,
1.0,
4.0
],
"size": 2,
"expected": [
1.0,
3.0,
3.0,
5.0,
5.0,
4.0
]
},
{
"name": "maximum_filter1d_ascending",
"function": "maximum_filter1d",
"input": [
1.0,
2.0,
3.0,
4.0,
5.0
],
"size": 3,
"expected": [
2.0,
3.0,
4.0,
5.0,
5.0
]
},
{
"name": "maximum_filter1d_descending",
"function": "maximum_filter1d",
"input": [
5.0,
4.0,
3.0,
2.0,
1.0
],
"size": 3,
"expected": [
5.0,
5.0,
4.0,
3.0,
2.0
]
},
{
"name": "maximum_filter1d_constant",
"function": "maximum_filter1d",
"input": [
3.0,
3.0,
3.0,
3.0,
3.0
],
"size": 3,
"expected": [
3.0,
3.0,
3.0,
3.0,
3.0
]
},
{
"name": "maximum_filter1d_single",
"function": "maximum_filter1d",
"input": [
5.0
],
"size": 3,
"expected": [
5.0
]
},
{
"name": "maximum_filter1d_two",
"function": "maximum_filter1d",
"input": [
1.0,
5.0
],
"size": 3,
"expected": [
5.0,
5.0
]
},
{
"name": "peak_pick_simple",
"function": "peak_pick",
"input": [
0.0,
0.5,
1.0,
0.5,
0.0,
-0.5,
-1.0,
-0.5,
0.0,
0.5,
1.0,
0.5,
0.0
],
"pre_max": 1,
"post_max": 1,
"pre_avg": 1,
"post_avg": 1,
"delta": 0.5,
"wait": 1,
"expected": []
},
{
"name": "peak_pick_wide_window",
"function": "peak_pick",
"input": [
0.0,
0.2,
0.5,
0.3,
0.1,
0.0,
0.3,
0.8,
0.4,
0.1,
0.0,
0.1,
0.9,
0.5,
0.2
],
"pre_max": 2,
"post_max": 2,
"pre_avg": 3,
"post_avg": 3,
"delta": 0.1,
"wait": 2,
"expected": [
2,
7,
12
]
},
{
"name": "peak_pick_high_delta",
"function": "peak_pick",
"input": [
0.0,
0.5,
1.0,
0.5,
0.0,
0.5,
0.8,
0.5,
0.0
],
"pre_max": 1,
"post_max": 1,
"pre_avg": 1,
"post_avg": 1,
"delta": 5.0,
"wait": 0,
"expected": []
},
{
"name": "peak_pick_high_wait",
"function": "peak_pick",
"input": [
0.0,
1.0,
0.0,
1.0,
0.0,
1.0,
0.0,
1.0,
0.0
],
"pre_max": 1,
"post_max": 1,
"pre_avg": 1,
"post_avg": 1,
"delta": 0.0,
"wait": 5,
"expected": [
0,
7
]
},
{
"name": "peak_pick_onset_defaults",
"function": "peak_pick",
"input": [
0.0,
0.05,
0.1,
0.3,
0.8,
0.4,
0.1,
0.05,
0.0,
0.02,
0.1,
0.5,
0.9,
0.6,
0.2,
0.05
],
"pre_max": 1,
"post_max": 1,
"pre_avg": 4,
"post_avg": 5,
"delta": 0.07,
"wait": 1,
"expected": [
3,
11
]
}
]