From 419a8bb5532b6f68da798b90198f94afd6d6279c Mon Sep 17 00:00:00 2001 From: Nate Dolensek Date: Tue, 21 Mar 2023 23:44:01 -0700 Subject: [PATCH 1/4] spikeglxrawio.py updated to support 45mm 1.0-NHP probes --- neo/rawio/spikeglxrawio.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/neo/rawio/spikeglxrawio.py b/neo/rawio/spikeglxrawio.py index 3bececd38..a1438ba49 100644 --- a/neo/rawio/spikeglxrawio.py +++ b/neo/rawio/spikeglxrawio.py @@ -40,6 +40,7 @@ imDatPrb_type=1 (NP 1.0) imDatPrb_type=21 (NP 2.0, single multiplexed shank) imDatPrb_type=24 (NP 2.0, 4-shank) +imDatPrb_type=1030, 1032 (NP 1.0-NHP 45mm) Author : Samuel Garcia Some functions are copied from Graham Findlay @@ -380,7 +381,7 @@ def extract_stream_info(meta_file, meta): # metad['imroTbl'] contain two gain per channel AP and LF # except for the last fake channel per_channel_gain = np.ones(num_chan, dtype='float64') - if 'imDatPrb_type' not in meta or meta['imDatPrb_type'] == '0': + if 'imDatPrb_type' not in meta or meta['imDatPrb_type'] == '0' or meta['imDatPrb_type'] in ('1030', '1032'): # This work with NP 1.0 case with different metadata versions # https://github.com/billkarsh/SpikeGLX/blob/gh-pages/Support/Metadata_3A.md#imec # https://github.com/billkarsh/SpikeGLX/blob/gh-pages/Support/Metadata_3B1.md#imec @@ -404,7 +405,7 @@ def extract_stream_info(meta_file, meta): channel_gains = gain_factor * per_channel_gain * 1e6 else: raise NotImplementedError('This meta file version of spikeglx' - 'is not implemented') + ' is not implemented') else: stream_kind = '' stream_name = device From 604c4f34982d71cb59731f38fa7a7beac74313bc Mon Sep 17 00:00:00 2001 From: Nate Dolensek Date: Wed, 22 Mar 2023 00:00:55 -0700 Subject: [PATCH 2/4] added NP 1.0-NHP short and medium length support --- neo/rawio/spikeglxrawio.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/neo/rawio/spikeglxrawio.py b/neo/rawio/spikeglxrawio.py index a1438ba49..c5d8702d0 100644 --- a/neo/rawio/spikeglxrawio.py +++ b/neo/rawio/spikeglxrawio.py @@ -40,7 +40,9 @@ imDatPrb_type=1 (NP 1.0) imDatPrb_type=21 (NP 2.0, single multiplexed shank) imDatPrb_type=24 (NP 2.0, 4-shank) -imDatPrb_type=1030, 1032 (NP 1.0-NHP 45mm) +imDatPrb_type=1030, 1032 (NP 1.0-NHP 45mm - NHP long) +imDatPrb_type=1022 (NP 1.0-NHP 25mm - NHP medium) +imDatPrb_type=1015 (NP 1.0-NHP 10mm - NHP short) Author : Samuel Garcia Some functions are copied from Graham Findlay @@ -381,7 +383,7 @@ def extract_stream_info(meta_file, meta): # metad['imroTbl'] contain two gain per channel AP and LF # except for the last fake channel per_channel_gain = np.ones(num_chan, dtype='float64') - if 'imDatPrb_type' not in meta or meta['imDatPrb_type'] == '0' or meta['imDatPrb_type'] in ('1030', '1032'): + if 'imDatPrb_type' not in meta or meta['imDatPrb_type'] == '0' or meta['imDatPrb_type'] in ('1015', '1022', '1030', '1032'): # This work with NP 1.0 case with different metadata versions # https://github.com/billkarsh/SpikeGLX/blob/gh-pages/Support/Metadata_3A.md#imec # https://github.com/billkarsh/SpikeGLX/blob/gh-pages/Support/Metadata_3B1.md#imec From a23472381f80d11423794580f94d2e01c2735b44 Mon Sep 17 00:00:00 2001 From: Nate Dolensek Date: Wed, 22 Mar 2023 00:58:04 -0700 Subject: [PATCH 3/4] added imDatPrb_type=1031 support as per SpikeGLX source --- neo/rawio/spikeglxrawio.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/neo/rawio/spikeglxrawio.py b/neo/rawio/spikeglxrawio.py index c5d8702d0..ee63ab524 100644 --- a/neo/rawio/spikeglxrawio.py +++ b/neo/rawio/spikeglxrawio.py @@ -40,7 +40,9 @@ imDatPrb_type=1 (NP 1.0) imDatPrb_type=21 (NP 2.0, single multiplexed shank) imDatPrb_type=24 (NP 2.0, 4-shank) -imDatPrb_type=1030, 1032 (NP 1.0-NHP 45mm - NHP long) +imDatPrb_type=1030 (NP 1.0-NHP 45mm SOI90 - NHP long 90um wide) +imDatPrb_type=1031 (NP 1.0-NHP 45mm SOI125 - NHP long 125um wide) +imDatPrb_type=1032 (NP 1.0-NHP 45mm SOI115 / 125 linear - NHP long 125um wide) imDatPrb_type=1022 (NP 1.0-NHP 25mm - NHP medium) imDatPrb_type=1015 (NP 1.0-NHP 10mm - NHP short) @@ -383,7 +385,7 @@ def extract_stream_info(meta_file, meta): # metad['imroTbl'] contain two gain per channel AP and LF # except for the last fake channel per_channel_gain = np.ones(num_chan, dtype='float64') - if 'imDatPrb_type' not in meta or meta['imDatPrb_type'] == '0' or meta['imDatPrb_type'] in ('1015', '1022', '1030', '1032'): + if 'imDatPrb_type' not in meta or meta['imDatPrb_type'] == '0' or meta['imDatPrb_type'] in ('1015', '1022', '1030', '1031', '1032'): # This work with NP 1.0 case with different metadata versions # https://github.com/billkarsh/SpikeGLX/blob/gh-pages/Support/Metadata_3A.md#imec # https://github.com/billkarsh/SpikeGLX/blob/gh-pages/Support/Metadata_3B1.md#imec From d4dae047f88c09f032d8f29af12546ff59311cb0 Mon Sep 17 00:00:00 2001 From: Nate Dolensek Date: Wed, 22 Mar 2023 01:18:14 -0700 Subject: [PATCH 4/4] improved 1.0-NHP probe docs --- neo/rawio/spikeglxrawio.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/neo/rawio/spikeglxrawio.py b/neo/rawio/spikeglxrawio.py index ee63ab524..ab4988526 100644 --- a/neo/rawio/spikeglxrawio.py +++ b/neo/rawio/spikeglxrawio.py @@ -40,9 +40,9 @@ imDatPrb_type=1 (NP 1.0) imDatPrb_type=21 (NP 2.0, single multiplexed shank) imDatPrb_type=24 (NP 2.0, 4-shank) -imDatPrb_type=1030 (NP 1.0-NHP 45mm SOI90 - NHP long 90um wide) -imDatPrb_type=1031 (NP 1.0-NHP 45mm SOI125 - NHP long 125um wide) -imDatPrb_type=1032 (NP 1.0-NHP 45mm SOI115 / 125 linear - NHP long 125um wide) +imDatPrb_type=1030 (NP 1.0-NHP 45mm SOI90 - NHP long 90um wide, staggered contacts) +imDatPrb_type=1031 (NP 1.0-NHP 45mm SOI125 - NHP long 125um wide, staggered contacts) +imDatPrb_type=1032 (NP 1.0-NHP 45mm SOI115 / 125 linear - NHP long 125um wide, linear contacts) imDatPrb_type=1022 (NP 1.0-NHP 25mm - NHP medium) imDatPrb_type=1015 (NP 1.0-NHP 10mm - NHP short)