Repository: mne-tools/mne-python

Issue:
Initialise coil types
How to initialize coil types in info object?

```
chans = mne.channels.read_montage('BrainAmpMRIPlus_32sfp', ch_names=None, path= datapath, unit='mm', transform=False)

chanNames = chans.ch_names
info = mne.create_info(chanNames, 250.0, ch_types='eeg')
layout = mne.channels.find_layout(info, ch_type='eeg', exclude=None)

eventOnset = np.array(range(1,41))*2
eventZero = np.ones(40)
eventId = np.ones(40)
events = np.transpose(np.vstack((eventOnset, eventZero, eventId)))

epochs = mne.EpochsArray(cueLtemp, info, events, tmin=0, event_id=None, reject=None, flat=None, reject_tmin=None, reject_tmax=None, verbose=None)

epochs.set_montage(chans)

epochs.plot_projs_topomap(ch_type='eeg', layout=layout)
```

I get RuntimeError: No EEG channels present. Cannot find EEG layout. when I run mne.channels.find_layout()
If I use create_info with ch_types = 'eeg' shouldn't the coil type be eeg also? what exactly is the coil type and coil trans anyway? Should they be initialised?
Since I am learning mne is all this stuff explained somewhere or is this the only place I can ask questions? I went through the examples and they all use standard data sets. I am coming from matlab and my data is preprocessed in matlab.
Thanks for helping me out guys



Discussion:
Can you turn this into a minimal example? That would mean sharing your Montage file, or making an example that fails with some sample verison, and creating all variables from real data or numpy (e.g., the cuLtemp file is not defined above). That will allow us to test locally.

Is this on latest master?

@teonlamont you have time to tackle this?

Ahh, thanks for the more minimal example, I do have the same failure. That should help find the cause.

```
chNos = list(range(1,32))
estr = 'E'
chanNames = [estr+str(chNo) for chNo in chNos]

info = mne.create_info(chanNames, 250.0, ch_types='eeg')
layout = mne.channels.find_layout(info, ch_type='eeg', exclude=None)
```

what happens is that in the info.chs there is coil_type for each channel which is not initialised to eeg even though in create info I type ch_type = 'eeg'

yeah, I see it, fixing now...

you should have `exclude=[]` in your script BTW, not `exclude=None`


Resolving patch:
diff --git a/mne/io/meas_info.py b/mne/io/meas_info.py
--- a/mne/io/meas_info.py
+++ b/mne/io/meas_info.py
@@ -31,7 +31,7 @@
 
 
 _kind_dict = dict(
-    eeg=(FIFF.FIFFV_EEG_CH, FIFF.FIFFV_COIL_NONE, FIFF.FIFF_UNIT_V),
+    eeg=(FIFF.FIFFV_EEG_CH, FIFF.FIFFV_COIL_EEG, FIFF.FIFF_UNIT_V),
     mag=(FIFF.FIFFV_MEG_CH, FIFF.FIFFV_COIL_VV_MAG_T3, FIFF.FIFF_UNIT_T),
     grad=(FIFF.FIFFV_MEG_CH, FIFF.FIFFV_COIL_VV_PLANAR_T1, FIFF.FIFF_UNIT_T_M),
     misc=(FIFF.FIFFV_MISC_CH, FIFF.FIFFV_COIL_NONE, FIFF.FIFF_UNIT_NONE),


Test patch:
diff --git a/mne/io/tests/test_meas_info.py b/mne/io/tests/test_meas_info.py
--- a/mne/io/tests/test_meas_info.py
+++ b/mne/io/tests/test_meas_info.py
@@ -24,6 +24,15 @@
 elp_fname = op.join(data_dir, 'test_elp.txt')
 
 
+def test_make_info():
+    """Test some create_info properties
+    """
+    n_ch = 1
+    info = create_info(n_ch, 1000., 'eeg')
+    coil_types = set([ch['coil_type'] for ch in info['chs']])
+    assert_true(FIFF.FIFFV_COIL_EEG in coil_types)
+
+
 def test_fiducials_io():
     """Test fiducials i/o"""
     tempdir = _TempDir()