-
Notifications
You must be signed in to change notification settings - Fork 90
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
PhysIO, Siemens, Manual Recording: Using MCPU Timer instead of MDH #201
Comments
Dear Tom, Great you are trying out PhysIO! Indeed, we are using the Measurement Data Header (MDH) clock as well (see our Wiki page), which was suggested by both Tim Verstynen and Chris Rorden's physiological noise packages as well, see for example: https://github.com/neurolabusc/Part#usage The way I understand it is that while the actual physiological recording happens on the device with the MPCU clock, the MR scanning is controlled by the MDH clock that issues the creation and acquisition of each DICOM image volume. Therefore, the When you say that the DICOM times are off, what parameter are you looking at? I have noticed that in recent Siemens releases (e.g., XA30), there is no Finally, I had another thought: when do you start/stop your physiological logging? Separately for each fMRI run or only once for each subject or even day? If you started logging at the beginning of a scan day, there could be several hours of delay to the DICOM scan time stamp, of course. Why MPCU and MDH clock are so different, I cannot really tell. This might be even something to tell Siemens service. But it shouldn't affect your relative timing to the scan time stamp, I agree. I hope that helps. All the best, |
PS: If you want to look at the code in PhysIO where this timing is determined: Note that both MDH and MPCU times are written out by the 2nd function, named But again, I believe MDH is the time that you should try to synchronize |
Dear Lars Thanks a lot for the quick response. Yes, I do have the parameter LogStartMDHTime: 31707445 the DICOM Which matches both the actual time of day we acquired the images and the Sorry, I wasn't entirely clear in my description before. What surprised me was that the Yes, we started and stopped the acquisition of the physiological recordings manually for each run, using the ideacmdtool. Thank you, we did already communicate this issue to Siemens. I was just hoping for a workaround with, for example, the MCPU clock, for the data that are already collected. Something else I noticed: You don’t divide by 1000 here, even though the variable has "second" in its name. Is that on purpose? Best |
Dear Tom, That's really interesting. Obviously, since the logging of the physiological recordings happens on the MPCU, it's the right "native" time of the recording for that device. But I was under the assumption that the DICOM file time stamps are issued by the MDH. You are right, the
The only other suggestions I have, would be
All the best, |
Dear Lars Yes, unfortunately, it’s neither an AM/PM nor a timezone shift, which would be easier to fix. From what I found in the DICOM Header, our version should be VE12: Other timestamps I found:
Which seems to fit with the No, we didn't use an external trigger, we got both ext and ext2, which are empty/filled with zeros, besides the Have you ever done a comparison of the timestamps? For instance the quality of the regressors derived from the MDH vs. regressors from the MCPU timestamps? Thanks a lot for the help and the suggestions, I am going to look into the possibility of such a debugging experiment. Best |
Dear Tom, Thank you for looking further into this, I am curious to hear what Siemens thinks about it. Regarding a timestamp comparison between MPCU and MDH, I never checked this systematically, but just pulled out two runs from a recent experiment on our Prisma with XA30. These runs were just 10 min apart, but the differences in relative delay are considerable:
So there is a small jitter (~10 ms) within a run of 5 min duration, but between the two runs, the delay varies by more than 600 ms and even changes sign. I can tell you that a few 100 ms delay can have a significant impact on the phase-based regressors (RETROICOR), whereas for the slower response function-related models (HRV, RVT) it will not change a lot. Sorry that I have no better news - and by the way, thank you for spotting the MPCU scaling bug, of course one has to divide by 1000. Probably didn't spot it, because we didn't use this time. I will fix it for the next release. All the best, |
Dear Lars Thanks for checking your runs. With this immense delay, and significant impact on the regressors at 100ms, I don’t see much hope for our recordings. Yes, I figured your script would parse the MCPU time but not make use of it. Thanks for all the help and the information, I’ll get back to you in case I have any updates, including those from Siemens. Best |
Dear Tom @TomW92, I wondered whether you got any feedback from Siemens in the meantime. I am looking at the clocks again, and find more and more contradicting information:
Alternatively, I have heard about two venues to explore for your future scans:
Let me know what you found out and All the best, |
Dear Lars, Sorry for the delayed answer and thank you for the thorough investigation. Unfortunately, nothing new from Siemens so far, only that I also got the information that the MCPU clock should derive from the reconstruction computer. The original physioload function is very interesting. One would think that something like this wouldn’t necessarily change from one version to the next, but I agree that there is much evidence for the MDH clock, especially since it works well for users of your toolbox. Also, if I’m not mistaken, the link to the Aguierre Lab actually states that the MDH time is preferred:
But it is not entirely clear, since right after this quote they continue with an example that makes use of the MCPU and DICOM time instead. Thanks a lot about the suggestions for alternative ways to sync the physio files, I am going to ask about that. Another idea was to record the fMRI trigger, either as a flag within the physio-recording or in a different channel (ext1 or 2 for example) to sync the files without any time stamps. What is your opinion about that option? Thanks again! Best wishes, |
Dear Lars, As Tom already discussed with you, the MDH clock in our .puls and .resp recordings does not seem to be synchronized. Therefore, we decided to record the fMRI trigger as ext to synchronize the files. I was wondering how we could synchronize the .ext file with the .resp and .puls files using PhysIO. Do you have any experience with this kind of setup? Thank you very much in advance for your help! |
Dear Marta, I am not sure whether this already works out of the box, but it should be fairly simple to integrate. If you can send me an example dataset with all 3 files ( You can either add the files here or send an e-mail to me via the address mentioned in the README. All the best, |
Dear Experts,
in my .puls and .resp recordings, the MDH Time seems to be out of sync. While it correctly tracks the elapsed time, the start and stop Time is inconsistently shifted, usually by several hours. MCPU and DICOM times are synced and look okay (correct time of day, etc).
I read here that the MDH Time is derived from the scanner clock and thus most in sync with the image files. It is also the timestamp that the PhsysIO toolbox uses, correct?
I was wondering how the MDH Timer can be off (and if it's indeed the scanner clock, shouldn't the DICOM files be equally off?) and what's the best fix to still make the PhysIO toolbox work.
Is there always a ~300ms gap between MDH and MCPU Start time, as in your example files in the wiki, and would a somewhat extrapolated (or even the plain) MCPU Time be sufficiently precise?
An example from one of the log files:
LogStartMDHTime: 31707445
LogStopMDHTime: 32006415
LogStartMPCUTime: 58682090
LogStopMPCUTime: 58981045
Attached a plot to show the inconsistent shifting of the MDH clock.
Thanks in advance for the feedback!
Best
Tom
The text was updated successfully, but these errors were encountered: