support for fake recs
This commit is contained in:
@@ -1176,13 +1176,13 @@ def chirpdetection(datapath: str, plot: str, debug: str = "false") -> None:
|
||||
purged_chirps = purged_chirps[np.argsort(purged_chirps)]
|
||||
|
||||
# save them into the data directory
|
||||
np.save(datapath + "chirps.npy", purged_chirps)
|
||||
np.save(datapath + "chirp_ids.npy", purged_ids)
|
||||
np.save(datapath + "chirp_times_gp.npy", purged_chirps)
|
||||
np.save(datapath + "chirp_ids_gp.npy", purged_ids)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
# datapath = "/home/weygoldt/Data/uni/chirpdetection/GP2023_chirp_detection/data/mount_data/2020-05-13-10_00/"
|
||||
# datapath = "/home/weygoldt/Data/uni/efishdata/2016-colombia/fishgrid/2016-04-09-22_25/"
|
||||
# datapath = "/home/weygoldt/Data/uni/chirpdetection/GP2023_chirp_detection/data/mount_data/2020-03-13-10_00/"
|
||||
datapath = "../data/2022-06-02-10_00/"
|
||||
datapath = "../../chirpdetector-cnn/testing_data/"
|
||||
chirpdetection(datapath, plot="save", debug="false")
|
||||
|
||||
@@ -38,9 +38,9 @@ search_envelope_cutoff: 10 # search envelope estimation cufoff
|
||||
# search_prominence: 0.000004 # peak prominence threshold for search envelope
|
||||
# frequency_prominence: 2 # peak prominence threshold for baseline freq
|
||||
|
||||
baseline_prominence: 0.3 # peak prominence threshold for baseline envelope
|
||||
search_prominence: 0.3 # peak prominence threshold for search envelope
|
||||
frequency_prominence: 0.3 # peak prominence threshold for baseline freq
|
||||
baseline_prominence: 0.00005 # peak prominence threshold for baseline envelope
|
||||
search_prominence: 0.000005 # peak prominence threshold for search envelope
|
||||
frequency_prominence: 1 # peak prominence threshold for baseline freq
|
||||
|
||||
# Classify events as chirps if they are less than this time apart
|
||||
chirp_window_threshold: 0.02
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import os
|
||||
|
||||
import yaml
|
||||
import numpy as np
|
||||
from thunderfish.dataloader import DataLoader
|
||||
import matplotlib.pyplot as plt
|
||||
import numpy as np
|
||||
import yaml
|
||||
from thunderfish.dataloader import DataLoader
|
||||
|
||||
|
||||
class ConfLoader:
|
||||
@@ -38,8 +38,12 @@ class LoadData:
|
||||
# load raw data
|
||||
self.datapath = datapath
|
||||
self.file = os.path.join(datapath, "traces-grid1.raw")
|
||||
self.raw = DataLoader(self.file, 60.0, 0, channel=-1)
|
||||
self.raw_rate = self.raw.samplerate
|
||||
if os.path.isfile(self.file) == False:
|
||||
self.raw = np.load(os.path.join(datapath, "raw.npy"))
|
||||
self.raw_rate = 20000.0
|
||||
else:
|
||||
self.raw = DataLoader(self.file, 60.0, 0, channel=-1)
|
||||
self.raw_rate = self.raw.samplerate
|
||||
|
||||
# load wavetracker files
|
||||
self.time = np.load(datapath + "times.npy", allow_pickle=True)
|
||||
|
||||
Reference in New Issue
Block a user