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

[FIX] Clarify continuous recording metadata fields #167

Merged
merged 5 commits into from
May 7, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,21 @@ directory. For example:`task-movie_stim.tsv.gz`
Physiological recordings such as cardiac and respiratory signals and other
continuous measures (such as parameters of a film or audio stimuli) can be
specified using two files: a gzip compressed TSV file with data (without header
choldgraf marked this conversation as resolved.
Show resolved Hide resolved
line) and a JSON for storing start time, sampling frequency, and name of the
columns from the TSV. Please note that in contrast to other TSV files this one
does not include a header line. Instead the name of columns are specified in the
JSON file. This is to improve compatibility with existing software (FSL PNM) as
well as make support for other file formats possible in the future. Start time
should be expressed in seconds in relation to the time of start of acquisition
of the first volume in the corresponding imaging file (negative values are
allowed). Sampling frequency should be expressed in Hz. Recordings with
different sampling frequencies and/or starting times should be stored in
separate files. The following naming conventions should be used for column
names:
line) and a JSON for storing the following metadata fields:

| Field name | Definition |
| :---------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------- |
| SamplingFrequency | REQUIRED. Sampling frequency in Hz of all columns in the file. |
| StartTime | REQUIRED. Start time in seconds in relation to the start of acquisition of the first volume in the corresponding imaging file (negative values are allowed). |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sounds like it only applies to MRI data

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree- what about "Start time in seconds in relation to the first data sample in the corresponding neural dataset (negative values are allowed)"

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm assuming "start of acquisition of the first volume" is an attempt to precisely define the onset of the first data sample. What about: "Start time in seconds in relation to the start of acquisition of the first data sample in the corresponding neural dataset (negative values are allowed)."

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm. I'm noticing that this appears in func/. Is that going to cause problems with MEG/EEG/iEEG? Or would this be similar to a simultaneous fMRI/EEG?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you mean by

I'm noticing that this appears in func/

?

+1 on changing to: "Start time in seconds in relation to the start of acquisition of the first data sample in the corresponding neural dataset (negative values are allowed)." as @effigies suggests

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sappelhoff I mean that on line 7, we specify that these files occur in the func/ subdirectory. Should this be expanded to include other directory names?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah I see, yes it could be made more general, for example with a <modality> placeholder? The text below would have to be adjusted so that the <matches> placeholder does not only refer to MRI data 👍

| Columns | REQUIRED. Names of columns in file. |

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is probably good to add units as optional

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was moving to add this, but we should probably consider how to make this as conformant as possible with https://bids-specification.readthedocs.io/en/stable/02-common-principles.html#tabular-files.

For example, we could then allow the same metadata for each column (LongName, Description, Levels, Units, TermURL). So something like:

{
  "SamplingFrequency": 10,
  "StartTime": 0.0,
  "Columns": ["cardiac"],
  "cardiac": {
    "LongName": "continuous pulse measurement",
    "Units": "mV",
    "TermURL": "..."
  }
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, looks like a good reuse of existing structure

Please note that in contrast to other TSV files this one does not include a
header line. Instead the name of columns are specified in the JSON file.
This is to improve compatibility with existing software (FSL PNM) as
well as make support for other file formats possible in the future.
Recordings with different sampling frequencies and/or starting times should be
stored in separate files.
The following naming conventions should be used for column names:

| Column name | Definition |
| :---------- | :--------------------------------------------------- |
Expand Down