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

Export preprocessed traces and derived measures (HRV, RVT) at original sampling rate, preferably as BIDS #9

Open
Tracked by #1
mrikasper opened this issue Jul 26, 2022 · 3 comments

Comments

@mrikasper
Copy link
Collaborator

mrikasper commented Jul 26, 2022

Create a function to write out continuous physiological recordings physio.ons_secs.[t,c,r,svolpulse] according to BIDS in a function, e.g., code/readin/tapas_physio_write_physlogfiles_BIDS.m

{
   "SamplingFrequency": 100.0,
   "StartTime": -22.345,
    "Columns": ["cardiac", "respiratory", "trigger"],
   "cardiac": {
       "LongName": "ECG channel 1",
       "Description": "Converted Siemens_Tics (VD/VE) *_PULS.log file, cropped and synchronized to scanner and other physiology by TAPAS PhysIO Toolbox v7.2.3",
       "Units": "mV"
   }
 "trigger": {
       "LongName": "Scan Volume Trigger",
       "Description": "Converted Siemens_Tics (VD/VE) *_Info.log file, corrected (for double triggers) and merged by TAPAS PhysIO Toolbox v7.2.3",
       "Units": "1"
   }
}
  • Question: where is output file(s) saved?
    • make it user input parameter, e.g., directly in parameter structure for saving: physio.BIDS_out file
    • Define new parameter(s) in tapas_physio_new, and call in example script
    • or standard prefix as in BIDS, derived from other file/folder names? e.g., as sub-01_task-visual_run-1_physio.{json,tsv.gz}
@mrikasper
Copy link
Collaborator Author

mrikasper commented Aug 8, 2022

Correspondence of BIDS columns to ons_secs fields:

  • trigger = ons_secs.svolpulse (is a time vector, has to be transformed into the right row of the .tsv file)
    • exists only after step 2 in main, tapas_physio_create_scan_timing
    • conversion from time in svolpulse to row in .tsv file via find(ons_secs.svolpulse(iVolume)==ons_secs.t) or similar
  • cardiac = ons_secs.c
    • exists after step 1 in main tapas_physio_read_physlogfiles
  • respiratory = ons_secs.r

@likeajumprope
Copy link
Owner

@mrikasper where can I find the sampling frequency? Is it physio.log_files.sampling_interval? Also I am committing into the branch created from the issue, if you want to have a look

@mrikasper
Copy link
Collaborator Author

Related to this common user request, it would be great to also allow for the extraction of derived physiological measures (RVT, HRV) at the initial sampling frequency

  • At the moment, this is only possible after the resampling to the volume onsets of the fMRI time series
  • The output should ultimately be BIDS, but a first step would be to provide the traces themselves at raw resolution in the physio.mat file

@mrikasper mrikasper changed the title Function to write out preprocessed traces as BIDS Function to write out preprocessed traces and derived measures (HRV, RVT) at original resolution, preferably as BIDS Dec 1, 2023
@mrikasper mrikasper changed the title Function to write out preprocessed traces and derived measures (HRV, RVT) at original resolution, preferably as BIDS Export preprocessed traces and derived measures (HRV, RVT) at original sampling rate, preferably as BIDS Dec 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

When branches are created from issues, their pull requests are automatically linked.

2 participants