{"action":"opened","issue":{"url":"https://api.github.com/repos/kwikteam/phy/issues/581","labels_url":"https://api.github.com/repos/kwikteam/phy/issues/581/labels{/name}","comments_url":"https://api.github.com/repos/kwikteam/phy/issues/581/comments","events_url":"https://api.github.com/repos/kwikteam/phy/issues/581/events","html_url":"https://github.com/kwikteam/phy/issues/581","id":97647918,"number":581,"title":"Can't switch shank in manual clustering","user":{"login":"tymoreau","id":11441810,"avatar_url":"https://avatars.githubusercontent.com/u/11441810?v=3","gravatar_id":"","url":"https://api.github.com/users/tymoreau","html_url":"https://github.com/tymoreau","followers_url":"https://api.github.com/users/tymoreau/followers","following_url":"https://api.github.com/users/tymoreau/following{/other_user}","gists_url":"https://api.github.com/users/tymoreau/gists{/gist_id}","starred_url":"https://api.github.com/users/tymoreau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tymoreau/subscriptions","organizations_url":"https://api.github.com/users/tymoreau/orgs","repos_url":"https://api.github.com/users/tymoreau/repos","events_url":"https://api.github.com/users/tymoreau/events{/privacy}","received_events_url":"https://api.github.com/users/tymoreau/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-07-28T08:40:47Z","updated_at":"2015-07-28T08:40:47Z","closed_at":null,"body":"I ran phy on a dataset and tried to use the GUI for manual clustering. For the first shank, it works fine, but I can't access the other three.  \r\nHere's what I do to open shank 1:\r\n\r\n    import phy\r\n    phy.enable_qt()\r\n    from phy.session import Session\r\n    kwik_path=\"Rat034_2015_02_16_12_51.kwik\"\r\n    session=Session(kwik_path)\r\n    session.show_gui()\r\n\r\nThen I close the GUI and try to open shank 2 with `session.change_channel_group(2)`. I get the following error:\r\n\r\n    10:33:05 [I] Switched to channel group 2.\r\n    Features and masks initialized.\r\n    ---------------------------------------------------------------------------\r\n    [...]\r\n    /home/david/phy/phy/io/kwik/store_items.py in unmasked_channels(self, cluster)\r\n        587     def unmasked_channels(self, cluster):\r\n        588         mean_masks = self.load(cluster, 'mean_masks')\r\n    --> 589         return np.nonzero(mean_masks > .1)[0]\r\n        590 \r\n        591     def n_unmasked_channels(self, cluster):\r\n    TypeError: unorderable types: NoneType() > float()\r\n\r\nFor the shanks 3 and 4, the error is different:\r\n\r\n    10:37:01 [I] Switched to channel group 3.\r\n    ---------------------------------------------------------------------------\r\n    [...]\r\n    /home/david/phy/phy/io/kwik/store_items.py in _store(self, cluster, chunk_spikes, chunk_spikes_per_cluster, chunk_features_masks)\r\n         96         # Extract features and masks for that cluster, in the\r\n         97         # current chunk.\r\n    ---> 98         tmp = chunk_features_masks[idx, :]\r\n         99 \r\n        100         # NOTE: channel order has already been taken into account\r\n\r\n    IndexError: index 37195 is out of bounds for axis 0 with size 5928\r\n\r\nYou can find the kwik, prm and prb files on [google drive](https://drive.google.com/folderview?id=0B3Ae5d7CRAdYfktvS3JDLVROS3M2TGVQUXdYc1hCWVBKVUFtcHFCV1JZVzBvcGJad2w1Qzg&usp=sharing)\r\n"}}