You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to understand the source code of fp.py file and I think you are using not consistent formulas to compute segments of 60 seconds in time units.
In the first case, we can retrieve the sixty seconds segment length by multiplying 60 seconds with 43.45 as shown in line 134:
cut_code_string_length(code_string)
""" Remove all codes from a codestring that are > 60 seconds in length.
Because we can only match 60 sec, everything else is unnecessary """
sixty_seconds = int(60.0 * 43.45 + first_timestamp)
But in the second case (see line 482) we use another computation to get the same parameter (segmentlength) :
def split_codes(fp):
""" Split a codestring into a list of codestrings. Each string contains
at most 60 seconds of codes, and codes overlap every 30 seconds. Given a
track id, return track ids of the form trid-0, trid-1, trid-2, etc. """
# Convert seconds into time units
segmentlength = 60 * 1000.0 / 43.45
Maybe I am wrong but I think the second formula is not correct. The right formula should be:
segmentlength = 60 * 43.45
If I am wrong please explain me the meaning of the second formula, otherwise please fix this issue.
Thank you very much.
The text was updated successfully, but these errors were encountered:
Hi all,
I'm trying to understand the source code of fp.py file and I think you are using not consistent formulas to compute segments of 60 seconds in time units.
In the first case, we can retrieve the sixty seconds segment length by multiplying 60 seconds with 43.45 as shown in line 134:
But in the second case (see line 482) we use another computation to get the same parameter (segmentlength) :
Maybe I am wrong but I think the second formula is not correct. The right formula should be:
If I am wrong please explain me the meaning of the second formula, otherwise please fix this issue.
Thank you very much.
The text was updated successfully, but these errors were encountered: