Issue with order_channels_by_depth
I have attempted several ways to use the 'detect_bad_channels' function from spikeinterface.preprocessing, however....I get an error "IndexError: arrays used as indices must be of integer (or boolean) type" which is evoked within the subfunction 'order_channels_by_depth'. 

The error occurs during this step: **locations = locations[channel_inds, :]**

Investigating this further, I realized that the 'channel_ids' variable is intended to be a vector of integer values corresponding to the channels, but (at least in my case) the 'channel_ids' variable is a vector full of strings. As a first pass, I changed the error-causing line to:

#converting the string variables to integers and making the indices pythonic
**locations[[int(x)-1 for x in channel_inds], :]**  

Following this change, I ran detect_bad_channels and was pleased that it worked, but a "warning" emerged: 

#the code for detection
bad_channel_ids, channel_labels = spikeinterface.preprocessing.detect_bad_channels(reader_filtered)

#warning label
**UserWarning: nperseg = 244 is greater than input length  = 32, using nperseg = 32
  warnings.warn('nperseg = {0:d} is greater than input length '**

The 'input length = 32' was concerning and leads me to believe (because I am working with a 32-channel shank) that the data is being read in a transposed fashion, but I cannot be sure?

As another 'workaround', I tried multiple times to set the channel ids to integer values because I dont want to be working with a modified version of spikeinterface functions, but the object file does not allow for this. 

For clarity on this issue....I am using a 32-channel neuronexus probe and recording using TDT, and importing into spikeinterface using read_tdt.

Thanks

diff --git a/spikeinterface/core/base.py b/spikeinterface/core/base.py
index 0293ea48..44755080 100644
--- a/spikeinterface/core/base.py
+++ b/spikeinterface/core/base.py
@@ -96,7 +96,7 @@ class BaseExtractor:
             if prefer_slice:
                 indices = slice(None)
             else:
-                indices = self._main_ids
+                indices = np.arange(len(self._main_ids))
         else:
             _main_ids = self._main_ids.tolist()
             indices = np.array([_main_ids.index(id) for id in ids], dtype=int)
diff --git a/spikeinterface/core/recording_tools.py b/spikeinterface/core/recording_tools.py
index 3a155e3e..c5c1ba67 100644
--- a/spikeinterface/core/recording_tools.py
+++ b/spikeinterface/core/recording_tools.py
@@ -223,7 +223,7 @@ def order_channels_by_depth(recording, channel_ids=None, dimensions=('x', 'y')):
     """
     locations = recording.get_channel_locations()
     ndim = locations.shape[1]
-    channel_inds = recording.ids_to_indices(channel_ids)
+    channel_inds = recording.ids_to_indices(ids=channel_ids, prefer_slice=True)
     locations = locations[channel_inds, :]
 
     if isinstance(dimensions, str):
['spikeinterface/core/recording_tools.py', 'spikeinterface/core/base.py']