added more docstrings and moved chirpsim
This commit is contained in:
parent
ce1c0fa319
commit
3af4426a26
@ -171,10 +171,11 @@ def main(datapath: str) -> None:
|
||||
ident = np.load(datapath + "ident_v.npy", allow_pickle=True)
|
||||
|
||||
# set time window # <------------------------ Iterate through windows here
|
||||
window_duration = 60 * 5 # 5 minutes window
|
||||
window_overlap = 30 # 30 seconds overlap
|
||||
window_duration = 60 * 5 * data.samplerate # 5 minutes window
|
||||
window_overlap = 30 * data.samplerate # 30 seconds overlap
|
||||
raw_time = np.arange(data.shape[0])
|
||||
window_starts = np.arange(
|
||||
time[0], time[-1], window_duration)
|
||||
raw_time[0], raw_time[-1], window_duration - window_overlap / 2)
|
||||
|
||||
embed()
|
||||
exit()
|
||||
|
@ -17,13 +17,14 @@ def bandpass_filter(
|
||||
rate : float
|
||||
The sampling rate
|
||||
lowf : float
|
||||
The low frequency cutoff
|
||||
The low cutoff frequency
|
||||
highf : float
|
||||
The high frequency cutoff
|
||||
The high cutoff frequency
|
||||
|
||||
Returns
|
||||
-------
|
||||
np.ndarray : The filtered data
|
||||
np.ndarray
|
||||
The filtered data
|
||||
"""
|
||||
sos = butter(2, (lowf, highf), "bandpass", fs=rate, output="sos")
|
||||
fdata = sosfiltfilt(sos, data)
|
||||
|
Loading…
Reference in New Issue
Block a user