Skip to content

Commit

Permalink
naming convention: self.plot_*
Browse files Browse the repository at this point in the history
  • Loading branch information
nilomr committed May 7, 2022
1 parent a384a68 commit d85b8a4
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 11 deletions.
2 changes: 1 addition & 1 deletion tests/paper_worked_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ def SegmentMetadata_patch(self) -> Dict[str, Any]:
dataset.segment_into_units()

for voc in dataset.vocs.index:
dataset.plot_voc_seg(voc)
dataset.plot_segments(voc)


# %%
Expand Down
2 changes: 1 addition & 1 deletion tests/scratchpad.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@
dataset.segment_into_units()

for voc in dataset.vocs.index:
dataset.plot_voc_seg(voc)
dataset.plot_segments(voc)


# %%
Expand Down
26 changes: 18 additions & 8 deletions tests/test_pipeline/test_bengalese_finch.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,15 @@ def files_to_segment(DIRS):
@pytest.fixture()
def new_dataset(DIRS):
params = Parameters(
sr=32000, top_dB=125, lowcut=200, highcut=11000, dereverb=True
sr=32000,
window_length=256,
hop_length=128,
fft_size=2048,
top_dB=110,
num_mel_bins=224,
lowcut=0,
highcut=11000,
dereverb=False,
)
new_dataset = KantoData(
DATASET_ID,
Expand Down Expand Up @@ -150,7 +158,15 @@ def bf_data_test_manual():
)

params = Parameters(
sr=32000, top_dB=130, lowcut=200, highcut=11000, dereverb=True
sr=32000,
window_length=256,
hop_length=128,
fft_size=2048,
top_dB=110,
num_mel_bins=224,
lowcut=0,
highcut=11000,
dereverb=False,
)
dataset = KantoData(
DATASET_ID,
Expand All @@ -163,14 +179,8 @@ def bf_data_test_manual():
out_dir = DIRS.DATA / "datasets" / DATASET_ID / f"{DATASET_ID}.db"
dataset = pickle.load(open(out_dir, "rb"))
dataset.segment_into_units()

dataset.parameters.update(song_level=False)
dataset.get_units()

dataset.reload()
dataset.parameters.update(song_level=False)
dataset.cluster_ids(min_sample=5)

dataset.parameters.update(song_level=False)
dataset.prepare_interactive_data()
dataset.open_label_app()
2 changes: 1 addition & 1 deletion tests/test_pipeline/test_storm_petrel.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,4 +208,4 @@ def bf_data_test_manual():
dataset.open_label_app()

for voc in dataset.vocs.index[:2]:
dataset.plot_voc_seg(voc)
dataset.plot_segments(voc)

0 comments on commit d85b8a4

Please sign in to comment.