Repository: mne-tools/mne-python

Issue:
BUG: Somato BIDS dataset derivatives need to be updated
Turns out there was a bug with the conversion in #6414 conversion. The subject used to be `somato` but now it's `01` and the `-src.fif` was never updated. We thus end up with:
```
>>> fwd['src'][0]['subject_his_id']
'somato'
```
which is wrong (and is now arguably correctly treated as an error downstream later by MNE). I have a quick fix for this but it would be good @jasmainak @sappelhoff if someone could re-create the src, fwd, and (if applicable) inv for this subject because they will all have the old, incorrect `subject_his_id` value.


Discussion:
@larsoner how urgent is this? can this wait till the sprint? @sappelhoff any chance you can fix it in the coming few days?
Unfortunately I am completely swamped and won't be able to submit a fix for this :(
It can wait until 0.20, I pushed a workaround in #6771
Also, `dataset_description.json` needs to be updated with a new link to relevant docs:

`http://martinos.org/mne/stable/manual/datasets_index.html?#somatosensory` ->
`https://mne.tools/stable/overview/datasets_index.html#somatosensory`
@sappelhoff @jasmainak any chance to get to this in the next week or two to make it into 0.20?
This is the [conversion script](https://github.com/mne-tools/mne-scripts/blob/master/bids_conversion/convert_somato_data.py).

If I understand you correctly, the error is with these lines:

https://github.com/mne-tools/mne-scripts/blob/9e4c77b724bb04a6d20e93720b5dd6cf110ff8eb/bids_conversion/convert_somato_data.py#L227-L231

where we simply rename the existing `fwd` file, instead of recomputing it. As far as I see it, there are no `src` or `inv` files.

Could a fix be as simple as loading the `fwd`, changing `subject_his_id`, and saving under a new name?
yes should be as simple as this and then reupload to OSF.

>

> Could a fix be as simple as loading the fwd, changing subject_his_id, and saving under a new name?

I would just overwrite the old one with the correct one
@larsoner to create a new (correct) one, I assume that I would use [`mne.make_forward_solution`](https://mne.tools/stable/generated/mne.make_forward_solution.html)

What should I supply for the `src` and `bem` parameters?

These are all the files I have (printed up to depth 3):

```
|MNE-somato-data/
|--- subjects/
|------ somato/
|--------- scripts/
|--------- stats/
|--------- label/
|--------- touch/
|--------- surf/
|--------- mri/
|--------- trash/
|--------- tmp/
|--------- src/
|--------- bem/
|--- MEG/
|------ somato/
|--------- sef_raw_sss-trans.fif
|--------- somato-meg-oct-6-fwd.fif
|--------- sef_raw_sss.fif

```
No I would not create a new one, just use `read_forward_solution`, modify `s['subject_his_id']` for each `s in fwd['src']`, then `write_forward_solution`. It ensures that everything stays the same except the `subject_his_id`

Resolving patch:
diff --git a/examples/inverse/plot_dics_source_power.py b/examples/inverse/plot_dics_source_power.py
--- a/examples/inverse/plot_dics_source_power.py
+++ b/examples/inverse/plot_dics_source_power.py
@@ -84,7 +84,6 @@
 ###############################################################################
 # Visualizing source power during ERS activity relative to the baseline power.
 stc = beta_source_power / baseline_source_power
-stc.subject = '01'  # it's mis-coded in fwd['src']
 message = 'DICS source power in the 12-30 Hz frequency band'
 brain = stc.plot(hemi='both', views='par', subjects_dir=subjects_dir,
                  subject=subject, time_label=message)
diff --git a/mne/datasets/utils.py b/mne/datasets/utils.py
--- a/mne/datasets/utils.py
+++ b/mne/datasets/utils.py
@@ -258,7 +258,7 @@ def _data_path(path=None, force_update=False, update_path=True, download=True,
         misc='https://codeload.github.com/mne-tools/mne-misc-data/'
              'tar.gz/%s' % releases['misc'],
         sample='https://osf.io/86qa2/download?version=5',
-        somato='https://osf.io/tp4sg/download?version=5',
+        somato='https://osf.io/tp4sg/download?version=6',
         spm='https://osf.io/je4s8/download?version=2',
         testing='https://codeload.github.com/mne-tools/mne-testing-data/'
                 'tar.gz/%s' % releases['testing'],
@@ -321,7 +321,7 @@ def _data_path(path=None, force_update=False, update_path=True, download=True,
         fake='3194e9f7b46039bb050a74f3e1ae9908',
         misc='84e606998ac379ef53029b3b1cf37918',
         sample='12b75d1cb7df9dfb4ad73ed82f61094f',
-        somato='f08f17924e23c57a751b3bed4a05fe02',
+        somato='ea825966c0a1e9b2f84e3826c5500161',
         spm='9f43f67150e3b694b523a21eb929ea75',
         testing='de51a47739798064fd20bd3345d5eba0',
         multimodal='26ec847ae9ab80f58f204d09e2c08367',


Test patch: