Skip to content

Commit

Permalink
[MISC] consistently list filename templates; ext --> extension; `…
Browse files Browse the repository at this point in the history
…_photo.jpg` --> `_photo.<extension>` (#1458)

* try file template fix

* <ext> -> <extension>; photo.jpg -> photo.<extension>

* suffix name template consistency

* add MEG appendix link crosstalk+calibration

* add physi+stim to motion in schema

* tracksys required for physi/stim

* tracksys is optional events+timeseries; fix inline filename template
  • Loading branch information
sappelhoff authored Apr 7, 2023
1 parent 4e38968 commit af6fe73
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 19 deletions.
2 changes: 1 addition & 1 deletion src/derivatives/common-data-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ Template:
<pipeline_name>/
sub-<label>/
<datatype>/
<source_entities>[_space-<space>][_desc-<label>]_<suffix>.<ext>
<source_entities>[_space-<space>][_desc-<label>]_<suffix>.<extension>
```

Data is considered to be *preprocessed* or *cleaned* if the data type of the input,
Expand Down
2 changes: 1 addition & 1 deletion src/derivatives/imaging.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Template:
<pipeline_name>/
sub-<label>/
<datatype>/
<source_entities>[_space-<space>][_res-<label>][_den-<label>][_desc-<label>]_<suffix>.<ext>
<source_entities>[_space-<space>][_res-<label>][_den-<label>][_desc-<label>]_<suffix>.<extension>
```

Volumetric preprocessing does not modify the number of dimensions, and so
Expand Down
2 changes: 1 addition & 1 deletion src/derivatives/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ in [Derived dataset and pipeline description][derived-dataset-description].
copy of that raw file.

- Each Derivatives filename MUST be of the form:
`<source_entities>[_keyword-<value>]_<suffix>.<ext>`
`<source_entities>[_keyword-<value>]_<suffix>.<extension>`
(where `<value>` could either be an `<index>` or a `<label>` depending on
the keyword; see [Definitions][definitions])

Expand Down
4 changes: 2 additions & 2 deletions src/modality-specific-files/electroencephalography.md
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ voxels (starting from `[0, 0, 0]`).
}
```

## Landmark photos (`*_photo.jpg`)
## Landmark photos (`*_photo.<extension>`)

Photos of the anatomical landmarks and/or fiducials.

Expand All @@ -444,7 +444,7 @@ indicate acquisition of different photos of
the same face (or other body part in different angles to show, for example, the
location of the nasion (NAS) as opposed to the right periauricular point (RPA).

### Example `*_photo.jpg`
### Example `*_photo.<extension>`

Picture of a NAS fiducial placed between the eyebrows, rather than at the
actual anatomical nasion: `sub-0001_ses-001_acq-NAS_photo.jpg`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ data.
}
```

## Photos of the electrode positions (`*_photo.jpg`)
## Photos of the electrode positions (`*_photo.<extension>`)

<!--
This block generates a filename templates.
Expand All @@ -451,18 +451,18 @@ or entirely omitted prior to sharing, depending on obtained consent.
If there are photos of the electrodes, the [`acq-<label>`](../appendices/entities.md#acq) entity should be specified
with:

- `*_photo.jpg` in case of an operative photo
- `*_photo.<extension>` in case of an operative photo

- `*_acq-xray#_photo.jpg` in case of an x-ray picture
- `*_acq-xray#_photo.<extension>` in case of an x-ray picture

- `*_acq-drawing#_photo.jpg` in case of a drawing or sketch of electrode
- `*_acq-drawing#_photo.<extension>` in case of a drawing or sketch of electrode
placements

- `*_acq-render#_photo.jpg` in case of a rendering
- `*_acq-render#_photo.<extension>` in case of a rendering

The [`ses-<label>`](../appendices/entities.md#ses) entity may be used to specify when the photo was taken.

### Example `*_photo.jpg`
### Example `*_photo.<extension>`

Example of the operative photo of ECoG electrodes (here is an annotated example in
which electrodes and vasculature are marked, taken from Hermes et al.,
Expand Down
14 changes: 10 additions & 4 deletions src/modality-specific-files/magnetoencephalography.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@ remember to list all files separately in `scans.tsv` and that the entries for th
`acq_time` column in `scans.tsv` MUST all be identical, as described in
[Scans file](../modality-agnostic-files.md#scans-file).

The Neuromag/Elekta/Megin system may also produce datasets that require a set of
`crosstalk` and `calibration` files to be used properly (see also filename templates above).
Please refer to
[Cross-talk and fine-calibration files](../appendices/meg-file-formats.md#cross-talk-and-fine-calibration-files)
for more information on this detail.

Another manufacturer-specific detail pertains to the KIT/Yokogawa/Ricoh system,
which saves the MEG sensor coil positions in a separate file with two possible filename extensions (`.sqd`, `.mrk`).
For these files, the `markers` suffix MUST be used.
Expand Down Expand Up @@ -391,10 +397,10 @@ For more information on typical coordinate systems for MEG-MRI coregistration:
or:
[http://neuroimage.usc.edu/brainstorm/CoordinateSystems](http://neuroimage.usc.edu/brainstorm/CoordinateSystems)

## Landmark photos (`*_photo.jpg`)
## Landmark photos (`*_photo.<extension>`)

Photos of the anatomical landmarks and/or head localization coils
(`*_photo.jpg`)
(`*_photo.<extension>`)

<!--
This block generates a filename templates.
Expand All @@ -416,14 +422,14 @@ The [`acq-<label>`](../appendices/entities.md#acq) entity can be used to indicat
the same face (or other body part in different angles to show, for example, the
location of the nasion (NAS) as opposed to the right periauricular point (RPA)).

### Example `*_photo.jpg`
### Example `*_photo.<extension>`

Example of the NAS fiducial placed between the eyebrows, rather than at the
actual anatomical nasion: `sub-0001_ses-001_acq-NAS_photo.jpg`

![placement of NAS fiducial](images/sub-0001_ses-001_acq-NAS_photo.jpg "placement of NAS fiducial")

## Head shape and electrode description (`*_headshape.<ext>`)
## Head shape and electrode description (`*_headshape.<extension>`)

<!--
This block generates a filename templates.
Expand Down
5 changes: 3 additions & 2 deletions src/modality-specific-files/motion.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ and can be used as helpful guidance when curating new datasets.
{{ MACROS___make_filename_template(
"raw",
datatypes=["motion"],
suffixes=["motion", "channels", "events"])
suffixes=["motion", "events", "physio", "stim"])
}}

A wide variety of motion capture systems are used in human research, resulting in different proprietary data formats.
Expand Down Expand Up @@ -63,7 +63,8 @@ these time information MAY be stored in form of latencies to recording onset (fi
If a system has uneven sampling rate behavior, the `LATENCY` channel can be used to share these information.

To store events alongside motion data when there are multiple tracking systems simultaneously in use, it is RECOMMENDED to designate a tracking system to the events file.
Such an events file name SHOULD include the `tracksys` key and looks like `sub-<label>[_ses-<label>]_task-<label>[_acq-<label>]_tracksys-<label>[_run-<index>]_events.tsv`.
Such an events file name SHOULD include the `tracksys` key and looks like
`sub-<label>[_ses-<label>]_task-<label>[_tracksys-<label>][_acq-<label>][_run-<index>]_events.tsv`.
Event latencies can then be related to motion samples of multiple tracking systems also by using `acq_time` column entries in the `*_scans.tsv`.
The same principle applies when the events file is saved alongside a simultaneously recorded non-motion data (for example EEG).

Expand Down
2 changes: 1 addition & 1 deletion src/modality-specific-files/near-infrared-spectroscopy.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ have been formatted using this specification and can be used for practical guida
{{ MACROS___make_filename_template(
"raw",
datatypes=["nirs"],
suffixes=["nirs", "events", "channels", "optodes", "coordsystem", "physio", "stim"])
suffixes=["nirs", "events", "physio", "stim"])
}}

Only the *Shared Near Infrared Spectroscopy Format* ([SNIRF](https://github.com/fNIRS/snirf))
Expand Down
10 changes: 9 additions & 1 deletion src/schema/rules/files/raw/task.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ events__motion:
- motion
entities:
$ref: rules.files.raw.task.events.entities
tracksys: required
tracksys: optional

events__pet:
$ref: rules.files.raw.task.events
Expand Down Expand Up @@ -98,6 +98,14 @@ timeseries__meg:
$ref: rules.files.raw.task.timeseries.entities
processing: optional

timeseries__motion:
$ref: rules.files.raw.task.timeseries
datatypes:
- motion
entities:
$ref: rules.files.raw.task.timeseries.entities
tracksys: optional

timeseries__pet:
$ref: rules.files.raw.task.timeseries
datatypes:
Expand Down

0 comments on commit af6fe73

Please sign in to comment.