Back to the main page.

Bug 3406 - durations events imotions not correct

Status CLOSED FIXED
Reported 2018-01-30 19:57:00 +0100
Modified 2019-08-10 12:37:17 +0200
Product: FieldTrip
Component: core
Version: unspecified
Hardware: PC
Operating System: Mac OS
Importance: P5 normal
Assigned to:
URL:
Tags:
Depends on:
Blocks:
See also:

Ingrid Nieuwenhuis - 2018-01-30 19:57:24 +0100

event that is in reality ~30 sec has duration of 6057 event that is in reality ~15 sec has duration of 3035


Ingrid Nieuwenhuis - 2018-01-30 20:27:45 +0100

strangely, resampling to 1Hz of the data does give the correct amount of seconds... The ~30 sec segment ends up with 30 time points, that are also spaced 1 sec apart: Columns 1 through 10 943.6139 944.6162 945.6184 946.6206 947.6228 948.6250 949.6272 950.6294 951.6316 952.6338 Columns 11 through 20 953.6360 954.6382 955.6404 956.6426 957.6448 958.6470 959.6492 960.6514 961.6536 962.6559 Columns 21 through 30 963.6581 964.6603 965.6625 966.6647 967.6669 968.6691 969.6713 970.6735 971.6757 972.6779


Ingrid Nieuwenhuis - 2018-01-30 20:28:11 +0100

(In reply to Ingrid Nieuwenhuis from comment #0) this duration was in the event structure


Ingrid Nieuwenhuis - 2018-01-30 20:30:36 +0100

note, the ~15 sec segment (duration was 3035 in event) ends up as 14 seconds. Second goes missing... Columns 1 through 10 974.7322 975.7344 976.7366 977.7388 978.7410 979.7432 980.7454 981.7476 982.7498 983.7520 Columns 11 through 14 984.7542 985.7564 986.7586 987.7609


Ingrid Nieuwenhuis - 2018-01-30 22:11:53 +0100

when I do relative offset, the 15 sec clip does have 15 seconds: Columns 1 through 10 0.5485 1.5507 2.5529 3.5551 4.5573 5.5595 6.5617 7.5639 8.5661 9.5683 Columns 11 through 15 10.5705 11.5727 12.5749 13.5771 14.5793


Robert Oostenveld - 2018-01-31 22:38:47 +0100

event.duration should be expressed in samples, relative to the original recording, not relative to resampled version.


Ingrid Nieuwenhuis - 2018-02-03 04:52:57 +0100

ah, I misunderstood the event duration. No bug after all.


Robert Oostenveld - 2019-08-10 12:37:17 +0200

This closes a whole series of bugs that have been resolved (either FIXED/WONTFIX/INVALID) for quite some time. If you disagree, please file a new issue on https://github.com/fieldtrip/fieldtrip/issues.