Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "fasttrackpy"
version = "0.6.0"
version = "0.6.1"
requires-python = ">=3.10,<3.14"
description = "A python implementation of FastTrack"
authors = [
Expand Down
4 changes: 2 additions & 2 deletions src/fasttrackpy/tracks.py
Original file line number Diff line number Diff line change
Expand Up @@ -586,15 +586,15 @@ def __get_pitch(self) -> npt.NDArray:
)
pitch_array = np.array([
pitch_obj.get_value_at_time(t)
for t in self.candidates[0].time_domain
for t in self.winner.time_domain
])
return pitch_array

def __get_intensty(self) -> npt.NDArray:
intensity_obj = self.sound.to_intensity(time_step = self.time_step)
intensity = np.array([
intensity_obj.get_value(time = t)
for t in self.candidates[0].time_domain
for t in self.winner.time_domain
])
return intensity

Expand Down
18 changes: 11 additions & 7 deletions tests/test_outputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,23 +25,27 @@
def dest(tmp_path_factory):
dest = tmp_path_factory.mktemp("dest")
return dest
@TEST_DATA

class TestDataFrames:
def test_formant_df(self, candidates):

formant_df = candidates.to_df(output="formants")
big_formant_df = candidates.to_df(which='all', output="formants")
@CORPUS
def test_formant_df(self, candidates2):
for cand in candidates2:

formant_df = cand.to_df(output="formants")
big_formant_df = cand.to_df(which='all', output="formants")

assert isinstance(formant_df, pl.DataFrame)
assert isinstance(big_formant_df, pl.DataFrame)
assert isinstance(formant_df, pl.DataFrame)
assert isinstance(big_formant_df, pl.DataFrame)

@TEST_DATA
def test_param_df(self, candidates):
param_df = candidates.to_df(output="param")
big_param_df = candidates.to_df(which='all', output="formants")

assert isinstance(param_df, pl.DataFrame)
assert isinstance(big_param_df, pl.DataFrame)

@TEST_DATA
def test_log_param_df(self, candidates):
log_param_df = candidates.to_df(output="log_param")
big_log_param_df = candidates.to_df(which='all', output='log_param')
Expand Down
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.