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

[ENH] BEP030: Functional Near-Infrared Spectroscopy #802

Merged
merged 110 commits into from
Oct 5, 2022
Merged
Show file tree
Hide file tree
Changes from 107 commits
Commits
Show all changes
110 commits
Select commit Hold shift + click to select a range
6b5b218
Add fNIRS
rob-luke May 22, 2021
c8712f6
Rename
rob-luke Feb 17, 2022
f25e11f
Review
rob-luke Feb 17, 2022
9ea41aa
Review
rob-luke Feb 17, 2022
ac458b5
Use macros
rob-luke Feb 17, 2022
ec0c9c3
Update metadata.yaml
rob-luke Mar 3, 2022
9d493ee
Update 11-functional-near-infrared-spectroscopy.md
rob-luke Mar 3, 2022
5aea159
Update columns.yaml
rob-luke Jun 12, 2022
b1e70ea
Update columns.yaml
rob-luke Jun 12, 2022
f3ef8c9
Update metadata.yaml
rob-luke Jun 12, 2022
b35cfe3
Use master schemacode
rob-luke Jun 12, 2022
11c7071
Revert "Use master schemacode"
rob-luke Jun 12, 2022
d109049
Merge branch 'master' into bep030
sappelhoff Jun 14, 2022
a6a7d41
SCHEMA: Update datatype rules to be named, have datatypes key
effigies Jun 14, 2022
5523bda
Update src/04-modality-specific-files/11-functional-near-infrared-spe…
rob-luke Jun 20, 2022
1933ef5
Update src/04-modality-specific-files/11-functional-near-infrared-spe…
rob-luke Jun 20, 2022
3954a71
Update src/schema/objects/columns.yaml
rob-luke Jun 20, 2022
a94b3c2
Update src/schema/objects/columns.yaml
rob-luke Jun 20, 2022
31c0f45
Update src/04-modality-specific-files/11-functional-near-infrared-spe…
rob-luke Jun 20, 2022
9877469
Update src/04-modality-specific-files/11-functional-near-infrared-spe…
rob-luke Jun 20, 2022
9a903f3
Update src/04-modality-specific-files/11-functional-near-infrared-spe…
rob-luke Jun 20, 2022
dd91b62
Update src/schema/objects/columns.yaml
rob-luke Jun 20, 2022
a78574a
Update src/schema/objects/columns.yaml
rob-luke Jun 20, 2022
c64bc52
Update src/schema/objects/columns.yaml
rob-luke Jun 20, 2022
6190458
Update src/04-modality-specific-files/11-functional-near-infrared-spe…
rob-luke Jun 20, 2022
0c160f9
Update src/04-modality-specific-files/11-functional-near-infrared-spe…
rob-luke Jun 20, 2022
57f5209
Update src/04-modality-specific-files/11-functional-near-infrared-spe…
rob-luke Jun 20, 2022
c8ec341
Update src/04-modality-specific-files/11-functional-near-infrared-spe…
rob-luke Jun 20, 2022
16f3503
Update src/04-modality-specific-files/11-functional-near-infrared-spe…
rob-luke Jun 20, 2022
948cd70
Update src/04-modality-specific-files/11-functional-near-infrared-spe…
rob-luke Jun 20, 2022
fc881f4
Fix missing info in render
rob-luke Jun 20, 2022
8a37810
Fix missing rules for type in nirs
rob-luke Jun 20, 2022
2790e3f
Add acquisition
rob-luke Jun 20, 2022
6410775
Remove acquisition from photo
rob-luke Jun 22, 2022
e8a9d14
Merge remote-tracking branch 'upstream/master' into bep030
effigies Aug 19, 2022
c19e35b
add SPEC_ROOT prefix to links from schema to internal spec
sappelhoff Aug 25, 2022
57d4081
Merge branch 'master' into bep030
rwblair Aug 25, 2022
751273a
add sidecar and check rules for nirs
rwblair Aug 26, 2022
e5b79a3
Merge branch 'master' of github.com:bids-standard/bids-specification …
rwblair Aug 26, 2022
3623be5
misisng : in context.yaml
rwblair Aug 26, 2022
0bf2deb
yamllint fixes
rwblair Aug 26, 2022
66c021f
add level adendum for recommended descriptions
rwblair Aug 26, 2022
d571848
harmonize objects and rules
rwblair Aug 26, 2022
23e728d
we must appease the linting gods
rwblair Aug 26, 2022
35290d4
add missing display_name fields in objects. I am wildly inconsistent …
rwblair Aug 26, 2022
4e851de
change links to point at md not html in schema objects
rwblair Aug 26, 2022
6481c79
associations should be a suffix, can't nest them like I tried for nirs
rwblair Aug 26, 2022
3e6b52f
add coordsystem to associations, adjust rules accordingly
rwblair Aug 26, 2022
8a91620
Update src/schema/rules/datatypes/nirs.yaml
rwblair Aug 29, 2022
7143b0f
Update src/schema/rules/datatypes/nirs.yaml
rwblair Aug 29, 2022
947183a
Update src/schema/rules/sidecars/nirs.yaml
rwblair Aug 29, 2022
1dbc7ca
Update src/schema/rules/sidecars/nirs.yaml
rwblair Aug 29, 2022
ff347bf
Merge branch 'master' of github.com:bids-standard/bids-specification …
rwblair Aug 29, 2022
96478d5
Update src/schema/objects/metadata.yaml
rwblair Aug 29, 2022
28796af
Update src/schema/objects/metadata.yaml
rwblair Aug 29, 2022
3b28c22
detector__optoedes --> detector_type
rwblair Aug 29, 2022
172be76
SourceType format set to be just string
rwblair Aug 29, 2022
381828f
Add make_sidecar_table macros alongside old style tables to compare f…
rwblair Aug 29, 2022
ac75f5c
Merge branch 'bep030' of github.com:bids-standard/bids-specification …
rwblair Aug 29, 2022
9d4ba9c
correct mislabeled addendums
rwblair Aug 29, 2022
bcfe6ad
uncapitalize requirement level
rwblair Aug 29, 2022
9ebae61
add missing _ to make sidecar table macro, and fix spelling
rwblair Aug 29, 2022
be3daad
update coordsystem.json tables to use rules/sidecars/nirs entries.
rwblair Aug 29, 2022
031b9aa
fix typos in schema
sappelhoff Aug 30, 2022
3299fd9
Update src/schema/rules/checks/nirs.yaml
rwblair Aug 30, 2022
d2d4b80
Update src/schema/rules/checks/nirs.yaml
rwblair Aug 30, 2022
736a49e
Update src/schema/rules/checks/nirs.yaml
rwblair Aug 30, 2022
4e4c722
add nirs to common principles schema object
rwblair Aug 30, 2022
36202ca
no space in infra red even if for an acronym
rwblair Aug 30, 2022
638c11a
Update src/04-modality-specific-files/11-functional-near-infrared-spe…
rob-luke Sep 1, 2022
991d7df
Update src/04-modality-specific-files/11-functional-near-infrared-spe…
rob-luke Sep 1, 2022
ad74ef2
Implement cap description changes
rob-luke Sep 1, 2022
e678b15
Improvements to cap description fields
rob-luke Sep 1, 2022
cdbc04f
Move age details to modality agnostic page
rob-luke Sep 1, 2022
9b1ae4e
Update src/04-modality-specific-files/11-functional-near-infrared-spe…
rob-luke Sep 1, 2022
5aa31e0
Lint
rob-luke Sep 1, 2022
9abdb4d
Merge branch 'master' into bep030
sappelhoff Sep 1, 2022
4090a74
Update README.md
sappelhoff Sep 1, 2022
51d2b27
Merge branch 'master' into bep030
sappelhoff Sep 1, 2022
0cda6c6
Merge remote-tracking branch 'upstream/master' into bep030
effigies Sep 1, 2022
f9008e7
Make aux channel counts optional
rob-luke Sep 10, 2022
160bf12
Update metadata.yaml
rob-luke Sep 13, 2022
c110a93
apply small wording and typo fixes
sappelhoff Sep 27, 2022
07e28cb
Merge branch 'master' into bep030
sappelhoff Sep 27, 2022
024fbc4
add citation placeholder NIRS
sappelhoff Sep 27, 2022
66a04c2
Update src/schema/objects/metadata.yaml
sappelhoff Sep 27, 2022
5bbd39a
fix appendix links
sappelhoff Sep 27, 2022
69a2db3
Merge branch 'bep030' of https://github.com/bids-standard/bids-specif…
sappelhoff Sep 27, 2022
ca9550a
Update README.md
rob-luke Sep 29, 2022
f23adb7
Revert redundant NIRS age column suggestion
rob-luke Sep 29, 2022
d8238bb
Add link to coordinate system appendix
rob-luke Sep 29, 2022
4fdec60
Clarify relation between rows in channels.tsv and NIRSChannelCount
rob-luke Sep 29, 2022
3d957e3
Change NIRSCoordinateProcessingDescription example from none to n/a
rob-luke Sep 29, 2022
2481a59
Update src/schema/meta/context.yaml
rob-luke Sep 29, 2022
e93e10e
Try and fix path bug
rob-luke Sep 29, 2022
1bb288d
Still trying to fix appendix path bug
rob-luke Sep 29, 2022
6489d40
Still trying to get path working
rob-luke Sep 29, 2022
e7d652a
Path bug
rob-luke Sep 29, 2022
cda994f
Update src/schema/rules/checks/nirs.yaml
rob-luke Sep 29, 2022
cc35e17
Step one of adding IntendedFor
rob-luke Sep 29, 2022
435a8f6
Step two of adding IntendedFor
rob-luke Sep 29, 2022
3cb7e88
Step three of adding IntendedFor
rob-luke Sep 29, 2022
696d3b2
Revert naming change
rob-luke Sep 29, 2022
dcbfb9a
Move cap fields to recommended
rob-luke Sep 29, 2022
e600e69
update documentation regarding cap manufacturing. (#1285)
helenacockx Sep 29, 2022
f624497
Merge remote-tracking branch 'upstream/master' into bep030
effigies Sep 30, 2022
3ce06ae
SCHEMA: Sync table definitions, render from schema
effigies Sep 30, 2022
7e65f3a
SCHEMA: Update schema rules, including *ChannelCount checks
effigies Sep 30, 2022
501d3e8
Channels is recommended. Optodes is required if channels is present.
rob-luke Sep 30, 2022
fa5a56f
Variable naming changes suggested by tsalo
rob-luke Oct 3, 2022
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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ BIDS currently supports the following data modalities with more to come in the f
- physiological
- PET
- microscopy
- fNIRS
Copy link
Member

Choose a reason for hiding this comment

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

should be NIRS, I think -- because the suffix is NIRS and in the validator it's also NIRS

Suggested change
- fNIRS
- NIRS

Copy link
Member Author

Choose a reason for hiding this comment

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

NIRS is the method, but it has much broader uses such as food and atmospheric chemistry (e.g. scanning fruit for quality issues). When applied to neuroimaging we use fNIRS. So I think this should remain fNIRS. I also re-read the main md file, and we consistently use fNIRS (and I think this sounds correct). The coding and validator uses nirs. Is this a big issue? If it is a big issue, and we want to remove the "functional" from everywhere, I would want to get approval from @lpollonini first.

Copy link
Member

Choose a reason for hiding this comment

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

I think I'd prefer it to be consistently fNIRS then ... not sure if worth the effort though 🤔 WDYT @rwblair @effigies @tsalo @Remi-Gau ?

Copy link
Collaborator

@lpollonini lpollonini Sep 29, 2022

Choose a reason for hiding this comment

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

AS @rob-luke said, NIRS has a variety of non-functional and/or non-brain applications (e.g., optical mammography), and the SNIRF extension (which somehow guided the design of this BEP) was crafted with a wide scope to keep those in mind.
Practically, I not clearly see this BEP being widely adopted outside of neuroimaging, i.e. functional NIRS., so I would be in favor of using the narrower, yet best-fitting "fNIRS" everywhere.
On the other hand, I am not opposed to leave it as NIRS in consistency with MRI (as opposed to fMRI) naming.

Copy link
Member Author

Choose a reason for hiding this comment

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

not sure if worth the effort though

This echoes my opinion. And we do use a NIRS measurement to perform fNIRS neuroimaging, so I don't think anything is technically incorrect. I am eager to hear the opinions of others on this, thanks for the detailed review!

Copy link
Contributor

Choose a reason for hiding this comment

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

I am also in favor of using NIRS instead of fNIRS. There are for example also researchers that use NIRS to study orthostatic hypotension in the brain. They use the same devices as we do, so could benefit from the BEP, but are technically not interested in the 'functional' part of fNIRS. (see this study for example)


# Formatting your data with BIDS

Expand Down
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ nav:
- Genetic Descriptor: 04-modality-specific-files/08-genetic-descriptor.md
- Positron Emission Tomography: 04-modality-specific-files/09-positron-emission-tomography.md
- Microscopy: 04-modality-specific-files/10-microscopy.md
- Functional Near-Infrared Spectroscopy: 04-modality-specific-files/11-functional-near-infrared-spectroscopy.md
- Derivatives:
- BIDS Derivatives: 05-derivatives/01-introduction.md
- Common data types and metadata: 05-derivatives/02-common-data-types.md
Expand Down
4 changes: 4 additions & 0 deletions src/01-introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,10 @@ For example:
**qMRI-BIDS: An extension to the brain imaging data structure for quantitative magnetic resonance imaging data.**
Scientific Data 9, 517 (2022). [doi:10.1038/s41597-022-01571-4](https://doi.org/10.1038/s41597-022-01571-4)

#### NIRS

- (publication forthcoming)

### Research Resource Identifier (RRID)

BIDS has also a
Expand Down

Large diffs are not rendered by default.

20 changes: 19 additions & 1 deletion src/schema/meta/context.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,25 @@ context:
n_cols:
description: 'Number of columns in bvec file'
type: integer

channels:
description: 'Channels file'
type: object
properties:
path:
description: 'Path to associated channels file'
type: string
type:
description: 'Contents of the type column'
type: array
items:
type: string
coordsystem:
description: 'Coordinate system file'
type: object
properties:
path:
description: 'Path to associated coordsystem file'
type: string
# The following properties are populated if the current file is of an appropriate type
columns:
description: 'TSV columns, indexed by column header, values are arrays with column contents'
Expand Down
224 changes: 224 additions & 0 deletions src/schema/objects/columns.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,24 @@ color:
Hexadecimal. Label color for visualization.
type: string
unit: hexadecimal
detector__channels:
name: detector
display_name: Detector Name
description: |
Name of the detector as specified in the `*_optodes.tsv` file.
`n/a` for channels that do not contain fNIRS signals (for example, acceleration).
anyOf:
- type: string
- type: string
enum:
- n/a
detector_type:
name: detector_type
display_name: Detector Type
description: |
The type of detector. Only to be used if the field `DetectorType` in `*_nirs.json` is set to `mixed`.
anyOf:
- type: string
derived_from:
name: derived_from
display_name: Derived from
Expand All @@ -66,6 +84,12 @@ description:
description: |
Brief free-text description of the channel, or other information of interest.
type: string
description__optode:
name: description
display_name: Description
description: |
Free-form text description of the optode, or other information of interest.
type: string
dimension:
name: dimension
display_name: Dimension
Expand Down Expand Up @@ -240,6 +264,12 @@ name__electrodes:
description: |
Name of the electrode contact point.
type: string
name__optodes:
name: name
display_name: Optode name
description: |
Name of the optode, must be unique.
type: string
# name column for dseg.tsv files
name__segmentations:
name: name
Expand Down Expand Up @@ -278,6 +308,16 @@ onset:
acquired data point.
type: number
unit: s
orientation_component:
name: orientation_component
display_name: Orientation Component
description: |
Description of the orientation of the channel.
type: string
enum:
- x
- y
- z
pathology:
name: pathology
display_name: Pathology
Expand Down Expand Up @@ -420,6 +460,14 @@ sex:
- OTHER
- Other
- n/a
short_channel:
name: short_channel
display_name: Short Channel
description: |
Is the channel designated as short.
The total number of channels listed as short channels
SHOULD be stored in `ShortChannelCount` in `*_nirs.json`.
type: boolean
size:
name: size
display_name: Electrode size
Expand All @@ -440,6 +488,24 @@ software_filters:
- type: string
enum:
- n/a
source__channels:
name: source
display_name: Source name
description: |
Name of the source as specified in the `*_optodes.tsv` file.
`n/a` for channels that do not contain fNIRS signals (for example, acceleration).
anyOf:
- type: string
- type: string
enum:
- n/a
source__optodes:
name: source_type
display_name: Source type
description: |
The type of source. Only to be used if the field `SourceType` in `*_nirs.json` is set to `mixed`.
anyOf:
- type: string
species:
name: species
display_name: Species
Expand Down Expand Up @@ -614,13 +680,69 @@ type__ieeg_channels:
- DAC
- REF
- OTHER
type__nirs_channels:
name: type
display_name: Channel type
description: |
Type of channel; MUST use the channel types listed below.
Note that the type MUST be in upper-case.
type: string
enum:
- NIRSCWAMPLITUDE
- NIRSCWFLUORESCENSEAMPLITUDE
- NIRSCWOPTICALDENSITY
- NIRSCWHBO
- NIRSCWHBR
- NIRSCWMUA
- MEGMAG
- MEGGRADAXIAL
- MEGGRADPLANAR
- MEGREFMAG
- MEGREFGRADAXIAL
- MEGREFGRADPLANAR
- MEGOTHER
- EEG
- ECOG
- SEEG
- DBS
- VEOG
- HEOG
- EOG
- ECG
- EMG
- TRIG
- AUDIO
- PD
- EYEGAZE
- PUPIL
- MISC
- SYSCLOCK
- ADC
- DAC
- HLU
- FITERR
- ACCEL
- GYRO
- MAGN
- MISC
- OTHER
# type column for electrodes.tsv files
type__electrodes:
name: type
display_name: Electrode type
description: |
Type of the electrode (for example, cup, ring, clip-on, wire, needle).
type: string
type__optodes:
name: type
display_name: Type
description: |
The type of the optode.
type: string
enum:
- source
- detector
- n/a
units:
name: units
display_name: Units
Expand All @@ -630,6 +752,17 @@ units:
(see [Units](SPEC_ROOT/02-common-principles.md#units)).
type: string
format: unit
units__nirs:
name: units
display_name: Units
description: |
Physical unit of the value represented in this channel,
specified according to the SI unit symbol and possibly prefix symbol,
or as a derived SI unit (for example, `V`, or unitless for changes in optical densities).
For guidelines about units see the [Appendix](SPEC_ROOT/appendices/units.md)
and [Common Principles](SPEC_ROOT/02-common-principles.md#units) pages.
type: string
format: unit
value:
name: value
display_name: Marker value
Expand All @@ -652,6 +785,34 @@ volume_type:
- m0scan
- deltam
- cbf
wavelength_nominal:
name: wavelength_nominal
display_name: Wavelength nominal
description: |
Specified wavelength of light in nm.
`n/a` for channels that do not contain raw fNIRS signals (for example, acceleration).
This field is equivalent to `/nirs(i)/probe/wavelengths` in the SNIRF specification.
anyOf:
- type: number
- type: string
enum:
- n/a
wavelength_actual:
name: wavelength_actual
display_name: Wavelength actual
description: |
Measured wavelength of light in nm.
`n/a` for channels that do not contain raw NIRS signals (acceleration).
This field is equivalent to `measurementList.wavelengthActual` in the SNIRF specification.
type: number
wavelength_emission_actual:
name: wavelength_emission_actual
display_name: Wavelength emission actual
description: |
Measured emission wavelength of light in nm.
`n/a` for channels that do not contain raw NIRS signals (acceleration).
This field is equivalent to `measurementList.wavelengthEmissionActual` in the SNIRF specification.
type: number
whole_blood_radioactivity:
name: whole_blood_radioactivity
display_name: Whole blood radioactivity
Expand Down Expand Up @@ -681,3 +842,66 @@ z:
- type: string
enum:
- n/a
x__optodes:
name: x
display_name: X position
description: |
Recorded position along the x-axis.
`"n/a"` if not available.
anyOf:
- type: number
- type: string
enum:
- n/a
y__optodes:
name: y
display_name: Y position
description: |
Recorded position along the y-axis.
`"n/a"` if not available.
anyOf:
- type: number
- type: string
enum:
- n/a
z__optodes:
name: z
display_name: Z position
description: |
Recorded position along the z-axis.
`"n/a"` if not available.
anyOf:
- type: number
- type: string
enum:
- n/a
x__template:
name: template_x
rob-luke marked this conversation as resolved.
Show resolved Hide resolved
display_name: X template position
description: |
Assumed or ideal position along the x axis.
anyOf:
- type: number
- type: string
enum:
- n/a
y__template:
name: template_y
display_name: Y template position
description: |
Assumed or ideal position along the y axis.
anyOf:
- type: number
- type: string
enum:
- n/a
z__template:
name: template_z
display_name: Z template position
description: |
Assumed or ideal position along the z axis.
anyOf:
- type: number
- type: string
enum:
- n/a
2 changes: 2 additions & 0 deletions src/schema/objects/common_principles.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ data_type:
10. `pet` (positron emission tomography)

11. `micr` (microscopy)

12. `nirs` (near infrared spectroscopy)
dataset:
name: Dataset
display_name: Dataset
Expand Down
5 changes: 5 additions & 0 deletions src/schema/objects/datatypes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,8 @@ pet:
display_name: Positron Emission Tomography
description: |
Positron emission tomography data
nirs:
value: nirs
display_name: Functional Near-Infrared Spectroscopy
description:
Near-Infrared data organized around the SNIRF format
5 changes: 5 additions & 0 deletions src/schema/objects/extensions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,11 @@ set:

The format used by the MATLAB toolbox [EEGLAB](https://sccn.ucsd.edu/eeglab).
Each recording consists of a `.set` file with an optional `.fdt` file.
snirf:
value: .snirf
display_name: Shared Near Infrared Spectroscopy Format
description: |
HDF5 file organized according to the [SNIRF specification](https://github.com/fNIRS/snirf)
sqd:
value: .sqd
display_name: SQD
Expand Down
Loading