Skip to content

Missing measures in formant tracks at segment edges #231

@massimolipari

Description

@massimolipari

This is an issue Xiaoyi and I stumbled upon while playing around with the save_padding parameter in extract_and_save_formant_tracks() from polyglotdb/acoustics/formants/helper.py.

Currently, its value is set to 0.02 s. Querying the tracks without interpolation produces what's given in formants-refined_nointer_pad-0.02s.csv. The measurements are all offset from the start of the start of the segment by 0.005 s. With interpolation (to 21 equidistant points), this sometimes (but not always--only in ~500 instances?) results in missing values (for some reason, only at the left edge), as in formants-refined_inter_pad-0.02s.csv.

My suspicion was that this is due to a mismatch between the analysis window width (0.025 ms, which actually means 0.05 s per the Praat documentation) and the amount of save_padding, which makes it so that the very first analysis window is centered around a time point 5 ms after the start of the of the segment. So I tried changing save_padding to 0.025ms. This gave formants-refined_nointer_pad-0.025s.csv, where in the vast majority of cases, the first measurement is indeed at exactly 0 ms, as it should be. For reasons that escape me though, there is a small number of cases (~100) where the first measurement is still 5 ms late, which produces NAs (again, at the left edge only) as before when interpolating--cf. formants-refined_inter_pad-0.025s.csv.

I'm not entirely sure what's going on here. Per our verbal communication, I'll try increasing the save_padding to 0.05 to see if that hack eliminates the remaining NAs, but we should figure out what the underlying issue is.

Link to files: https://mcgill-my.sharepoint.com/:u:/g/personal/massimo_lipari_mail_mcgill_ca/EZ9Z8UtwDa9BtqUk_RgaF5MBWP9f0jNphBuKNtsJOh7KwQ?e=4YCHqW

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions