plot subset
This commit is contained in:
parent
dda0d645f3
commit
23f5035a59
@ -102,7 +102,7 @@ class ChirpPlotBuffer:
|
|||||||
self.t0 = 0
|
self.t0 = 0
|
||||||
|
|
||||||
fig = plt.figure(
|
fig = plt.figure(
|
||||||
figsize=(14 / 2.54, 20 / 2.54)
|
figsize=(14 * ps.cm, 18 * ps.cm)
|
||||||
)
|
)
|
||||||
|
|
||||||
gs0 = gr.GridSpec(
|
gs0 = gr.GridSpec(
|
||||||
@ -652,16 +652,16 @@ def chirpdetection(datapath: str, plot: str, debug: str = 'false') -> None:
|
|||||||
raw_time = np.arange(data.raw.shape[0]) / data.raw_rate
|
raw_time = np.arange(data.raw.shape[0]) / data.raw_rate
|
||||||
|
|
||||||
# good chirp times for data: 2022-06-02-10_00
|
# good chirp times for data: 2022-06-02-10_00
|
||||||
window_start_index = (3 * 60 * 60 + 6 * 60 + 43.5) * data.raw_rate
|
# window_start_index = (3 * 60 * 60 + 6 * 60 + 43.5) * data.raw_rate
|
||||||
window_duration_index = 60 * data.raw_rate
|
# window_duration_index = 60 * data.raw_rate
|
||||||
|
|
||||||
# t0 = 0
|
# t0 = 0
|
||||||
# dt = data.raw.shape[0]
|
# dt = data.raw.shape[0]
|
||||||
# window_start_seconds = (23495 + ((28336-23495)/3)) * data.raw_rate
|
# window_start_seconds = (23495 + ((28336-23495)/3)) * data.raw_rate
|
||||||
# window_duration_seconds = (28336 - 23495) * data.raw_rate
|
# window_duration_seconds = (28336 - 23495) * data.raw_rate
|
||||||
|
|
||||||
# window_start_index = 0
|
window_start_index = 0
|
||||||
# window_duration_index = data.raw.shape[0]
|
window_duration_index = data.raw.shape[0]
|
||||||
|
|
||||||
# generate starting points of rolling window
|
# generate starting points of rolling window
|
||||||
window_start_indices = np.arange(
|
window_start_indices = np.arange(
|
||||||
@ -675,7 +675,7 @@ def chirpdetection(datapath: str, plot: str, debug: str = 'false') -> None:
|
|||||||
multiwindow_chirps = []
|
multiwindow_chirps = []
|
||||||
multiwindow_ids = []
|
multiwindow_ids = []
|
||||||
|
|
||||||
for st, window_start_index in enumerate(window_start_indices):
|
for st, window_start_index in enumerate(window_start_indices[3175:]):
|
||||||
|
|
||||||
logger.info(f"Processing window {st+1} of {len(window_start_indices)}")
|
logger.info(f"Processing window {st+1} of {len(window_start_indices)}")
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ from IPython import embed
|
|||||||
def main(datapaths):
|
def main(datapaths):
|
||||||
|
|
||||||
for path in datapaths:
|
for path in datapaths:
|
||||||
chirpdetection(path, plot='false')
|
chirpdetection(path, plot='show')
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
@ -45,6 +45,7 @@ if __name__ == '__main__':
|
|||||||
|
|
||||||
recs = pd.DataFrame(columns=['recording'], data=valid_datasets)
|
recs = pd.DataFrame(columns=['recording'], data=valid_datasets)
|
||||||
recs.to_csv('../recs.csv', index=False)
|
recs.to_csv('../recs.csv', index=False)
|
||||||
|
datapaths = ['../data/mount_data/2020-03-25-10_00/']
|
||||||
main(datapaths)
|
main(datapaths)
|
||||||
|
|
||||||
# window 1524 + 244 in dataset index 4 is nice example
|
# window 1524 + 244 in dataset index 4 is nice example
|
||||||
|
Loading…
Reference in New Issue
Block a user