Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retain sub-second resolution in acq_time column of scans tsv files #447

Closed
tsalo opened this issue May 10, 2020 · 1 comment · Fixed by #451
Closed

Retain sub-second resolution in acq_time column of scans tsv files #447

tsalo opened this issue May 10, 2020 · 1 comment · Fixed by #451

Comments

@tsalo
Copy link
Member

tsalo commented May 10, 2020

Summary

I am working on a method to synchronize physio data from either BioPac or Labchart with BIDS-format scan data in order to convert the physio data to BIDS format (see physiopy/phys2bids#219). This requires sub-second acquisition timing information from the scan data. At the moment, I use the AcquisitionTime field heudiconv retains in the json files, but I think that the scans.tsv file would be easier to access. The only unfortunate thing is that, in the conversion, sub-second timing information is discarded. See below:

heudiconv/heudiconv/bids.py

Lines 407 to 411 in 5681e0d

try:
date = dcm_data.ContentDate
time = dcm_data.ContentTime.split('.')[0]
td = time + date
acq_time = datetime.strptime(td, '%H%M%S%Y%m%d').isoformat()

If that information could be retained, it would make it easier to synchronize the scans with externally-acquired data, including physio.

@yarikoptic
Copy link
Member

indeed, I see no immediate reason why we did not store sub-second resolution. Probably with multi-second TRs etc we simply did not care enough. heh heh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants