This repository was archived by the owner on Dec 13, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcloudedbats_scanner.py
More file actions
65 lines (65 loc) · 2.7 KB
/
cloudedbats_scanner.py
File metadata and controls
65 lines (65 loc) · 2.7 KB
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
# #!/usr/bin/python3
# # -*- coding:utf-8 -*-
#
# import sys
# #sys.path.append('.')
#
# import matplotlib
# matplotlib.use('Agg')
#
# import datetime
# import dsp4bats
#
# print('Batfile scanner started. ', datetime.datetime.now())
#
# scanner = dsp4bats.BatfilesScanner(
# batfiles_dir='data/batfiles',
# scanning_results_dir='data/batfiles_results',
# sampling_freq= 500000, #384000, # True sampling frequency (before TE).
# debug=True) # True: Print progress information.
#
# # Get files.
# scanner.create_list_of_files()
#
# # Scan all files and extract metrics.
# print('\n', 'Scanning files. ', datetime.datetime.now(), '\n')
# scanner.scan_files(
# # Time domain parameters.
# time_filter_low_limit_hz=30000, # Lower limit for highpass or bandpass filter.
# time_filter_high_limit_hz=None, # Upper limit for lowpass or bandpass filter.
# localmax_noise_threshold_factor=2.0, # Multiplies the detected noise level by this factor.
# localmax_jump_factor=1000, # 1000 gives 1 ms jumps, 2000 gives 0.5 ms jumps.
# localmax_frame_length=1024, # Frame size to smooth the signal.
# # Frequency domain parameters.
# freq_window_size=128, #
# freq_filter_low_hz=30000, # Don't use peaks below this limit.
# freq_threshold_below_peak_db=20.0, # Threshold calculated in relation to chirp peak level.
# freq_threshold_dbfs =-50.0, # Absolute threshold in dbms.
# freq_jump_factor=2000, # 1000 gives 1 ms jumps, 2000 gives 0.5 ms jumps.
# freq_max_frames_to_check=100, # Max number of jump steps to calculate metrics.
# freq_max_silent_slots=8, # Number of jump steps to detect start/end of chirp.
# )
#
# # Plot the content of the "*_Metrics.txt" files as Matplotlib plots.
# print('\n', 'Creates plots. ', datetime.datetime.now(), '\n')
# scanner.plot_results(
# # Figure settings.
# figsize_width=16,
# figsize_height=10,
# dpi=80,
# # Plot settings.
# plot_min_time_s=0, # None: Automatic.
# plot_max_time_s=1.0, # None: Automatic.
# plot_max_freq_khz=200, # None: Automatic.
# plot_max_interval_s=0.2, # None: Automatic.
# plot_max_duration_ms=20, # None: Automatic.
# )
#
# # If the file names contains latitude/longitude information an
# # interactive map (html) will be generated.
# print('\n', 'Creates map. ', datetime.datetime.now(), '\n')
# scanner.plot_positions_on_map()
#
# print('\n', 'Batfile scanner ended. ', datetime.datetime.now(), '\n')
#
#