Closed nbeliy closed 4 months ago
Hi @nbeliy. Thank you for raising this issue. You are right - both PharmaceuticalDoseTime and and ScanStart should be numbers (or array of numbers for PharmaceuticalDoseTime) relative to TimeZero in seconds (not strings as in your example). @bendhouseart can confirm, but it should be a relatively quick fix using something like this example:
from datetime import datetime
time_str1 = "11:38:59"
time_str2 = "11:38:59"
time1 = datetime.strptime(time_str1, '%H:%M:%S')
time2 = datetime.strptime(time_str2, '%H:%M:%S')
time_difference = time2 - time1
round(time_difference.total_seconds())
@nbeliy updated on repo. Will add this and some other changes in version 1.3.6 and push to pypi next week on not a Friday.
Describe the bug BIDS standard for PET states that all times in sidecar JSON must be calculated w.r.t. TimeZero:
Running
ecat_cli.py
on my ECAT files, I found the times calculated as absolute times:To Reproduce
Expected behaviour The output sidecar json should show times relative to TimeZero:
Desktop (please complete the following information):