Repository: mne-tools/mne-bids

Issue:
raise Error / deprecate "Neuroscan CNT"
The format is no longer supported by BEP006.


Discussion:
there are three options ... which one should we take?

1. Remove CNT support completely and pretend it was never there
2. Remove CNT support completely and send an error with an explanation if somebody wants to use CNT
3. Allow CNT support but send a warning upon detection that this will not be possible in 0.3 anymore

I think 3. is the proper deprecation?

1. would be nice and easy ... and perhaps reasonable, because we do not have a lot of users and perhaps even none who use neuroscan :-) 
I think this should be first fixed in the validator. Once the validator starts failing, we'll follow suit ...
we could add it as a warning?
```python
import warnings
warnings.warn("CNT file support is to be discontinued soon", DeprecationWarning)
```

Resolving patch:
diff --git a/mne_bids/io.py b/mne_bids/io.py
--- a/mne_bids/io.py
+++ b/mne_bids/io.py
@@ -14,7 +14,6 @@
                           '.edf',  # European Data Format
                           '.bdf',  # Biosemi
                           '.set',  # EEGLAB, potentially accompanied by .fdt
-                          '.cnt',  # Neuroscan
                           ]
 
 allowed_extensions_ieeg = ['.vhdr',  # BrainVision, accompanied by .vmrk, .eeg
@@ -32,7 +31,7 @@
           '.fif': io.read_raw_fif, '.pdf': io.read_raw_bti,
           '.ds': io.read_raw_ctf, '.vhdr': io.read_raw_brainvision,
           '.edf': io.read_raw_edf, '.bdf': io.read_raw_edf,
-          '.set': io.read_raw_eeglab, '.cnt': io.read_raw_cnt}
+          '.set': io.read_raw_eeglab}
 
 
 def _parse_ext(raw_fname, verbose=False):
diff --git a/mne_bids/mne_bids.py b/mne_bids/mne_bids.py
--- a/mne_bids/mne_bids.py
+++ b/mne_bids/mne_bids.py
@@ -52,7 +52,7 @@
 
 eeg_manufacturers = {'.vhdr': 'BrainProducts', '.eeg': 'BrainProducts',
                      '.edf': 'n/a', '.bdf': 'Biosemi', '.set': 'n/a',
-                     '.fdt': 'n/a', '.cnt': 'Neuroscan'}
+                     '.fdt': 'n/a'}
 
 ieeg_manufacturers = {'.vhdr': 'BrainProducts', '.eeg': 'BrainProducts',
                       '.edf': 'n/a', '.set': 'n/a', '.fdt': 'n/a',
@@ -69,8 +69,7 @@
 IGNORED_CHANNELS = {'KIT/Yokogawa': ['STI 014'],
                     'BrainProducts': ['STI 014'],
                     'n/a': ['STI 014'],  # for unknown manufacturers, ignore it
-                    'Biosemi': ['STI 014'],
-                    'Neuroscan': ['STI 014']}
+                    'Biosemi': ['STI 014']}
 
 
 def _channels_tsv(raw, fname, overwrite=False, verbose=True):
@@ -675,7 +674,7 @@ def write_raw_bids(raw, bids_basename, output_path, events_data=None,
     channels_fname = make_bids_basename(
         subject=subject_id, session=session_id, task=task, run=run,
         acquisition=acquisition, suffix='channels.tsv', prefix=data_path)
-    if ext not in ['.fif', '.ds', '.vhdr', '.edf', '.bdf', '.set', '.cnt']:
+    if ext not in ['.fif', '.ds', '.vhdr', '.edf', '.bdf', '.set']:
         bids_raw_folder = bids_fname.split('.')[0]
         bids_fname = op.join(bids_raw_folder, bids_fname)
 


Test patch:
diff --git a/mne_bids/tests/test_mne_bids.py b/mne_bids/tests/test_mne_bids.py
--- a/mne_bids/tests/test_mne_bids.py
+++ b/mne_bids/tests/test_mne_bids.py
@@ -327,20 +327,3 @@ def test_set():
 
     cmd = ['bids-validator', '--bep010', output_path]
     run_subprocess(cmd, shell=shell)
-
-
-def test_cnt():
-    """Test write_raw_bids conversion for Neuroscan data."""
-    output_path = _TempDir()
-    data_path = op.join(testing.data_path(), 'CNT')
-    raw_fname = op.join(data_path, 'scan41_short.cnt')
-
-    raw = mne.io.read_raw_cnt(raw_fname, montage=None)
-    write_raw_bids(raw, bids_basename, output_path)
-
-    cmd = ['bids-validator', '--bep006', output_path]
-    run_subprocess(cmd, shell=shell)
-
-    raw = mne.io.read_raw_cnt(raw_fname, montage=None, preload=True)
-    with pytest.raises(ValueError, match='preload'):
-        write_raw_bids(raw, bids_basename, output_path)