Skip to content

Commit 8902705

Browse files
committed
add EMG support
1 parent 93be74e commit 8902705

17 files changed

+936
-7
lines changed

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ nav:
2020
- Near-Infrared Spectroscopy: modality-specific-files/near-infrared-spectroscopy.md
2121
- Motion: modality-specific-files/motion.md
2222
- Magnetic Resonance Spectroscopy: modality-specific-files/magnetic-resonance-spectroscopy.md
23+
- Electromyography: modality-specific-files/electromyography.md
2324
- Derivatives:
2425
- BIDS Derivatives: derivatives/introduction.md
2526
- Common data types and metadata: derivatives/common-data-types.md

src/introduction.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,10 @@ For example:
188188

189189
- (publication forthcoming)
190190

191+
#### EMG
192+
193+
- (publication forthcoming)
194+
191195
### Research Resource Identifier (RRID)
192196

193197
BIDS has also a

src/modality-specific-files/electromyography.md

Lines changed: 506 additions & 0 deletions
Large diffs are not rendered by default.
Loading

src/schema/objects/columns.yaml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,13 @@ component:
8989
- $ref: objects.enums.quat_y.value
9090
- $ref: objects.enums.quat_z.value
9191
- $ref: objects.enums.quat_w.value
92+
coordinate_system:
93+
name: coordinate_system
94+
display_name: Coordinate System
95+
description: |
96+
Name of the coordinate system defined in `coordsystem.json` in which the electrode's
97+
`x`, `y`, and (optionally) `z` coordinates are given.
98+
type: string
9299
detector__channels:
93100
name: detector
94101
display_name: Detector Name
@@ -252,6 +259,15 @@ index:
252259
description: |
253260
The label integer index.
254261
type: integer
262+
interelectrode_distance:
263+
name: interelectrode_distance
264+
display_name: Interelectrode Distance
265+
description: |
266+
Distance between adjacent electrodes (in a pair or grid) that are rigidly attached to
267+
the same sensor device, or between the `signal_electrode` and its `reference` when
268+
each is independently placed.
269+
type: number
270+
unit: mm
255271
low_cutoff:
256272
name: low_cutoff
257273
display_name: Low cutoff
@@ -372,6 +388,13 @@ participant_id:
372388
matching a participant entity found in the dataset.
373389
type: string
374390
pattern: ^sub-[0-9a-zA-Z+]+$
391+
placement__emg:
392+
name: placement
393+
display_name: Placement Scheme
394+
description: |
395+
Placement of the sensor(s) on the body (for example, "palmar side of lower arm").
396+
It can refer to an external vocabulary for describing body parts.
397+
type: string
375398
placement__motion:
376399
name: placement
377400
display_name: Placement
@@ -395,6 +418,13 @@ reference__eeg:
395418
This column is not needed when it is common to all channels.
396419
In that case the reference electrode(s) can be specified in `*_eeg.json` as `EEGReference`).
397420
type: string
421+
# reference column for channels.tsv files for EMG data
422+
reference__emg:
423+
name: reference
424+
display_name: Electrode reference
425+
description: |
426+
Specification of the reference (for example, `ulnar styloid process`, `ElectrodeName01`, `n/a`).
427+
type: string
398428
# reference column for channels.tsv files for iEEG data
399429
reference__ieeg:
400430
name: reference
@@ -509,6 +539,13 @@ short_channel:
509539
The total number of channels listed as short channels
510540
SHOULD be stored in `ShortChannelCount` in `*_nirs.json`.
511541
type: boolean
542+
signal_electrode:
543+
name: signal_electrode
544+
display_name: Signal electrode
545+
description:
546+
The name of the electrode from which the `reference` electrode is subtracted, to yield
547+
the channel's data.
548+
type: string
512549
size:
513550
name: size
514551
display_name: Electrode size
@@ -603,6 +640,14 @@ strain_rrid:
603640
of the strain of the species, for example: `RRID:IMSR_JAX:000664`.
604641
type: string
605642
format: rrid
643+
target_muscle:
644+
name: target_muscle
645+
display_name: Target muscle
646+
description: |
647+
Name of the muscle(s) from which the EMG signal in this channel is believed to originate.
648+
When exact muscle is unknown (such as when using electrode grids that cover multiple muscles),
649+
groups of muscles may be named instead (for example "flexors of the left forearm").
650+
type: string
606651
time:
607652
name: time
608653
display_name: Time

src/schema/objects/common_principles.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@
66
data_acquisition:
77
display_name: Data acquisition
88
description: |
9-
A continuous uninterrupted block of time during which a brain scanning instrument was acquiring data according to
10-
particular scanning sequence/protocol.
9+
A continuous uninterrupted block of time during which a brain scanning instrument
10+
or an electromyography recording device was acquiring data
11+
according to a particular scanning sequence/protocol.
1112
data_type:
1213
display_name: Data type
1314
description: |
@@ -44,6 +45,8 @@ data_type:
4445
4546
14. `mrs` (magnetic resonance spectroscopy)
4647
48+
15. `emg` (electromyography)
49+
4750
dataset:
4851
display_name: Dataset
4952
description: |

src/schema/objects/datatypes.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ eeg:
2020
value: eeg
2121
display_name: Electroencephalography
2222
description: Electroencephalography
23+
emg:
24+
value: emg
25+
display_name: Electromyography
26+
description: Measurements of muscular activity.
2327
fmap:
2428
value: fmap
2529
display_name: Field maps

src/schema/objects/enums.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ _EEGCoordSys:
77
- $ref: objects.enums.EEGLAB.value
88
- $ref: objects.enums.EEGLAB-HJ.value
99
- $ref: objects.enums.Other.value
10+
_EMGCoordSys:
11+
type: string
12+
enum:
13+
- $ref: objects.enums.Other.value
1014
_GeneticLevelEnum:
1115
type: string
1216
enum:

src/schema/objects/metadata.yaml

Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,21 @@ ACCELChannelCount:
99
Number of acceleration channels.
1010
type: integer
1111
minimum: 0
12+
AnchorCoordinates:
13+
name: AnchorCoordinates
14+
display_name: Anchor Coordinates
15+
description: |
16+
Coordinates of the `AnchorElectrode` in the parent (anatomical) coordinate system.
17+
This should be an array of numbers of length 3, in the units given in
18+
`EMGCoordinateSystemUnits` within the JSON object named in `ParentCoordinateSystem`.
19+
type: array
20+
AnchorElectrode:
21+
name: AnchorElectrode
22+
display_name: Anchor Electrode
23+
description: |
24+
Name of the electrode in the child (device) coordinate system whose coordinates in
25+
the parent (anatomical) coordinate system are given in `AnchorCoordinates`.
26+
type: string
1227
Acknowledgements:
1328
name: Acknowledgements
1429
display_name: Acknowledgements
@@ -911,13 +926,100 @@ EEGReference:
911926
this field should have a general description and the channel specific
912927
reference should be defined in the `channels.tsv` file.
913928
type: string
929+
ElectrodeMaterial:
930+
name: ElectrodeMaterial
931+
display_name: Electrode Material
932+
description: |
933+
Material of the electrode (for example, `Tin`, `Ag/AgCl`, `Gold`).
934+
type: string
935+
ElectrodeType:
936+
name: ElectrodeType
937+
display_name: Electrode type
938+
description: |
939+
Type of the electrode (for example, cup, ring, clip-on, wire, needle).
940+
type: string
914941
EMGChannelCount:
915942
name: EMGChannelCount
916943
display_name: EMG Channel Count
917944
description: |
918945
Number of EMG channels.
919946
type: integer
920947
minimum: 0
948+
EMGCoordinateSystem:
949+
name: EMGCoordinateSystem
950+
display_name: EMG Coordinate System
951+
description: |
952+
Defines the coordinate system for the EMG sensors.
953+
954+
See the
955+
[Coordinate Systems Appendix](SPEC_ROOT/appendices/coordinate-systems.md)
956+
for a list of restricted keywords for coordinate systems.
957+
If `"Other"`, provide definition of the coordinate system in
958+
`EMGCoordinateSystemDescription`.
959+
anyOf:
960+
- $ref: objects.enums._EMGCoordSys
961+
EMGCoordinateSystemDescription:
962+
name: EMGCoordinateSystemDescription
963+
display_name: EMG Coordinate System Description
964+
description: |
965+
Free-form text description of the coordinate system, typically defining the origin
966+
and positive x,y,z axis directions, relative to skeletal landmarks.
967+
May also include a link to a documentation page or paper describing the
968+
system in greater detail.
969+
type: string
970+
EMGCoordinateUnits:
971+
name: EMGCoordinateUnits
972+
display_name: EMG Coordinate Units
973+
description: |
974+
Units of the coordinates of `EMGCoordinateSystem`.
975+
type: string
976+
enum:
977+
- m
978+
- mm
979+
- cm
980+
- n/a
981+
EMGGround:
982+
name: EMGGround
983+
display_name: EMG Ground
984+
description: |
985+
Description of the location of the ground electrode
986+
(for example, `"right radial styloid process"`).
987+
type: string
988+
EMGPlacementScheme:
989+
name: EMGPlacementScheme
990+
display_name: EMG Placement Scheme
991+
description: |
992+
The name of a standardized electrode placement procedure (for example, `"SENIAM 8"`)
993+
or a description of the procedure used.
994+
Descriptions SHOULD NOT simply give the name of the targeted muscle (use the
995+
`target_muscle` column in `channels.tsv` for that), but rather SHOULD reflect the
996+
process used by the researcher(s) when placing electrodes.
997+
For example, EMG electrode sites may be chosen by *visual reference* to target muscles,
998+
by *palpation* of the skin to locate target muscles, by *functional localization*
999+
(temporary electrode placement at several sites during prescribed behavior,
1000+
until a site yielding strong EMG signal is found), or by *measured distances*
1001+
(either absolute or proportional) relative to skeletal landmarks.
1002+
In datasets involving multiple EMG recording units placed at different sites in which
1003+
different placement procedures were used for different sites, the procedures for each
1004+
site SHOULD be described in the `placement_scheme` column of `channels.tsv` instead,
1005+
and the value of `EMGPlacementScheme` SHOULD be a non-empty string such as
1006+
"channel-specific" or "see channels.tsv" or similar.
1007+
type: string
1008+
EMGReference:
1009+
name: EMGReference
1010+
display_name: EMG Reference
1011+
description: |
1012+
Description of the reference electrode location when the same reference was used for
1013+
all channels (often called a "monopolar" recording).
1014+
If different channels have different reference electrodes, this field should contain
1015+
a non-empty string such as "channel-specific" and each channel-specific reference
1016+
should be described in the `reference` column of `channels.tsv`.
1017+
For bipolar recording devices (where a single sensor unit contains two rigidly
1018+
separated contacts, and the paired contacts are not listed independently in
1019+
`electrodes.tsv`), the value of `reference` (in `channels.tsv`, for single channels)
1020+
or `EMGReference` (in `emg.json`, when all channels were bipolar) should be "bipolar".
1021+
1022+
type: string
9211023
EOGChannelCount:
9221024
name: EOGChannelCount
9231025
display_name: EOG Channel Count
@@ -1709,6 +1811,13 @@ IntendedFor__ds_relative:
17091811
format: bids_uri
17101812
- type: string
17111813
format: dataset_relative
1814+
InterelectrodeDistance:
1815+
name: InterelectrodeDistance
1816+
display_name: Interelectrode Distance
1817+
description: |
1818+
Distance between pairs or grids of electrodes rigidly attached to the same sensor device.
1819+
type: number
1820+
unit: mm
17121821
InversionTime:
17131822
name: InversionTime
17141823
display_name: Inversion Time
@@ -2503,6 +2612,13 @@ ParallelReductionFactorOutOfPlane:
25032612
Corresponds to [DICOM Tag 0018, 9155](https://dicomlookup.com/dicomtags/(0018,9155))
25042613
`Parallel Reduction Factor out-of-plane`.
25052614
type: number
2615+
ParentCoordinateSystem:
2616+
name: ParentCoordinateSystem
2617+
display_name: Parent Coordinate System
2618+
description: |
2619+
The name of a JSON mapping key that defines the parent (anatomical) coordinate system
2620+
in which this child (device) coordinate system is anchored.
2621+
type: string
25062622
PartialFourier:
25072623
name: PartialFourier
25082624
display_name: Partial Fourier
@@ -3300,6 +3416,13 @@ SinglesRate:
33003416
type: array
33013417
items:
33023418
type: number
3419+
SkinPreparation:
3420+
name: SkinPreparation
3421+
display_name: Skin Preparation
3422+
description: |
3423+
How skin was prepared prior to sensor device placement, for example, `"alcohol wipe"`
3424+
or `"abrasive gel"`.
3425+
type: string
33033426
SkullStripped:
33043427
name: SkullStripped
33053428
display_name: Skull Stripped

src/schema/objects/modalities.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ eeg:
88
display_name: Electroencephalography
99
description: |
1010
Data acquired with EEG.
11+
emg:
12+
display_name: Electromyography
13+
description: |
14+
Data acquired with EMG.
1115
ieeg:
1216
display_name: Intracranial Electroencephalography
1317
description: |

src/schema/objects/suffixes.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,12 @@ electrodes:
611611
value: electrodes
612612
display_name: Electrodes
613613
description: |
614-
File that gives the location of (i)EEG electrodes.
614+
File that gives the location of (i)EEG or EMG electrodes.
615+
emg:
616+
value: emg
617+
display_name: Electromyography
618+
description: |
619+
Electromyography recording data.
615620
epi:
616621
value: epi
617622
display_name: EPI

src/schema/rules/checks/deprecations.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
AnatomicalLandmarkCoordinateSystemDeprecation:
23
issue:
34
code: ELEKTA_NEUROMAG_DEPRECATED

src/schema/rules/files/raw/channels.yaml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ channels:
77
- .tsv
88
datatypes:
99
- eeg
10+
- emg
1011
- ieeg
1112
- nirs
1213
entities:
@@ -40,6 +41,7 @@ coordsystem:
4041
extensions:
4142
- .json
4243
datatypes:
44+
- emg
4345
- meg
4446
- nirs
4547
entities:
@@ -65,23 +67,31 @@ electrodes:
6567
- .json
6668
- .tsv
6769
datatypes:
68-
- eeg
69-
- ieeg
70+
- emg
7071
entities:
7172
subject: required
7273
session: optional
7374
task: optional
7475
acquisition: optional
7576
run: optional
77+
78+
# (i)EEG can also have `space` entity
79+
electrodes__eeg:
80+
$ref: rules.files.raw.channels.electrodes
81+
datatypes:
82+
- eeg
83+
- ieeg
84+
entities:
85+
$ref: rules.files.raw.channels.electrodes.entities
7686
space: optional
7787

7888
# MEG has an additional entity available
7989
electrodes__meg:
80-
$ref: rules.files.raw.channels.electrodes
90+
$ref: rules.files.raw.channels.electrodes__eeg
8191
datatypes:
8292
- meg
8393
entities:
84-
$ref: rules.files.raw.channels.electrodes.entities
94+
$ref: rules.files.raw.channels.electrodes__eeg.entities
8595
processing: optional
8696

8797
optodes:

0 commit comments

Comments
 (0)