diff --git a/pyproject.toml b/pyproject.toml index ca21607..a48ff4c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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 = [ diff --git a/src/fasttrackpy/tracks.py b/src/fasttrackpy/tracks.py index 80d1458..8bb2571 100644 --- a/src/fasttrackpy/tracks.py +++ b/src/fasttrackpy/tracks.py @@ -586,7 +586,7 @@ 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 @@ -594,7 +594,7 @@ 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 diff --git a/tests/test_outputs.py b/tests/test_outputs.py index 575a8f9..0fd7606 100644 --- a/tests/test_outputs.py +++ b/tests/test_outputs.py @@ -25,16 +25,19 @@ 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") @@ -42,6 +45,7 @@ def test_param_df(self, candidates): 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') diff --git a/uv.lock b/uv.lock index ed6d800..c071ff9 100644 --- a/uv.lock +++ b/uv.lock @@ -786,7 +786,7 @@ wheels = [ [[package]] name = "fasttrackpy" -version = "0.6.0" +version = "0.6.1" source = { editable = "." } dependencies = [ { name = "aligned-textgrid" },