Browse Source

Upload files to 'In-vivo/Calibration and longitudinal assessment'

Ramon Garcia Cortadella 3 years ago
parent
commit
4c0db52f6a
62 changed files with 21901 additions and 0 deletions
  1. 24 0
      In-vivo/Calibration and longitudinal assessment/Day1-2/Analysis scripts/McsPy/LICENCE.txt
  2. 123 0
      In-vivo/Calibration and longitudinal assessment/Day1-2/Analysis scripts/McsPy/McsCMOS.py
  3. 1272 0
      In-vivo/Calibration and longitudinal assessment/Day1-2/Analysis scripts/McsPy/McsData.py
  4. BIN
      In-vivo/Calibration and longitudinal assessment/Day1-2/Analysis scripts/McsPy/McsData.pyc
  5. 85 0
      In-vivo/Calibration and longitudinal assessment/Day1-2/Analysis scripts/McsPy/Test/TestCMOS.py
  6. BIN
      In-vivo/Calibration and longitudinal assessment/Day1-2/Analysis scripts/McsPy/Test/TestData/2014-07-09T10-17-35W8 Standard all 500 Hz.h5
  7. BIN
      In-vivo/Calibration and longitudinal assessment/Day1-2/Analysis scripts/McsPy/Test/TestData/CMOSTestRec.h5
  8. 344 0
      In-vivo/Calibration and longitudinal assessment/Day1-2/Analysis scripts/McsPy/Test/TestRawDataStructures.py
  9. BIN
      In-vivo/Calibration and longitudinal assessment/Day1-2/Analysis scripts/McsPy/Test/__init__.py
  10. 54 0
      In-vivo/Calibration and longitudinal assessment/Day1-2/Analysis scripts/McsPy/__init__.py
  11. BIN
      In-vivo/Calibration and longitudinal assessment/Day1-2/Analysis scripts/McsPy/__init__.pyc
  12. BIN
      In-vivo/Calibration and longitudinal assessment/Day1-2/Analysis scripts/McsPy/__pycache__/__init__.cpython-37.pyc
  13. 365 0
      In-vivo/Calibration and longitudinal assessment/Day1-2/Analysis scripts/Overview_BodeInVivo_AllChannels_current_MAP.py
  14. 158 0
      In-vivo/Calibration and longitudinal assessment/Day1-2/Analysis scripts/PhaseAmplitude_Rec2.py
  15. 181 0
      In-vivo/Calibration and longitudinal assessment/Day1-2/Analysis scripts/PlotBode.py
  16. BIN
      In-vivo/Calibration and longitudinal assessment/Day1-2/Analyzed data/2019-08-01T15-46-48/GmChDict
  17. BIN
      In-vivo/Calibration and longitudinal assessment/Day1-2/Analyzed data/2019-08-01T15-46-48/PSDcol0
  18. BIN
      In-vivo/Calibration and longitudinal assessment/Day1-2/Analyzed data/2019-08-01T15-46-48/PSDcol1
  19. BIN
      In-vivo/Calibration and longitudinal assessment/Day1-2/Analyzed data/2019-08-01T15-46-48/PSDcol2
  20. BIN
      In-vivo/Calibration and longitudinal assessment/Day1-2/Analyzed data/2019-08-01T15-46-48/PSDcol3
  21. BIN
      In-vivo/Calibration and longitudinal assessment/Day1-2/Analyzed data/2019-08-01T15-46-48/PSDcol4
  22. BIN
      In-vivo/Calibration and longitudinal assessment/Day1-2/Analyzed data/2019-08-01T15-46-48/PSDcol5
  23. 345 0
      In-vivo/Calibration and longitudinal assessment/Day1-2/Calibration scripts/CalcUd0.py
  24. 335 0
      In-vivo/Calibration and longitudinal assessment/Day1-2/Calibration scripts/CalibrationRec2_ExportDatFile.py
  25. 24 0
      In-vivo/Calibration and longitudinal assessment/Day1-2/Calibration scripts/McsPy/LICENCE.txt
  26. 123 0
      In-vivo/Calibration and longitudinal assessment/Day1-2/Calibration scripts/McsPy/McsCMOS.py
  27. 1272 0
      In-vivo/Calibration and longitudinal assessment/Day1-2/Calibration scripts/McsPy/McsData.py
  28. BIN
      In-vivo/Calibration and longitudinal assessment/Day1-2/Calibration scripts/McsPy/McsData.pyc
  29. 85 0
      In-vivo/Calibration and longitudinal assessment/Day1-2/Calibration scripts/McsPy/Test/TestCMOS.py
  30. BIN
      In-vivo/Calibration and longitudinal assessment/Day1-2/Calibration scripts/McsPy/Test/TestData/2014-07-09T10-17-35W8 Standard all 500 Hz.h5
  31. BIN
      In-vivo/Calibration and longitudinal assessment/Day1-2/Calibration scripts/McsPy/Test/TestData/CMOSTestRec.h5
  32. 344 0
      In-vivo/Calibration and longitudinal assessment/Day1-2/Calibration scripts/McsPy/Test/TestRawDataStructures.py
  33. BIN
      In-vivo/Calibration and longitudinal assessment/Day1-2/Calibration scripts/McsPy/Test/__init__.py
  34. 54 0
      In-vivo/Calibration and longitudinal assessment/Day1-2/Calibration scripts/McsPy/__init__.py
  35. BIN
      In-vivo/Calibration and longitudinal assessment/Day1-2/Calibration scripts/McsPy/__init__.pyc
  36. BIN
      In-vivo/Calibration and longitudinal assessment/Day1-2/Calibration scripts/McsPy/__pycache__/__init__.cpython-37.pyc
  37. BIN
      In-vivo/Calibration and longitudinal assessment/Day1-2/CalibrationFile/Cal-Gm20190731_033840.h5
  38. 23 0
      In-vivo/Calibration and longitudinal assessment/Day1-2/IV charact/20190731_033840 Current vs Vgs
  39. 23 0
      In-vivo/Calibration and longitudinal assessment/Day1-2/IV charact/20190731_033840 Current vs Vgs_5sStep.txt
  40. 1337 0
      In-vivo/Calibration and longitudinal assessment/Day1-2/IV charact/20190731_033840 Current vs time
  41. 23 0
      In-vivo/Calibration and longitudinal assessment/Day1-2/IV charact/20190731_035018 Current vs Vgs
  42. 23 0
      In-vivo/Calibration and longitudinal assessment/Day1-2/IV charact/20190731_035018 Current vs Vgs_20sStep.txt
  43. 6444 0
      In-vivo/Calibration and longitudinal assessment/Day1-2/IV charact/20190731_035018 Current vs time
  44. 6444 0
      In-vivo/Calibration and longitudinal assessment/Day1-2/IV charact/20190731_035018 Current vs time.txt
  45. BIN
      In-vivo/Calibration and longitudinal assessment/Day1-2/IV charact/20190731_115211 Current vs Vgs
  46. BIN
      In-vivo/Calibration and longitudinal assessment/Day1-2/IV charact/20190731_115239 Current vs Vgs
  47. 19 0
      In-vivo/Calibration and longitudinal assessment/Day1-2/IV charact/20190731_115540 Current vs Vgs_5sStep-afterRec2
  48. 19 0
      In-vivo/Calibration and longitudinal assessment/Day1-2/IV charact/20190731_115540 Current vs Vgs_5sStep-afterRec2.txt
  49. 1119 0
      In-vivo/Calibration and longitudinal assessment/Day1-2/IV charact/20190731_115540 Current vs time_5sStep-afterRec2
  50. 19 0
      In-vivo/Calibration and longitudinal assessment/Day1-2/IV charact/20190801_031608 Current vs Vgs5s-afterRec6-highRange
  51. 19 0
      In-vivo/Calibration and longitudinal assessment/Day1-2/IV charact/20190801_031608 Current vs Vgs5s-afterRec6-highRange.txt
  52. 1090 0
      In-vivo/Calibration and longitudinal assessment/Day1-2/IV charact/20190801_031608 Current vs time5s-afterRec6-highRange
  53. 23 0
      In-vivo/Calibration and longitudinal assessment/Day1-2/IV charact/B12784O18-T2-InVivo-VgsSweep1
  54. 23 0
      In-vivo/Calibration and longitudinal assessment/Day1-2/IV charact/B12784O18-T2-InVivo-VgsSweep20s
  55. 23 0
      In-vivo/Calibration and longitudinal assessment/Day1-2/IV charact/B12784O18-T2-InVivo-VgsSweep5s-afterRec2
  56. 19 0
      In-vivo/Calibration and longitudinal assessment/Day1-2/IV charact/B12784O18-T2-InVivo-VgsSweep5s-afterRec2-highRange
  57. 19 0
      In-vivo/Calibration and longitudinal assessment/Day1-2/IV charact/B12784O18-T2-InVivo-VgsSweep5s-afterRec6-highRange
  58. 1 0
      In-vivo/Calibration and longitudinal assessment/Day1-2/Raw Data/2019-07-31T18-00-05B12784O18-T2-Longterm-Rec2.h5
  59. 1 0
      In-vivo/Calibration and longitudinal assessment/Day1-2/Raw Data/2019-07-31T18-00-05B12784O18-T2-Longterm-Rec2_2.h5
  60. 1 0
      In-vivo/Calibration and longitudinal assessment/Day1-2/Raw Data/2019-08-01T15-46-48B12784O18-T2-1uA.h5
  61. 1 0
      In-vivo/Calibration and longitudinal assessment/Day1-2/Raw Data/2019-08-01T15-46-48B12784O18-T2-1uA_2.h5
  62. BIN
      In-vivo/Calibration and longitudinal assessment/Day1-2/Recording notes-day1-2.xlsx

+ 24 - 0
In-vivo/Calibration and longitudinal assessment/Day1-2/Analysis scripts/McsPy/LICENCE.txt

@@ -0,0 +1,24 @@
+Copyright (c) 2018, Multi Channel Systems MCS GmbH
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+    * Redistributions of source code must retain the above copyright
+      notice, this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the
+      documentation and/or other materials provided with the distribution.
+    * Neither the name of the Multi Channel Systems MCS GmbH nor the
+      names of its contributors may be used to endorse or promote products
+      derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+ 123 - 0
In-vivo/Calibration and longitudinal assessment/Day1-2/Analysis scripts/McsPy/McsCMOS.py

@@ -0,0 +1,123 @@
+"""
+    McsCMOS
+    ~~~~~~~
+
+    Wrapper and Helper to access MCS CMOS Data within H5 Files 
+    
+    :copyright: (c) 2015 by Multi Channel Systems MCS GmbH
+    :license: see LICENSE for more details
+"""
+
+import h5py
+import numpy
+
+class CMOSData(h5py.File):
+    """
+    Wrapper for a HDF5 File containing CMOS Data
+    """
+    def __init__(self, path):
+        """
+        Creates a CMOSData file and links it to a H5 File
+        :param path: Path to a H5 File containing CMOS Data
+        :type path: string 
+        """
+        super(CMOSData, self).__init__(path, mode='r')
+        
+        # -- map raw data --
+        self.raw_data= self['/Data/Recording_0/FrameStream/Stream_0/FrameDataEntity_0/FrameData']
+        self.conv_factors= self['/Data/Recording_0/FrameStream/Stream_0/FrameDataEntity_0/ConversionFactors']
+
+        # - map proxy data -
+        self.conv_data = CMOSConvProxy(self)
+
+        # -- map meta --
+        self.meta={}
+        
+        # - from InfoFrame
+        info_frame= self['/Data/Recording_0/FrameStream/Stream_0/InfoFrame']
+        
+        for key in info_frame.dtype.names:
+            self.meta[key]=info_frame[key][0]
+
+        if("Tick" in self.meta):
+            self.meta["FrameRate"] = 10.0**6/self.meta["Tick"]
+        
+        # - from File
+        for key, value in self.attrs.items():
+            self.meta[key]= value
+
+        # - from Data Group
+        for key, value in self['/Data'].attrs.items():
+            self.meta[key]= value
+
+        # -- map events --
+        if("EventStream" in self["Data/Recording_0/"].keys()):
+            event_group = self["Data/Recording_0/EventStream/Stream_0/"]
+            event_info = self["Data/Recording_0/EventStream/Stream_0/InfoEvent"]
+
+            self.events={}
+            self.event_frames={}
+        
+            for key in event_group.keys():
+                if "EventEntity" in key:
+                    info = event_info["Label"][event_info["EventID"]==int(key.split("_")[1])][0]
+                    self.events[info] = event_group[key][0, 0]
+                    self.event_frames[info] = event_group[key][0, 0]/self.meta["Tick"]
+
+
+
+class CMOSConvProxy:
+    """
+    Private Class, should be embedded within a CMOSData Object.
+    A proxy that transparently converts raw data to calibrated data. 
+    """
+
+    def __init__(self, parent):
+        """
+        Creates a new CMOSConvProxy
+        :param parent: Object that can provide raw_data and conv_factors
+        :type parent: CMOSData
+        """
+        self._parent = parent
+        self.dtype = numpy.int32
+
+    def __getitem__(self, slices):
+        """
+        Sliced access to converted data
+        :param slices: Data-slices to retrieve
+        :returns: converted data
+        """
+        raw_data = self._parent.raw_data.__getitem__(slices)
+        conv_fasctors = self._parent.conv_factors.__getitem__((slices[0], slices[1]))
+        return (raw_data*conv_fasctors).astype(self.dtype)
+
+    @property
+    def shape(self):
+        """
+        Shape of the data
+        """
+        return self._parent.raw_data.shape
+
+
+class CMOSSpikes(h5py.File):
+    """
+    Wrapper for a HDF5 File containing CMOS Spike Data.
+    Spike Information is accessible through the .spike Member,
+    Waveform Information (if available) through the .waveforms Member.
+    """
+    def __init__(self, path):
+        super(CMOSSpikeFile, self).__init__(path)
+
+        # -- Check for right structure --
+        if("data" in self.keys() and "spikes" in self['data'].keys()):
+            
+            # -- Map Spike-Data to RecordArray
+            self.spikes = np.core.records.fromarrays(self['data/spikes'][:,:], 
+                                                 names='time, col, row',
+                                                 formats = 'int64, int64, int64')
+            # -- Map Waveforms to Array
+            if("waveforms" in self['data'].keys()):
+                self.waveforms = self['data/waveforms'][:,:].transpose()
+                
+        else:
+            raise IOError(path+ " has no valid CMOSSpikeFile Structure")

File diff suppressed because it is too large
+ 1272 - 0
In-vivo/Calibration and longitudinal assessment/Day1-2/Analysis scripts/McsPy/McsData.py


BIN
In-vivo/Calibration and longitudinal assessment/Day1-2/Analysis scripts/McsPy/McsData.pyc


+ 85 - 0
In-vivo/Calibration and longitudinal assessment/Day1-2/Analysis scripts/McsPy/Test/TestCMOS.py

@@ -0,0 +1,85 @@
+import unittest
+import McsPy.McsCMOS
+import os
+import numpy
+
+FILENAME = os.path.join(os.path.dirname(__file__), 'TestData\\CMOSTestRec.h5')
+
+class TestMcsCMOS(unittest.TestCase):
+
+    def setUp(self):
+        self.test_file=McsPy.McsCMOS.CMOSData(FILENAME)
+
+    def test_CMOSData_meta(self):
+
+        #File Meta
+        self.assertEqual(self.test_file.meta["McsHdf5ProtocolType"], "RawData")
+        self.assertEqual(self.test_file.meta["McsHdf5ProtocolVersion"], 1)
+
+        # Data Meta
+        self.assertEqual(self.test_file.meta["ProgramName"].strip(), "CMOS-MEA-Control")
+        self.assertEqual(self.test_file.meta["ProgramVersion"].strip(), "0.7.0.0")
+        self.assertEqual(self.test_file.meta["MeaName"].strip(), "nMos32?")
+        self.assertEqual(self.test_file.meta["MeaLayout"], "")
+        self.assertEqual(self.test_file.meta["MeaSN"].strip(), "unknown")
+        self.assertEqual(self.test_file.meta["Date"].strip(), "Tuesday, November 04, 2014")
+        self.assertEqual(self.test_file.meta["DateInTicks"], 635506934728348929)
+        self.assertEqual(self.test_file.meta["FileGUID"], "67ced1bf-c1a7-4a3d-9df3-2e56fd459cbd")
+        self.assertEqual(self.test_file.meta["Comment"], "")
+
+        # InfoFrame Meta
+        self.assertEqual(self.test_file.meta["FrameID"], 1)
+        self.assertEqual(self.test_file.meta["FrameDataID"], 0)
+        self.assertEqual(self.test_file.meta["GroupID"], 1)
+        self.assertEqual(self.test_file.meta["Label"], "ROI 1")
+        self.assertEqual(self.test_file.meta["RawDataType"], "Short")
+        self.assertEqual(self.test_file.meta["Unit"], "V")
+        self.assertEqual(self.test_file.meta["Exponent"], -9)
+        self.assertEqual(self.test_file.meta["ADZero"], 0)
+        self.assertEqual(self.test_file.meta["Tick"], 50)
+        self.assertEqual(self.test_file.meta["HighPassFilterType"], "")
+        self.assertEqual(self.test_file.meta["HighPassFilterCutOffFrequency"], "-1")
+        self.assertEqual(self.test_file.meta["HighPassFilterOrder"], -1)
+        self.assertEqual(self.test_file.meta["LowPassFilterType"], "")
+        self.assertEqual(self.test_file.meta["LowPassFilterCutOffFrequency"], "-1")
+        self.assertEqual(self.test_file.meta["LowPassFilterOrder"], -1)
+        self.assertEqual(self.test_file.meta["SensorSpacing"], 1)
+        self.assertEqual(self.test_file.meta["FrameLeft"], 1)
+        self.assertEqual(self.test_file.meta["FrameTop"], 1)
+        self.assertEqual(self.test_file.meta["FrameRight"], 65)
+        self.assertEqual(self.test_file.meta["FrameBottom"], 65)
+        self.assertEqual(self.test_file.meta["ReferenceFrameLeft"], 1)
+        self.assertEqual(self.test_file.meta["ReferenceFrameTop"], 1)
+        self.assertEqual(self.test_file.meta["ReferenceFrameRight"], 65)
+        self.assertEqual(self.test_file.meta["ReferenceFrameBottom"], 65)
+
+    def test_CMOSData_data(self):
+
+        # Dataset Dimensions
+        self.assertEqual(self.test_file.raw_data.shape[0],65)
+        self.assertEqual(self.test_file.raw_data.shape[1],65)
+        self.assertEqual(self.test_file.raw_data.shape[2],2000)
+
+        #Some Random Datapoints
+        self.assertEqual(self.test_file.raw_data[56,45,33],10)
+        self.assertEqual(self.test_file.raw_data[1,11,203],-3)
+        self.assertEqual(self.test_file.raw_data[23,64,870],0)
+
+    def test_CMOSData_conversion_factors(self):
+        self.assertEqual(self.test_file.conv_factors[56,45],6456)
+        self.assertEqual(self.test_file.conv_factors[1,11],1)
+        self.assertEqual(self.test_file.conv_factors[23,64],1)
+
+    def test_CMOSData_conversion_proxy(self):
+
+        #Data Access
+        self.assertEqual(self.test_file.conv_data[56,45,33],64560)
+        self.assertEqual(self.test_file.conv_data[1,11,203],-3)
+        self.assertEqual(self.test_file.conv_data[23,64,870],0)
+
+        #Attribute proxy
+        self.assertEqual(self.test_file.conv_data.dtype,numpy.int32)
+        self.assertEqual(self.test_file.conv_data[23,64,870].dtype,numpy.int32)
+
+if __name__ == '__main__':
+    unittest.main()

BIN
In-vivo/Calibration and longitudinal assessment/Day1-2/Analysis scripts/McsPy/Test/TestData/2014-07-09T10-17-35W8 Standard all 500 Hz.h5


BIN
In-vivo/Calibration and longitudinal assessment/Day1-2/Analysis scripts/McsPy/Test/TestData/CMOSTestRec.h5


+ 344 - 0
In-vivo/Calibration and longitudinal assessment/Day1-2/Analysis scripts/McsPy/Test/TestRawDataStructures.py

@@ -0,0 +1,344 @@
+import unittest
+import McsPy.McsData
+import datetime
+import exceptions
+import os
+import numpy as np
+
+from McsPy import *
+
+test_raw_frame_data_file_path = os.path.join(os.path.dirname(__file__), 'TestData\\Sensors-10x100ms-10kHz.h5')
+
+test_data_file_path = os.path.join(os.path.dirname(__file__), 'TestData\\2014-07-09T10-17-35W8 Standard all 500 Hz.h5')
+
+average_segment_data_file_path = os.path.join(os.path.dirname(__file__), 'TestData\\20150402_00 Atrium_002.h5')
+
+#@unittest.skip("showing the principle structure of python unit tests")
+#class Test_TestRawDataStructures(unittest.TestCase):
+#    def test_A(self):
+#        self.fail("Not implemented")
+
+class Test_RawData(unittest.TestCase):
+    def setUp(self):
+        self.data = McsData.RawData(test_data_file_path)
+        self.raw_frame_data = McsData.RawData(test_raw_frame_data_file_path)
+        self.average_segments = McsData.RawData(average_segment_data_file_path)
+
+class Test_RawDataContainer(Test_RawData):
+    # Test MCS-HDF5 version
+    def test_mcs_hdf5_version(self):
+        self.assertEqual(self.data.mcs_hdf5_protocol_type, "RawData", 
+                         "The MCS-HDF5 protocol type was '%s' and not '%s' as expected!" % (self.data.mcs_hdf5_protocol_type, "RawData"))
+        self.assertEqual(self.data.mcs_hdf5_protocol_type_version, 1, 
+                         "The MCS-HDF5 protocol version was '%s' and not '1' as expected!" % self.data.mcs_hdf5_protocol_type_version)
+
+    def test_mcs_hdf5_version_frame(self):
+        self.assertEqual(self.data.mcs_hdf5_protocol_type,  "RawData", 
+                         "The MCS-HDF5 protocol type was '%s' and not '%s' as expected!" % (self.data.mcs_hdf5_protocol_type, "RawData"))
+        self.assertEqual(self.data.mcs_hdf5_protocol_type_version, 1, 
+                         "The MCS-HDF5 protocol version was '%s' and not '1' as expected!" % self.data.mcs_hdf5_protocol_type_version)
+
+    # Test session:
+    def test_session_attributes(self):
+        self.assertEqual(self.data.comment, '', 'Comment is different!')
+        self.assertEqual(self.data.clr_date, 'Mittwoch, 9. Juli 2014', 'Clr-Date is different!')
+        self.assertEqual(self.data.date_in_clr_ticks, 635404978551720981, 'Clr-Date-Ticks are different!')
+        self.assertEqual(self.data.date, datetime.datetime(2014, 7, 9, 10, 17, 35, 172098), 'Date is different!');
+        self.assertEqual(str(self.data.file_guid), '700b3ec2-d406-4943-bcef-79d73f0ac4d3', 'FileGUID is different!')
+        self.assertEqual(str(self.data.mea_layout), 'Linear8', 'Mea-Layout is different!')
+        self.assertEqual(self.data.mea_sn, '', 'MeaSN is different!')
+        self.assertEqual(self.data.mea_name, 'Linear8', 'MeaName is different!')
+        self.assertEqual(self.data.program_name, 'Multi Channel Experimenter', 'Program name is different!')
+        self.assertEqual(self.data.program_version, '0.9.8.2', 'Program version is different!') 
+
+
+    # Test recording:
+    def test_count_recordings(self):
+        self.assertEqual(len(self.data.recordings), 1, 'There should be only one recording!')
+
+    def test_recording_attributes(self):
+        first_recording = self.data.recordings[0]
+        self.assertEqual(first_recording.comment, '', 'Recording comment is different!')
+        self.assertEqual(first_recording.duration, 19700000, 'Recording duration is different!')
+        self.assertEqual(first_recording.label, '', 'Recording label is different!')
+        self.assertEqual(first_recording.recording_id, 0, 'Recording ID is different!')
+        self.assertEqual(first_recording.recording_type, '', 'Recording type is different!')
+        self.assertEqual(first_recording.timestamp, 0, 'Recording timestamp is different!')
+        self.assertAlmostEqual(first_recording.duration_time.to(ureg.sec).magnitude, 19.7, places = 1, msg = 'Recording timestamp is different!')
+
+    # Test analog streams:
+    def test_count_analog_streams(self):
+        self.assertEqual(len(self.data.recordings[0].analog_streams), 3, 'There should be only one analog stream inside the recording!')
+
+    def test_analog_stream_attributes(self):
+        first_analog_stream = self.data.recordings[0].analog_streams[0]
+        self.assertEqual(first_analog_stream.info_version, 1, "Version of the Stream-Info was %s and not as expected 1!" % first_analog_stream.info_version)
+        self.assertEqual(first_analog_stream.data_subtype, 'Electrode', 'Analog stream data sub type is different!')
+        self.assertEqual(first_analog_stream.label, 'Filter (1) Filter Data', 'Analog stream label is different!')
+        self.assertEqual(str(first_analog_stream.source_stream_guid), '43f795b0-7881-408f-a840-0207bc8e203c', 'Analog stream source GUID is different!')
+        self.assertEqual(str(first_analog_stream.stream_guid), 'a9d1ab04-2cf8-489c-a861-595e662fba4e', 'Analog stream GUID is different!')
+        self.assertEqual(first_analog_stream.stream_type, 'Analog', 'Analog stream type is different!')
+    
+    def test_analog_stream(self):
+        data_set = self.data.recordings[0].analog_streams[0].channel_data
+        self.assertEqual(data_set.shape, (8, 9850), 'Shape of dataset is different!')
+        
+        timestamp_index = self.data.recordings[0].analog_streams[0].timestamp_index
+        self.assertEqual(timestamp_index.shape, (1, 3), 'Shape of timestamp index is different!')
+
+        channel_infos = self.data.recordings[0].analog_streams[0].channel_infos
+        self.assertEqual(len(channel_infos), 8, 'Number of channel info objects is different!')
+        self.assertEqual(len(channel_infos[0].info), 16, 'Number of of components of an channel info object is different!')
+        self.assertEqual(channel_infos[0].version, 1, 'InfoChannel-Type version 1 expected but was %s' % channel_infos[0].version)
+
+    def test_analog_stream_data(self):
+        analog_stream = self.data.recordings[0].analog_streams[0]
+        signal = analog_stream.get_channel_in_range(0, 1569, 1584)
+        sig = signal[0]
+        scale = 381469 * 10**-9
+        expected_sig = np.array([4, 5, 0, -3, 2, -1, -6, 6, 0, 0, 0, 0, 0, 0, 3, -9], dtype=np.float) * scale
+        np.testing.assert_almost_equal(sig, expected_sig, decimal = 5)
+        #self.assertEquals(map(lambda x: x, sig), expected_sig, "Signal values were '%s' and not as expected '%s'" % (sig, expected_sig))
+        self.assertEqual(str(signal[1]), 'volt', "Unit of sampled values was expected to be 'volt' but was '%s'!" % str(signal[1]))
+
+    def test_analog_stream_data_timestamps(self):
+        analog_stream = self.data.recordings[0].analog_streams[0]
+        signal_ts = analog_stream.get_channel_sample_timestamps(6, 1996, 2000)
+        sig_ts = signal_ts[0]
+        expected_ts = [3992000, 3994000, 3996000, 3998000, 4000000]
+        self.assertEquals(map(lambda x: x, sig_ts), expected_ts, "Selected timestamps were '%s' and not as expected '%s'" % (sig_ts, expected_ts))
+        self.assertEqual(str(signal_ts[1]), 'microsecond', "Unit of timestamps was expected to be 'microsecond' but was '%s'!" % str(signal_ts[1]))
+
+    # Test frame streams:
+    def test_count_frame_streams(self):
+        self.assertEqual(len(self.raw_frame_data.recordings[0].frame_streams), 1, 'There should be only one frame stream!')
+        self.assertEqual(len(self.raw_frame_data.recordings[0].frame_streams[0].frame_entity), 1, 'There should be only one frame entity inside the stream!')
+
+    def test_frame_stream_attributes(self):
+        first_frame_stream = self.raw_frame_data.recordings[0].frame_streams[0]
+        self.assertEqual(first_frame_stream.info_version, 1, "Version of the Stream-Info was %s and not as expected 1!" % first_frame_stream.info_version)
+        self.assertEqual(first_frame_stream.data_subtype, 'Unknown', 'Frame stream data sub type is different!')
+        self.assertEqual(first_frame_stream.label, '', 'Frame stream label is different!')
+        self.assertEqual(str(first_frame_stream.source_stream_guid), '11bee63c-8714-4b2b-8cf9-228b1915f183', 'Frame stream source GUID is different!')
+        self.assertEqual(str(first_frame_stream.stream_guid), '784bf2ba-0e1b-4f3a-acc6-825af9bd1bf1', 'Frame stream GUID is different!')
+        self.assertEqual(first_frame_stream.stream_type, 'Frame', 'Frame stream type is different!')
+    
+    def test_frame_infos(self):
+        conv_fact_expected = np.zeros(shape=(65,65), dtype=np.int32) + 1000
+        info_expected = {
+                     'FrameLeft': 1, 'Exponent': -9, 'RawDataType': 'Short', 'LowPassFilterCutOffFrequency': '-1', 'Label': 'ROI 1', 
+                     'FrameTop': 1, 'ADZero': 0, 'LowPassFilterOrder': -1, 'ReferenceFrameTop': 1, 'FrameRight': 65, 'HighPassFilterType': '', 
+                     'Tick': 50, 'SensorSpacing': 1, 'HighPassFilterCutOffFrequency': '-1', 'FrameDataID': 0, 'FrameID': 1, 'GroupID': 1, 
+                     'ReferenceFrameRight': 65, 'ReferenceFrameBottom': 65, 'LowPassFilterType': '', 'HighPassFilterOrder': -1, 
+                     'ReferenceFrameLeft': 1, 'FrameBottom': 65, 'Unit': 'V'
+        }
+        frame_info = self.raw_frame_data.recordings[0].frame_streams[0].frame_entity[1].info
+        self.assertEqual(len(frame_info.info), 24, 'Number of of components of an channel info object is different!')
+        info_key_diff = set(frame_info.info.keys()) - set(info_expected.keys())
+        if not info_key_diff:
+            for key, value in frame_info.info.items():
+                self.assertEqual(
+                    value, info_expected[key], 
+                    "Frame info object for key '%(k)s' is ('%(val)s') not as expected ('%(ex_val)s')!" % {'k':key, 'val':value, 'ex_val':info_expected[key]}
+                )
+        self.assertEqual(frame_info.frame.height, 65, "Frame height was '%s' and not '65' as expected!" % frame_info.frame.height)
+        self.assertEqual(frame_info.frame.width, 65, "Frame width was '%s' and not '65' as expected!" % frame_info.frame.width)
+        self.assertEqual(frame_info.reference_frame.height, 65, "Frame height was '%s' and not '65' as expected!" % frame_info.reference_frame.height)
+        self.assertEqual(frame_info.reference_frame.width, 65, "Frame width was '%s' and not '65' as expected!" % frame_info.reference_frame.width)
+        self.assertEqual(frame_info.adc_basic_step.magnitude, 10**-9, "ADC step was '%s' and not '10^-9 V' as expected!" % frame_info.adc_basic_step)
+        self.assertEqual(frame_info.adc_step_for_sensor(0,0).magnitude, 1000 * 10**-9, "ADC step was '%s' and not '1000 * 10^-9 V' as expected!" % frame_info.adc_step_for_sensor(0,0))
+        self.assertEqual(frame_info.adc_step_for_sensor(1,1).magnitude, 1000 * 10**-9, "ADC step was '%s' and not '1000 * 10^-9 V' as expected!" % frame_info.adc_step_for_sensor(1,1))
+        self.assertEqual(frame_info.adc_step_for_sensor(63,63).magnitude, 1000 * 10**-9, "ADC step was '%s' and not '1000 * 10^-9 V' as expected!" % frame_info.adc_step_for_sensor(63,63))
+        self.assertTrue((frame_info.conversion_factors == conv_fact_expected).all(), "Frame sensor conversion factors matrix is different from the expected one!")
+        self.assertRaises(exceptions.IndexError, frame_info.adc_step_for_sensor, 65,65)          
+
+    def test_frame_data(self):
+        frame_entity = self.raw_frame_data.recordings[0].frame_streams[0].frame_entity[1]
+        frame_data = frame_entity.data
+        frame = frame_data[:,:,1]
+        self.assertEqual(frame.shape, (65,65), "Second slice was '%s' and not '(65,65)' as expected!" % str(frame.shape))
+        selected_values = [frame[0,0], frame[9,3], frame[0,5]]
+        expected_values = [    -10000,        211,       -727]
+        self.assertEquals(selected_values, expected_values, "Selected ADC values were '%s' and not as expected '%s'" % (selected_values, expected_values))
+        sensor_signal = frame_entity.get_sensor_signal(30, 30, 0, 1000)
+        sig = sensor_signal[0]
+        self.assertEquals(len(sig), 1001, "Length of sensor signal was '%s' and not as expected '1001'" % len(sig))
+
+    def test_frame_data_timestamps(self):
+        frame_entity = self.raw_frame_data.recordings[0].frame_streams[0].frame_entity[1]
+        timestamps = frame_entity.get_frame_timestamps(0,2000)
+        ts = timestamps[0]
+        self.assertEqual(len(ts), 2001, "Number oftime stamps were '%s' and not as expected '2001'" % len(ts))
+        timestamps = frame_entity.get_frame_timestamps(1995,2005)
+        ts = timestamps[0]
+        self.assertEqual(len(ts), 11, "Number of timestamps were '%s' and not as expected '11'" % len(ts))
+        expected_ts = [199750, 199800, 199850, 199900, 199950, 200000,  1000000,  1000050,  1000100, 1000150, 1000200]
+        self.assertEquals(map(lambda x: x, ts), expected_ts, "Timestamps were '%s' and not as expected '%s'" % (ts, expected_ts))
+        timestamps = frame_entity.get_frame_timestamps(0,5000)
+        ts = timestamps[0]
+        self.assertEqual(len(ts), 5001, "Number of timestamps were '%s' and not as expected '5001'" % len(ts))
+        selected_ts = [ ts[0], ts[1], ts[2000], ts[2001], ts[2002], ts[4001], ts[4002], ts[4003]]
+        expected_ts = [100000,100050,   200000,  1000000,  1000050,  1100000,  3000000,  3000050]
+        self.assertEquals(selected_ts, expected_ts, "Selected timestamps were '%s' and not as expected '%s'" % (selected_ts, expected_ts))
+        timestamps = frame_entity.get_frame_timestamps(16008,16008)
+        ts = timestamps[0]
+        self.assertEqual(len(ts), 1, "Number of timestamps were '%s' and not as expected '1'" % len(ts))
+        self.assertEquals(ts[0], 12500000, "Timestamps were '%s' and not as expected '%s'" % (ts, expected_ts))
+        self.assertEqual(str(timestamps[1]), 'microsecond', "Unit of timestamps was expected to be 'microsecond' but was '%s'!" % str(timestamps[1]))
+
+    # Test event streams:
+    def test_count_event_streams(self):
+        self.assertEqual(len(self.data.recordings[0].event_streams), 1, 'There should be only one event stream inside the recording!')
+        self.assertEqual(len(self.data.recordings[0].event_streams[0].event_entity), 1, 'There should be 1 event entities inside the stream!')
+
+    def test_event_stream_attributes(self):
+        first_event_stream = self.data.recordings[0].event_streams[0]
+        self.assertEqual(first_event_stream.info_version, 1, "Version of the Stream-Info was %s and not as expected 1!" % first_event_stream.info_version)
+        self.assertEqual(first_event_stream.data_subtype, 'DigitalPort', 'Event stream data sub type is different from expected \'DigitalPort\'!')
+        self.assertEqual(first_event_stream.label, 'Digital Events 1', 'Event stream label is different!')
+        self.assertEqual(str(first_event_stream.source_stream_guid), '0696bca6-7c30-4024-8e58-72da383aa248', 'Event stream source GUID is different!')
+        self.assertEqual(str(first_event_stream.stream_guid), '92bc437b-7655-4673-adfa-abbeca2c53e0', 'Event stream GUID is different!')
+        self.assertEqual(first_event_stream.stream_type, 'Event', 'Event stream type is different!')
+
+    def test_event_infos(self):
+        first_event_entity = self.data.recordings[0].event_streams[0].event_entity[0]
+        self.assertEqual(first_event_entity.info.version, 1, "EventEntityInfo-Version was %s and not \'1\' as expected!" % first_event_entity.info.version)
+        self.assertEqual(first_event_entity.info.id, 0, "ID is not as expected!")
+        self.assertEqual(first_event_entity.info.raw_data_bytes, 4, "RawDataBytes is not as expected!")
+        self.assertEquals(first_event_entity.info.source_channel_ids, [8],"Source channel IDs are different!") 
+        self.assertEquals(first_event_entity.info.source_channel_labels.values(), 
+                          ["1"],"Source channels label is different (was '%s' instead of '['1']')!" % 
+                          first_event_entity.info.source_channel_labels.values()) 
+
+    def test_event_data(self):
+        first_event_entity = self.data.recordings[0].event_streams[0].event_entity[0]
+        self.assertEqual(first_event_entity.count, 12, "Count was expected to be 12 but was %s!" % first_event_entity.count)
+        events = first_event_entity.get_events()
+        self.assertEqual(str(events[1]), 'microsecond', "Event time unit was expected to be 'microsecond' but was '%s'!" % str(events[1]))
+        self.assertEqual((events[0]).shape, (2,12), "Event structured was expected to be (2,12) but was %s!" % str(events[0].shape))
+        events_ts = first_event_entity.get_event_timestamps(0,3)
+        #self.assertAlmostEquals(events[0],[1.204050, 2.099150, 2.106800] , places = 5, msg = "Event timestamps were not as expected!")
+        np.testing.assert_almost_equal(events_ts[0],[216000, 1916000, 3616000], decimal = 5)
+        events_ts = first_event_entity.get_event_timestamps(4,5)
+        self.assertAlmostEqual(events_ts[0][0], 7016000, places = 4, msg = "Last event timestamp was %s and not as expected 216000!" % events[0][0])
+        events_duration = first_event_entity.get_event_durations(2,8)
+        np.testing.assert_almost_equal(events_duration[0],[0, 0, 0, 0, 0, 0], decimal = 5)
+        self.assertRaises(exceptions.IndexError, first_event_entity.get_events, 16, 4)
+        self.assertRaises(exceptions.IndexError, first_event_entity.get_events, 412, 500)   
+        self.assertRaises(exceptions.IndexError, first_event_entity.get_events, -1, 5) 
+
+    # Test segment streams:
+    def test_count_segment_streams(self):
+        self.assertEqual(len(self.data.recordings[0].segment_streams), 1, 'There should be only one segment stream inside the recording!')
+        self.assertEqual(len(self.data.recordings[0].segment_streams[0].segment_entity), 8, 'There should be 8 segment entities inside the stream!')
+
+    def test_segment_stream_attributes(self):
+        first_segment_stream = self.data.recordings[0].segment_streams[0]
+        self.assertEqual(first_segment_stream.info_version, 1, "Version of the Stream-Info was %s and not as expected 1!" % first_segment_stream.info_version)
+        self.assertEqual(first_segment_stream.stream_type, 'Segment', "Segment stream type was '%s' and not 'Segment'!" % first_segment_stream.stream_type)
+        self.assertEqual(first_segment_stream.data_subtype, 'Spike', "Segment stream data sub type was '%s' and not 'Spike' as expected!" % first_segment_stream.data_subtype)
+        self.assertEqual(first_segment_stream.label, 'Spike Detector (1) Spike Data', "Segment label was '%s' and not '' as expected!" % first_segment_stream.label)
+        self.assertEqual(str(first_segment_stream.source_stream_guid), 'a9d1ab04-2cf8-489c-a861-595e662fba4e', 
+                         "Segment stream source GUID was '%s' and not 'a9d1ab04-2cf8-489c-a861-595e662fba4e' as expected!" % str(first_segment_stream.source_stream_guid))
+        self.assertEqual(str(first_segment_stream.stream_guid), '7c2105e5-5ea4-4fdc-91d8-6b85f47773c2', 
+                         "Segment stream GUID was '%s' and not '7c2105e5-5ea4-4fdc-91d8-6b85f47773c2' as expected!" % str(first_segment_stream.stream_guid))
+
+    def test_segment_infos(self):
+        fifth_segment_entity = self.data.recordings[0].segment_streams[0].segment_entity[4]
+        self.assertEqual(fifth_segment_entity.info.version, 1, "SegmentEntityInfo-Version was '%s' and not '1' as expected!" % fifth_segment_entity.info.version)
+        self.assertEqual(fifth_segment_entity.info.id, 4, "ID was '%s' and not '4' as expected!" % fifth_segment_entity.info.id)
+        self.assertEqual(fifth_segment_entity.info.group_id, 0, "Group ID was '%s' and not '0' as expected!" % fifth_segment_entity.info.group_id)
+        self.assertEqual(fifth_segment_entity.info.pre_interval.magnitude, 1000, "Pre-Interval was '%s' and not '1000' as expected!" % fifth_segment_entity.info.pre_interval.magnitude)
+        self.assertEqual(str(fifth_segment_entity.info.pre_interval.units), 'microsecond', "Pre-Interval unit was '%s' and not 'microsecond' as expected!" % str(fifth_segment_entity.info.pre_interval.units))
+        self.assertEqual(fifth_segment_entity.info.post_interval.magnitude, 2000, "Post-Interval was '%s' and not '2000' as expected!" % fifth_segment_entity.info.post_interval.magnitude)
+        self.assertEqual(str(fifth_segment_entity.info.post_interval.units), 'microsecond', "Post-Interval unit was '%s' and not 'microsecond' as expected!" % str(fifth_segment_entity.info.post_interval.units))
+        self.assertEqual(fifth_segment_entity.info.type, 'Cutout', "Type was '%s' and not 'Cutout' as expected!" % fifth_segment_entity.info.type)
+        self.assertEqual(fifth_segment_entity.info.count, 1, "Count of segments was '%s' and not '1' as expected!" % fifth_segment_entity.info.count)
+        self.assertEquals(fifth_segment_entity.info.source_channel_of_segment.keys(), [0], 
+                          "Source channel dataset index was different (was '%s' instead of '['0']')!" % fifth_segment_entity.info.source_channel_of_segment.keys()) 
+        self.assertEquals(fifth_segment_entity.info.source_channel_of_segment[0].channel_id, 4, 
+                          "Source channel ID was different (was '%s' instead of '4')!" % fifth_segment_entity.info.source_channel_of_segment[0].channel_id) 
+
+    def test_segment_data(self):
+        first_segment_entity = self.data.recordings[0].segment_streams[0].segment_entity[0]
+        self.assertEqual(first_segment_entity.segment_sample_count, 26, "Segment sample count was expected to be  but was %s!" % first_segment_entity.segment_sample_count)
+        signal = first_segment_entity.get_segment_in_range(0)
+        self.assertEqual(signal[0].shape, (2, 26), "Matrix of segment signal points was expected to be '(2,26)' but was '%s'!" % str(signal[0].shape))
+        self.assertEqual(str(signal[1]), 'volt', "Unit of segment signal was expected to be 'volt' but was '%s'!" % str(signal[1]))
+        signal_flat = first_segment_entity.get_segment_in_range(0, flat = True)
+        self.assertEqual(len(signal_flat[0]), 52, "Vector ('flat = True') of segment signal points was expected to be '52' but was '%s'!" % len(signal_flat[0]))
+        self.assertRaises(exceptions.IndexError, first_segment_entity.get_segment_in_range, segment_id = 0, flat = False, idx_start = 16, idx_end = 4)
+        self.assertRaises(exceptions.IndexError, first_segment_entity.get_segment_in_range, segment_id = 0, flat = False, idx_start = 40, idx_end = 49)
+        self.assertRaises(exceptions.IndexError, first_segment_entity.get_segment_in_range, segment_id = 0, flat = False, idx_start = -1, idx_end = 10)
+
+    def test_segment_data_timestamps(self):
+        first_segment_entity = self.data.recordings[0].segment_streams[0].segment_entity[0]
+        signal_ts = first_segment_entity.get_segment_sample_timestamps(0)
+        self.assertEqual(signal_ts[0].shape, (2, 26), "Matrix of segment timestamps was expected to be '(2,26)' but was '%s'!" % str(signal_ts[0].shape))
+        self.assertEqual(str(signal_ts[1]), 'microsecond', "Unit of timestamps was expected to be 'microsecond' but was '%s'!" % str(signal_ts[1]))
+        ts_selected = (signal_ts[0][:,0]).tolist()
+        expected_ts_first_segment = [943000, 945000]
+        self.assertEquals(ts_selected, expected_ts_first_segment, "Timestamps for the first segment were '%s' and not as expected '%s" % (ts_selected, expected_ts_first_segment))
+        ts_selected = (signal_ts[0][:,2]).tolist()
+        expected_ts_third_segment = [963000, 965000]
+        self.assertEquals(ts_selected, expected_ts_third_segment, "Timestamps for the third segment were '%s' and not as expected '%s" % (ts_selected, expected_ts_third_segment))
+        signal_flat_ts = first_segment_entity.get_segment_sample_timestamps(0, flat = True)
+        self.assertEqual(len(signal_flat_ts[0]), 52, "Vector ('flat = True') of segment signal points was expected to be '52' but was '%s'!" % len(signal_flat_ts[0]))
+        self.assertRaises(exceptions.IndexError, first_segment_entity.get_segment_sample_timestamps, segment_id = 0, flat = False, idx_start = 16, idx_end = 4)
+        self.assertRaises(exceptions.IndexError, first_segment_entity.get_segment_sample_timestamps, segment_id = 0, flat = False, idx_start = 40, idx_end = 49)
+        self.assertRaises(exceptions.IndexError, first_segment_entity.get_segment_sample_timestamps, segment_id = 0, flat = False, idx_start = -1, idx_end = 10)
+
+    # Test average segment streams:
+    def test_average_segment_stream_counts(self):
+        self.assertEqual(len(self.average_segments.recordings[0].segment_streams), 1, 'There should be one segment streams inside the recording!')
+        self.assertEqual(self.average_segments.recordings[0].segment_streams[0].data_subtype, 'Average', "The data subtype of the first segment stream should be 'Average'!")
+        self.assertEqual(len(self.average_segments.recordings[0].segment_streams[0].segment_entity), 11, 'There should be 11 average segment entities inside the stream!')
+
+    def test_average_segment_data(self):
+        first_average_segment_entity = self.average_segments.recordings[0].segment_streams[0].segment_entity[18]
+        self.assertEqual(first_average_segment_entity.number_of_averages, 8, "Number of averages was expected to be '8' but was %s!" % first_average_segment_entity.number_of_averages)
+
+    # Test timestamp streams:
+    def test_count_timestamp_streams(self):
+        self.assertEqual(len(self.data.recordings[0].timestamp_streams), 1, 'There should be only one timestamp stream inside the recording!')
+        self.assertEqual(len(self.data.recordings[0].timestamp_streams[0].timestamp_entity), 8, 
+                         'There should be 8 event entities inside the stream (found %s)!' % len(self.data.recordings[0].timestamp_streams[0].timestamp_entity))
+
+    def test_timestamp_stream_attributes(self):
+        first_timestamp_stream = self.data.recordings[0].timestamp_streams[0]
+        self.assertEqual(first_timestamp_stream.info_version, 1, "Version of the Stream-Info was %s and not as expected 1!" % first_timestamp_stream.info_version)
+        self.assertEqual(first_timestamp_stream.data_subtype, 'NeuralSpike', 'Timestamp stream data sub type is different from expected \'NeuralSpike\'!')
+        self.assertEqual(first_timestamp_stream.label, 'Spike Detector (1) Spike Timestamps', 'Timestamp stream label is different!')
+        self.assertEqual(str(first_timestamp_stream.source_stream_guid), 'a9d1ab04-2cf8-489c-a861-595e662fba4e', 'Timestamp stream source GUID is different!')
+        self.assertEqual(str(first_timestamp_stream.stream_guid), 'b71fc432-be6a-4135-9d15-3c7c1a4b4ed6', 'TimeStamp stream GUID is different!')
+        self.assertEqual(first_timestamp_stream.stream_type, 'TimeStamp', 'Timestamp stream type is different!')
+
+    def test_timestamp_infos(self):
+        first_timestamp_entity = self.data.recordings[0].timestamp_streams[0].timestamp_entity[0]
+        self.assertEqual(first_timestamp_entity.info.version, 1, "TimeStampEntityInfo-Version was '%s' and not '1' as expected!" % first_timestamp_entity.info.version)
+        self.assertEqual(first_timestamp_entity.info.id, 0, "ID is not as expected!")
+        self.assertEqual(first_timestamp_entity.info.group_id, 0, "Group ID is not as expected!")
+        self.assertEqual(first_timestamp_entity.info.data_type, 'Long', "DataType is not as expected!")
+        self.assertEqual(first_timestamp_entity.info.unit, 's', "Unit is not as expected (was %s instead of \'s\')!" % first_timestamp_entity.info.unit)
+        self.assertEqual(first_timestamp_entity.info.exponent, -6, "Exponent is not as expected (was %s instead of \'-6\')!" % first_timestamp_entity.info.exponent)
+        self.assertEqual(first_timestamp_entity.info.measuring_unit, 1 * ureg.us , 
+                          "Exponent is not as expected (was %s instead of \'us\')!" % first_timestamp_entity.info.measuring_unit)
+        self.assertEquals(first_timestamp_entity.info.source_channel_ids, [0],"Source channel IDs are different!") 
+        self.assertEquals(first_timestamp_entity.info.source_channel_labels.values(), 
+                           ["E1"],"Source channels label is different (was '%s' instead of '['E1']')!" % 
+                           first_timestamp_entity.info.source_channel_labels.values())
+
+    def test_timestamp_data(self):
+        first_timestamp_entity = self.data.recordings[0].timestamp_streams[0].timestamp_entity[0]
+        self.assertEqual(first_timestamp_entity.count, 26, "Count was expected to be 26 but was %s!" % first_timestamp_entity.count)
+        timestamps = first_timestamp_entity.get_timestamps()
+        self.assertEqual(timestamps[1], 1 * ureg.us, "Timestamp time unit was expected to be 'us' but was '%s'!" % timestamps[1])
+        expected_ts = [944000, 954000, 964000, 3030000, 3040000, 3052000, 
+                       3096000, 5104000, 5116000, 5126000, 7204000, 7212000, 
+                       7226000, 9290000, 9298000, 11376000, 11386000, 11442000, 
+                       13462000, 13472000, 13528000, 15548000, 15558000, 17634000, 
+                       17644000, 17686000]
+        self.assertEquals(timestamps[0][0].tolist(), expected_ts, "Timestamps of the first TS-Entity were '%s' and not as expected '%s" % (timestamps[0], expected_ts))
+
+if __name__ == '__main__':
+    unittest.main()

BIN
In-vivo/Calibration and longitudinal assessment/Day1-2/Analysis scripts/McsPy/Test/__init__.py


+ 54 - 0
In-vivo/Calibration and longitudinal assessment/Day1-2/Analysis scripts/McsPy/__init__.py

@@ -0,0 +1,54 @@
+"""
+    McsPy
+    ~~~~~
+
+    McsPy is a Python module/package to read, handle and operate on HDF5-based raw data
+    files converted from recordings of devices of the Multi Channel Systems MCS GmbH.
+
+    :copyright: (c) 2015 by Multi Channel Systems MCS GmbH
+    :license: see LICENSE for more details
+"""
+
+#print("McsPy init!")
+version = 0.02
+
+# Supported MCS-HDF5 protocol types and versions:
+class McsHdf5Protocols:
+    """
+    Class of supported MCS-HDF5 protocol types and version ranges
+
+    Entry: (Protocol Type Name => Tuple of supported version range from (including) the first version entry up to (including) the second version entry)
+    """
+    SUPPORTED_PROTOCOLS = {"RawData" : (1, 3),  # from first to second version number and including this versions
+                           "InfoChannel" : (1, 1), # Info-Object Versions
+                           "FrameEntityInfo" : (1, 1),
+                           "EventEntityInfo" : (1, 1),
+                           "SegmentEntityInfo" : (1, 1),
+                           "TimeStampEntityInfo" : (1, 1),
+                           "AnalogStreamInfoVersion" : (1, 1), # StreamInfo-Object Versions
+                           "FrameStreamInfoVersion" : (1, 1),
+                           "EventStreamInfoVersion" : (1, 1),
+                           "SegmentStreamInfoVersion" : (1, 1),
+                           "TimeStampStreamInfoVersion" : (1, 1)}
+
+    @classmethod
+    def check_protocol_type_version(self, protocol_type_name, version):
+        """
+        Check if the given version of a protocol is supported by the implementation
+
+        :param protocol_type_name: name of the protocol that is tested
+        :param version: version number that should be checked
+        :returns: is true if the given protocol and version is supported
+        """
+        if McsHdf5Protocols.SUPPORTED_PROTOCOLS.has_key(protocol_type_name):
+            supported_versions = McsHdf5Protocols.SUPPORTED_PROTOCOLS[protocol_type_name]
+            if (version < supported_versions[0]) or (supported_versions[1] < version):
+                raise IOError('Given HDF5 file contains \'%s\' type of version %s and supported are only all versions from %s up to %s' % 
+                               (protocol_type_name, version, supported_versions[0], supported_versions[1]))
+        else:
+            raise IOError("The given HDF5 contains a type \'%s\' that is unknown in this implementation!" % protocol_type_name)
+        return True
+
+from pint import UnitRegistry
+ureg = UnitRegistry()
+Q_ = ureg.Quantity

BIN
In-vivo/Calibration and longitudinal assessment/Day1-2/Analysis scripts/McsPy/__init__.pyc


BIN
In-vivo/Calibration and longitudinal assessment/Day1-2/Analysis scripts/McsPy/__pycache__/__init__.cpython-37.pyc


+ 365 - 0
In-vivo/Calibration and longitudinal assessment/Day1-2/Analysis scripts/Overview_BodeInVivo_AllChannels_current_MAP.py

@@ -0,0 +1,365 @@
+# -*- coding: utf-8 -*-
+"""
+Created on Thu Sep 27 08:36:30 2018
+
+@author: aemdlabs
+"""
+
+from PhyREC.NeoInterface import NeoSegment#, ReadMCSFile
+import PhyREC.SignalAnalysis as Ran
+import PhyREC.PlotWaves as Rplt
+import quantities as pq
+import matplotlib.pyplot as plt
+import numpy as np
+import neo
+import PhyREC.SignalProcess as RPro
+import deepdish as dd
+import os
+
+
+MCSMapI={'SE1':'Ch03',
+         'SE2':'Ch05',
+         'SE3':'Ch01',
+         'SE4':'Ch02',
+         'SE5':'Ch22',
+         'SE6':'Ch06',
+         'SE7':'Ch16',
+         'SE8':'Ch37',
+         'SE9':'Ch20',
+         'SE10':'Ch10',
+         'SE11':'Ch24',
+         'SE12':'Ch08',
+         'SE13':'Ch14',
+         'SE14':'Ch04',
+         'SE15':'Ch18',
+         'SE16':'Ch33',
+         'SE17':'Ch34',
+         'SE18':'Ch60',
+         'SE19':'Ch38',
+         'SE20':'Ch64',
+         'SE21':'Ch40',
+         'SE22':'Ch56',
+         'SE23':'Ch42',
+         'SE24':'Ch70',
+         'SE25':'Ch66',
+         'SE26':'Ch65',
+         'SE27':'Ch68',
+         'SE28':'Ch67',
+         'SE29':'Ch55',
+         'SE30':'Ch62',
+         'SE31':'Ch58',
+         'SE32':'Ch69',
+         'ME1':'Ch57',
+         'ME2':'Ch61',
+         'ME3':'Ch53',
+         'ME4':'Ch63',
+         'ME5':'Ch52',
+         'ME6':'Ch41',
+         'ME7':'Ch49',
+         'ME8':'Ch51',
+         'ME9':'Ch46',
+         'ME10':'Ch45',
+         'ME11':'Ch44',
+         'ME12':'Ch39',
+         'ME13':'Ch54',
+         'ME14':'Ch43',
+         'ME15':'Ch50',
+         'ME16':'Ch47',
+         'ME17':'Ch32',
+         'ME18':'Ch27',
+         'ME19':'Ch30',
+         'ME20':'Ch29',
+         'ME21':'Ch28',
+         'ME22':'Ch25',
+         'ME23':'Ch26',
+         'ME24':'Ch07',
+         'ME25':'Ch21',
+         'ME26':'Ch11',
+         'ME27':'Ch17',
+         'ME28':'Ch15',
+         'ME29':'Ch13',
+         'ME30':'Ch31',
+         'ME31':'Ch19',
+         'ME32':'Ch09',
+#         'ME0':'Ch12',
+#         'SE33':'Ch59'
+         }
+
+MCSMap = {v: k for k, v in MCSMapI.iteritems()}       
+                 
+#Col, Row  
+MCSMapFacingDown={'Ch58':(0,1),
+                  'Ch57':(0,2),
+                  'Ch56':(0,3),
+                  'Ch55':(0,4),
+                  'Ch54':(0,5),
+                  'Ch53':(0,6),
+                  'Ch52':(0,7),
+                  'Ch51':(0,8),
+                  'Ch50':(0,9),
+                  'Ch49':(0,10),
+                  'Ch60':(1,0),
+                  'Ch61':(1,1),
+                  'Ch62':(1,2),
+                  'Ch63':(1,3),
+                  'Ch64':(1,4),
+                  'Ch65':(1,5),
+                  'Ch43':(1,6),
+                  'Ch44':(1,7),
+                  'Ch45':(1,8),
+                  'Ch46':(1,9),
+                  'Ch47':(1,10),
+                  'Ch70':(2,0),
+                  'Ch69':(2,1),
+                  'Ch68':(2,2),
+                  'Ch67':(2,3),
+                  'Ch66':(2,4),
+                  'Ch42':(2,5),
+                  'Ch41':(2,6),
+                  'Ch40':(2,7),
+                  'Ch39':(2,8),
+                  'Ch38':(2,9),
+                  'Ch37':(2,10),
+                  'Ch01':(3,0),
+                  'Ch02':(3,1),
+                  'Ch03':(3,2),
+                  'Ch04':(3,3),
+                  'Ch05':(3,4),
+                  'Ch06':(3,5),
+                  'Ch30':(3,6),
+                  'Ch31':(3,7),
+                  'Ch32':(3,8),
+                  'Ch33':(3,9),
+                  'Ch34':(3,10),
+                  'Ch11':(4,0),
+                  'Ch10':(4,1),
+                  'Ch09':(4,2),
+                  'Ch08':(4,3),
+                  'Ch07':(4,4),
+                  'Ch29':(4,5),
+                  'Ch28':(4,6),
+                  'Ch27':(4,7),
+                  'Ch26':(4,8),
+                  'Ch25':(4,9),
+                  'Ch24':(4,10),
+#                  'Ch12':(0,0),
+#                  'Ch59':(5,0),
+                  'Ch13':(5,1),
+                  'Ch14':(5,2),
+                  'Ch15':(5,3),
+                  'Ch16':(5,4),
+                  'Ch17':(5,5),
+                  'Ch18':(5,6),
+                  'Ch19':(5,7),
+                  'Ch20':(5,8),
+                  'Ch21':(5,9),
+                  'Ch22':(5,10)}
+
+
+def ReadMCSFile(McsFile, OutSeg=None, SigNamePrefix=''):
+    import McsPy.McsData as McsData
+    
+    Dat = McsData.RawData(McsFile)
+    Rec = Dat.recordings[0]
+    NSamps = Rec.duration
+
+    if OutSeg is None:
+        OutSeg = NeoSegment()
+
+    for AnaStrn, AnaStr in Rec.analog_streams.iteritems():
+
+        for Chn, Chinfo in AnaStr.channel_infos.iteritems():
+            print('Analog Stream ', Chinfo.label, Chinfo.sampling_frequency)
+            ChName = str(SigNamePrefix + Chinfo.label)
+            print(ChName)
+            
+            if Chinfo.info['Unit'] == 'NoUnit':
+                continue
+          
+            Fs = Chinfo.sampling_frequency
+            Var, Unit = AnaStr.get_channel_in_range(Chn, 0, NSamps)
+            sig = neo.AnalogSignal(pq.Quantity(Var, Chinfo.info['Unit']),
+                                   t_start=0*pq.s,
+                                   sampling_rate=Fs.magnitude*pq.Hz,
+                                   name=ChName)
+
+
+            OutSeg.AddSignal(sig)
+    return OutSeg
+
+def CalcVgeffAC(Sig, TACchar, Vgs, vgs):
+    i = list(np.around(Vgs,3)).index(vgs)
+    gm = TACchar[i]*pq.A/pq.V
+    return neo.AnalogSignal(Sig/(gm),
+                            units='V',
+                            t_start=Sig.t_start,
+                            sampling_rate=Sig.sampling_rate,
+                            name=str(Sig.name),
+                            file_origin=Sig.file_origin)
+
+def GetSwitchTimes(Sig, Thres=-1e-4, Plot=True, RelaxTime = None):
+    s = Sig.GetSignal(None)
+    ds = np.abs(np.diff(np.array(s), axis=0))
+
+    if Plot:
+        plt.figure()
+        plt.plot(s.times, s)
+        plt.plot(s.times[1:], ds)
+
+    ds = Sig.duplicate_with_new_array(signal=ds)
+    Times = Ran.threshold_detection(ds,
+                                    threshold=Thres,
+                                    RelaxTime=RelaxTime)
+    return Times
+
+def findPeak(PSD,ch, Fsig):
+    
+
+
+    psd = PSD[ch]['psd']
+    Fpsd = PSD[ch]['ff']
+  
+    indicesPeak = np.where( ((Fpsd >= Fsig-Fpsd[1]*3) & (Fpsd<=Fsig+Fpsd[1]*3)))   
+
+    IDSpeak = np.sqrt(psd[np.argmax(psd[indicesPeak])+indicesPeak[0][0]]+
+                             psd[np.argmax(psd[indicesPeak])+indicesPeak[0][0]+1]+
+                             psd[np.argmax(psd[indicesPeak])+indicesPeak[0][0]-1])
+    
+    FirHarm= IDSpeak 
+
+    return (FirHarm)
+
+def MeanStd(Data):
+    Arr = np.zeros([len(Data[Data.keys()[0]]),len(Data.keys())])
+    gmkeys = np.array(Gm.keys())
+    for iF,Freq in enumerate(sorted(gmkeys.astype(np.float))):
+        print(Freq)
+        Arr[:,iF] = Data[str(Freq)]
+    
+    return np.mean(Arr,0), np.std(Arr,0)
+
+if __name__ == '__main__':
+    
+    ColTrs = {}
+    for i in range(6):
+        ColTrs[i] = [None] * 11
+    for k, v in MCSMapFacingDown.iteritems():
+        ColTrs[v[0]][v[1]] = k
+
+
+    ivgainAC = (1188)*pq.V 
+    Fhigh = 450 #F high bandpass
+    Flow = 1 #F low bandpass
+    Flowpass = 3 #F lowpass
+     
+
+    Path = '../Raw Data/'
+
+    InFileM = '2019-08-01T15-46-48B12784O18-T2-1uA.h5'
+    InFileS = '2019-08-01T15-46-48B12784O18-T2-1uA_2.h5'
+    
+    SigProAC = [
+                {'function': RPro.Gain, 'args': {'Gain': pq.A/ivgainAC}},
+                ]
+    
+    SigProDC = SigProAC
+          
+    DCchs = ('ME5', 'ME7', 'ME29', 'ME31', 'SE5', 'SE7', 'SE29', 'SE31')
+    ACchs = MCSMapFacingDown.keys()  
+
+    Rec = ReadMCSFile(Path+InFileM,
+                      OutSeg=None,
+                      SigNamePrefix='M')
+#    
+    Rec = ReadMCSFile(Path+InFileS,
+                      OutSeg=Rec,
+                      SigNamePrefix='S')
+    
+    
+    plt.close('all')
+    
+
+                                                    
+#%%  Plot AC ############################################################3 
+    plt.close('all')  
+    FigSize = (25*0.394, 15*0.394)  
+    Twind = (4*pq.s, 1000*pq.s)
+
+    TrigChannel = 'M2'
+    TrigThres = 1
+    timeSum = 10
+    
+
+    SwTimes = GetSwitchTimes(Sig=Rec.GetSignal(TrigChannel),
+                                    Thres=TrigThres,
+                                    Plot=True,
+                                    RelaxTime = 0.1*pq.s)
+ 
+    Periods = np.array([1,0.460,0.215,0.1,0.046,0.021,0.01,0.0046,0.00216,0.001,0.00046,0.00022,0.0001])
+    Nperiods = np.array([100,200,400,800,1300,1690,2197,2856,3712,4826,6274,8157,10604])
+    Fsigs = 1.0/Periods
+    nFFT = [2**17,2**17,2**17,2**17,2**14,2**14,2**14,2**14,2**16,2**14,2**14,2**14,2**14,2**16,2**14,2**14,2**14,2**14]
+            
+    iT = 4 #    index of Periods list used to create map (starting from 1)
+    
+    GmChDict = {}
+    for indexcol in range(6):
+        plt.close('all')
+        for Coli, Trts in ColTrs.iteritems():
+            if Coli != indexcol:
+                continue
+            Slots = []  
+            for trt in Trts:
+                if trt is None:
+                    continue
+
+                sig = Rec.GetSignal(MCSMap[trt],)
+
+
+                if MCSMap[trt] in DCchs:
+                    sig.ProcessChain = SigProDC
+                    Color = 'r'
+                else:
+                    sig.ProcessChain = SigProAC
+                    Color = 'k'
+    
+                Slots.append(Rplt.WaveSlot(sig,
+                                           Color=Color))
+        
+# =============================================================================
+# plot Mod(Bode)
+# =============================================================================
+            Gm = {}
+    
+            for it, t in enumerate(SwTimes):
+                
+                if it==0:
+                    for s in Slots:
+                        Gm[s.name] = np.zeros(len(Fsigs)-2)
+                    continue
+                if it ==len(SwTimes)-1:
+                    continue
+                TWind = [SwTimes[it-1]+(SwTimes[it]-SwTimes[it-1])/10,SwTimes[it]-(SwTimes[it]-SwTimes[it-1])/10]*pq.s
+                print(TWind)
+                nFFT = [2**17,2**17,2**17,2**17,2**14,2**14,2**14,2**14,2**16,2**14,2**14,2**14,2**14,2**16,2**14,2**14,2**14,2**14]
+                PSD = Ran.PlotPSD([s.Signal for iS, s in enumerate(Slots)],
+                            Time = TWind,
+                            Color = 'k',
+                            scaling = 'spectrum',
+                            nFFT = nFFT[it])
+                for ch in PSD.keys():
+                    Gm[ch][it-1] = findPeak(PSD,ch,Fsigs[it-1]*pq.Hz)
+   
+
+            plt.xlabel('frequency(Hz)')
+            plt.ylabel('Bode (arb.u.)')
+            plt.legend()
+            if not os.path.isdir('../Analyzed data/{}'.format(InFileM[:19])):
+                if not os.path.isdir('../Analyzed data'):
+                    os.mkdir('../Analyzed data/')
+                os.mkdir('../Analyzed data/{}'.format(InFileM[:19]))
+            
+            dd.io.save('../Analyzed data/{}/PSDcol{}'.format(InFileM[:19],indexcol), PSD, ('zlib', 1))
+
+        GmChDict.update(Gm)
+    dd.io.save('../Analyzed data/{}/GmChDict'.format(InFileM[:19]), (Fsigs, GmChDict))

+ 158 - 0
In-vivo/Calibration and longitudinal assessment/Day1-2/Analysis scripts/PhaseAmplitude_Rec2.py

@@ -0,0 +1,158 @@
+# -*- coding: utf-8 -*-
+"""
+Created on Fri Jul  5 09:21:49 2019
+
+@author: rgarcia1
+"""
+
+from PhyREC.NeoInterface import NeoSegment, NeoSignal#, ReadMCSFile
+import PhyREC.SignalAnalysis as Ran
+import PhyREC.PlotWaves as Rplt
+import PhyREC.SignalAnalysis as Ran
+import quantities as pq
+import matplotlib.pyplot as plt
+import numpy as np
+import neo
+import PhyREC.SignalProcess as RPro
+import deepdish as dd
+import csv
+from datetime import datetime
+import os
+from scipy import integrate
+import deepdish as dd
+from matplotlib.pyplot import cohere
+from scipy.signal import hilbert
+from matplotlib.colors import LogNorm
+import matplotlib.colors as mcolors
+from matplotlib.pyplot import cohere
+
+import PyGFET.AnalyzeData as FETana
+import PyGFET.PlotDataClass as FETplt
+
+def ReadMCSFile(McsFile, Include, OutSeg=None, SigNamePrefix=''):
+    import McsPy.McsData as McsData
+
+    Dat = McsData.RawData(McsFile)
+    Rec = Dat.recordings[0]
+    NSamps = Rec.duration
+
+    if OutSeg is None:
+        OutSeg = NeoSegment()
+
+    for AnaStrn, AnaStr in Rec.analog_streams.iteritems():
+        if len(AnaStr.channel_infos) == 1:
+            continue
+
+        for Chn, Chinfo in AnaStr.channel_infos.iteritems():
+            print 'Analog Stream ', Chinfo.label, Chinfo.sampling_frequency
+            ChName = str(SigNamePrefix + Chinfo.label)
+            print ChName
+            if ChName not in Include:
+                continue
+            
+            Fs = Chinfo.sampling_frequency
+            Var, Unit = AnaStr.get_channel_in_range(Chn, 0, NSamps)
+            sig = neo.AnalogSignal(pq.Quantity(Var, Chinfo.info['Unit']),
+                                   t_start=0*pq.s,
+                                   sampling_rate=Fs.magnitude*pq.Hz,
+                                   name=ChName)
+
+            OutSeg.AddSignal(sig)
+    return OutSeg
+
+def MeanStd(Data):
+    Arr = np.zeros([len(Data.keys()),len(Data[Data.keys()[0]]['psd'])])
+    for iT,TrtName in enumerate(Data.keys()):
+        Arr[iT,:] = Data[TrtName]['psd'][:,0]
+    
+    return np.mean(Arr,0), np.std(Arr,0)
+
+
+Path = '../Raw Data/'
+InFileM = Path + '2019-07-31T18-00-05B12784O18-T2-Longterm-Rec2.h5' ############
+InFileS = Path + '2019-07-31T18-00-05B12784O18-T2-Longterm-Rec2_2.h5' ##########
+
+Gm = dd.io.load('../CalibrationFile/Cal-Gm20190731_033840.h5')
+
+BW = 100
+ivgainDC = 118.8*pq.V
+ivgainAC = 1188*pq.V
+TWind = (12850*pq.s,15450*pq.s)
+
+
+DCch = ('SE7','ME31',)
+
+Include = DCch
+color = ['r','orange','g','b']
+
+
+Rec = ReadMCSFile(InFileM,
+                  Include,
+                  OutSeg=None,
+                  SigNamePrefix='M')
+
+Rec = ReadMCSFile(InFileS,
+                  Include,
+                  OutSeg=Rec,
+                  SigNamePrefix='S')
+
+#%% Plot Sig
+plt.close('all')
+
+TWind = (None,20800*pq.s)
+
+Slots= []
+SlotsComp = []
+counter = -1
+for sig in Rec.Signals():
+    SigProDC = [{'function': RPro.Gain, 'args': {'Gain': pq.A/(Gm['GM'][sig.name][8]*(pq.A/pq.V)*ivgainDC)}},
+            {'function': RPro.SetZero, 'args' : {'TWind' :TWind}},
+#            {'function': RPro.DownSampling, 'args' : {'Fact' :10}},
+            {'function': RPro.Filter, 'args': {'Type':'bandpass',
+                                               'Order':2,
+                                               'Freqs':(0.005,0.05)}},
+            ]
+
+    SigProRMS = [{'function':RPro.sliding_window, 'args': {'func':RPro.rms,'timewidth': 300*pq.s}}]
+    
+    if sig.name not in DCch:
+        continue
+    counter +=1
+    sig.ProcessChain = SigProDC
+    sig = sig.GetSignal(TWind)
+    sigRMS = sig.GetSignal(TWind)
+    sigRMS.ProcessChain = SigProRMS
+    sigRMS = sigRMS.GetSignal(TWind)
+    
+    if counter==0:
+        sig0 = sig.GetSignal(TWind)
+    else:
+        sig1 = sig.GetSignal(TWind)
+        
+    Slots.append(Rplt.WaveSlot(sig,
+                                 Position=0,
+                                 Alpha=0.5))
+    SlotsComp.append(Rplt.WaveSlot(sig,
+                                 Position=0,
+                                 Alpha=0.5))
+Splots = Rplt.PlotSlots(Slots)
+Splots.PlotChannels(Time=TWind,
+                    Units='V')    
+
+
+HT0 = hilbert(np.array(sig0).T[0,:])
+
+HT1= hilbert(np.array(sig1).T[0,:])
+
+
+fig, ax = plt.subplots()
+
+phaseShift = np.angle(HT1,deg=True)-np.angle(HT0,deg=True)
+for iSamp, samp in enumerate(phaseShift):
+    if samp <= -180:
+        phaseShift[iSamp] = samp+360 
+    if samp >=180:
+        phaseShift[iSamp] = samp-360 
+
+h = plt.hist2d(phaseShift, np.log10(np.abs(HT0)), bins=50, normed = True, range= [[np.min(phaseShift), np.max(phaseShift)], [-6, -2.5]],vmin=0, vmax=0.006,cmap='jet')#norm = LogNorm())#
+plt.colorbar(h[3])

+ 181 - 0
In-vivo/Calibration and longitudinal assessment/Day1-2/Analysis scripts/PlotBode.py

@@ -0,0 +1,181 @@
+# -*- coding: utf-8 -*-
+"""
+Created on Sun Apr 28 15:50:58 2019
+
+@author: aemdlabs
+"""
+import deepdish as dd
+import matplotlib.pyplot as plt
+import numpy as np
+
+plt.close('all')
+
+MCSMapI={'SE1':'Ch03',
+         'SE2':'Ch05',
+         'SE3':'Ch01',
+         'SE4':'Ch02',
+         'SE5':'Ch22',
+         'SE6':'Ch06',
+         'SE7':'Ch16',
+         'SE8':'Ch37',
+         'SE9':'Ch20',
+         'SE10':'Ch10',
+         'SE11':'Ch24',
+         'SE12':'Ch08',
+         'SE13':'Ch14',
+         'SE14':'Ch04',
+         'SE15':'Ch18',
+         'SE16':'Ch33',
+         'SE17':'Ch34',
+         'SE18':'Ch60',
+         'SE19':'Ch38',
+         'SE20':'Ch64',
+         'SE21':'Ch40',
+         'SE22':'Ch56',
+         'SE23':'Ch42',
+         'SE24':'Ch70',
+         'SE25':'Ch66',
+         'SE26':'Ch65',
+         'SE27':'Ch68',
+         'SE28':'Ch67',
+         'SE29':'Ch55',
+         'SE30':'Ch62',
+         'SE31':'Ch58',
+         'SE32':'Ch69',
+         'ME1':'Ch57',
+         'ME2':'Ch61',
+         'ME3':'Ch53',
+         'ME4':'Ch63',
+         'ME5':'Ch52',
+         'ME6':'Ch41',
+         'ME7':'Ch49',
+         'ME8':'Ch51',
+         'ME9':'Ch46',
+         'ME10':'Ch45',
+         'ME11':'Ch44',
+         'ME12':'Ch39',
+         'ME13':'Ch54',
+         'ME14':'Ch43',
+         'ME15':'Ch50',
+         'ME16':'Ch47',
+         'ME17':'Ch32',
+         'ME18':'Ch27',
+         'ME19':'Ch30',
+         'ME20':'Ch29',
+         'ME21':'Ch28',
+         'ME22':'Ch25',
+         'ME23':'Ch26',
+         'ME24':'Ch07',
+         'ME25':'Ch21',
+         'ME26':'Ch11',
+         'ME27':'Ch17',
+         'ME28':'Ch15',
+         'ME29':'Ch13',
+         'ME30':'Ch31',
+         'ME31':'Ch19',
+         'ME32':'Ch09'}
+
+                          #Col, Row  
+MCSMapFacingDown={'Ch58':(0,1),
+                  'Ch57':(0,2),
+                  'Ch56':(0,3),
+                  'Ch55':(0,4),
+                  'Ch54':(0,5),
+                  'Ch53':(0,6),
+                  'Ch52':(0,7),
+                  'Ch51':(0,8),
+                  'Ch50':(0,9),
+                  'Ch49':(0,10),
+                  'Ch60':(1,0),
+                  'Ch61':(1,1),
+                  'Ch62':(1,2),
+                  'Ch63':(1,3),
+                  'Ch64':(1,4),
+                  'Ch65':(1,5),
+                  'Ch43':(1,6),
+                  'Ch44':(1,7),
+                  'Ch45':(1,8),
+                  'Ch46':(1,9),
+                  'Ch47':(1,10),
+                  'Ch70':(2,0),
+                  'Ch69':(2,1),
+                  'Ch68':(2,2),
+                  'Ch67':(2,3),
+                  'Ch66':(2,4),
+                  'Ch42':(2,5),
+                  'Ch41':(2,6),
+                  'Ch40':(2,7),
+                  'Ch39':(2,8),
+                  'Ch38':(2,9),
+                  'Ch37':(2,10),
+                  'Ch01':(3,0),
+                  'Ch02':(3,1),
+                  'Ch03':(3,2),
+                  'Ch04':(3,3),
+                  'Ch05':(3,4),
+                  'Ch06':(3,5),
+                  'Ch30':(3,6),
+                  'Ch31':(3,7),
+                  'Ch32':(3,8),
+                  'Ch33':(3,9),
+                  'Ch34':(3,10),
+                  'Ch11':(4,0),
+                  'Ch10':(4,1),
+                  'Ch09':(4,2),
+                  'Ch08':(4,3),
+                  'Ch07':(4,4),
+                  'Ch29':(4,5),
+                  'Ch28':(4,6),
+                  'Ch27':(4,7),
+                  'Ch26':(4,8),
+                  'Ch25':(4,9),
+                  'Ch24':(4,10),
+                  'Ch12':None,
+                  'Ch59':None,
+                  'Ch13':(5,1),
+                  'Ch14':(5,2),
+                  'Ch15':(5,3),
+                  'Ch16':(5,4),
+                  'Ch17':(5,5),
+                  'Ch18':(5,6),
+                  'Ch19':(5,7),
+                  'Ch20':(5,8),
+                  'Ch21':(5,9),
+                  'Ch22':(5,10)}
+
+
+Directory = '../Analyzed data/2019-08-01T15-46-48/'
+
+Fsigs,GmDict = dd.io.load(Directory+'GmChDict')
+
+
+for key in GmDict.keys():
+    plt.figure(1)
+    plt.loglog(Fsigs[:-2], GmDict[key])
+
+plt.xlabel('Frequency (Hz)')
+plt.ylabel('|Gm Vsig| (A)')
+
+plt.figure()
+A=np.log10(np.ones((11,6))*5e-14)
+    
+    
+for Trt in GmDict.keys():
+    if Trt in ['M1','M2','S1','S2']:
+        continue
+    ch = MCSMapI[Trt]
+#    if Trt in DCch:
+#        continue
+    
+    A[MCSMapFacingDown[ch][1],MCSMapFacingDown[ch][0]] =np.log10(abs(GmDict[Trt][0]))
+
+plt.imshow(A, interpolation='nearest', vmin=-8.5, vmax=-7.5)
+plt.grid(True)
+cbar=plt.colorbar()
+plt.xlabel('column',fontsize=12)
+plt.ylabel('row',fontsize=12)
+cbar.set_label('I$_{ds-rms}$ (@1Hz)', rotation=270, labelpad=15,fontsize=13)
+plt.title('Response to bipolar current stimulation')
+
+    
+

BIN
In-vivo/Calibration and longitudinal assessment/Day1-2/Analyzed data/2019-08-01T15-46-48/GmChDict


BIN
In-vivo/Calibration and longitudinal assessment/Day1-2/Analyzed data/2019-08-01T15-46-48/PSDcol0


BIN
In-vivo/Calibration and longitudinal assessment/Day1-2/Analyzed data/2019-08-01T15-46-48/PSDcol1


BIN
In-vivo/Calibration and longitudinal assessment/Day1-2/Analyzed data/2019-08-01T15-46-48/PSDcol2


BIN
In-vivo/Calibration and longitudinal assessment/Day1-2/Analyzed data/2019-08-01T15-46-48/PSDcol3


BIN
In-vivo/Calibration and longitudinal assessment/Day1-2/Analyzed data/2019-08-01T15-46-48/PSDcol4


BIN
In-vivo/Calibration and longitudinal assessment/Day1-2/Analyzed data/2019-08-01T15-46-48/PSDcol5


+ 345 - 0
In-vivo/Calibration and longitudinal assessment/Day1-2/Calibration scripts/CalcUd0.py

@@ -0,0 +1,345 @@
+# -*- coding: utf-8 -*-
+"""
+Created on Sat Oct 13 18:50:52 2018
+
+@author: aemdlabs
+"""
+
+from PhyREC.NeoInterface import NeoSegment, NeoSignal#, ReadMCSFile
+import PhyREC.SignalAnalysis as Ran
+import PhyREC.PlotWaves as Rplt
+import quantities as pq
+import matplotlib.pyplot as plt
+import numpy as np
+import neo
+import deepdish as dd
+import csv
+from datetime import datetime
+import PyGFET.DataClass as Gfetdat
+
+
+def ReadMCSFile(McsFile, OutSeg=None, SigNamePrefix=''):
+    import McsPy.McsData as McsData
+
+    Dat = McsData.RawData(McsFile)
+    Rec = Dat.recordings[0]
+    NSamps = Rec.duration
+
+    if OutSeg is None:
+        OutSeg = NeoSegment()
+
+    for AnaStrn, AnaStr in Rec.analog_streams.iteritems():
+        if len(AnaStr.channel_infos) == 1:
+            continue
+
+        for Chn, Chinfo in AnaStr.channel_infos.iteritems():
+            print('Analog Stream ', Chinfo.label, Chinfo.sampling_frequency)
+            ChName = str(SigNamePrefix + Chinfo.label)
+            print(ChName)
+
+            Fs = Chinfo.sampling_frequency
+            Var, Unit = AnaStr.get_channel_in_range(Chn, 0, NSamps)
+            sig = neo.AnalogSignal(pq.Quantity(Var, Chinfo.info['Unit']),
+                                   t_start=0*pq.s,
+                                   sampling_rate=Fs.magnitude*pq.Hz,
+                                   name=ChName)
+
+            OutSeg.AddSignal(sig)
+    return OutSeg
+
+def ReadLogFile(File):
+    Fin = open(File)
+    
+    reader = csv.reader(Fin, delimiter='\t')
+    
+    LogVals = {}
+    ValsPos = {}
+    for il, e in enumerate(reader):
+        if il == 0:
+            for ih, v in enumerate(e):
+                ValsPos[ih] = v
+                LogVals[v] = []
+        else:
+            for ih, v in enumerate(e):
+                par = ValsPos[ih]
+                if (par=='Vgs') or (par=='Vds') or (par=='Vref'):
+                    LogVals[par].append(float(v.replace(',','.')))
+                elif par == 'Date/Time':
+                    LogVals[par].append(datetime.strptime(v, '%d.%m.%Y %H:%M:%S'))
+                else:
+                    LogVals[par].append(v)
+    
+    deltas = np.array(LogVals['Date/Time'])[:]-LogVals['Date/Time'][0]
+    LogVals['Time'] = []
+    for d in deltas:
+        LogVals['Time'].append(d.total_seconds())
+        
+    Fin.close()
+    
+    return LogVals
+
+def GetSwitchTimes(Sig, Thres=-1e-4, Plot=True):
+    s = Sig.GetSignal(None)
+    ds = np.abs(np.diff(np.array(s), axis=0))
+
+    if Plot:
+        plt.figure()
+        plt.plot(s.times, s)
+        plt.plot(s.times[1:], ds)
+
+    ds = Sig.duplicate_with_new_array(signal=ds)
+    Times = Ran.threshold_detection(ds,
+                                    threshold=Thres,
+                                    RelaxTime=5*pq.s)
+    return Times
+
+def CalcVgeffAC(Sig, TACchar, Vgs, vgs):
+    i = list(np.around(Vgs,3)).index(vgs)
+    gm = TACchar[i]*pq.A/pq.V
+    return neo.AnalogSignal(Sig/gm,
+                            units='V',
+                            t_start=Sig.t_start,
+                            sampling_rate=Sig.sampling_rate,
+                            name=str(Sig.name),
+                            file_origin=Sig.file_origin)
+    
+    
+if __name__ == '__main__':
+    #### Test autosweep
+
+
+    Path = '../../Day0/IV charact/'
+    PBSInFileM = Path + '2019-07-30T15-39-02B12784O18-T3-ACDC-PreImplant-NoMemb.h5' ############
+    PBSInFileS = Path + '2019-07-30T15-39-02B12784O18-T3-ACDC-PreImplant-NoMemb_2.h5' ##########
+    PBSLogFile = Path + 'B12784O18-T3-ACDC-PBS-PreImplant-20s-NoMemb.txt'
+    StartCycle = 0
+
+    Directory = '../IV charact/'
+    File = '20190731_033840 Current vs Vgs_5sStep.txt'
+    Fin = open(Directory+File)
+     
+
+    LogVals = ReadLogFile(PBSLogFile)
+    delta = np.mean([t-LogVals['Time'][it] for it, t in enumerate(LogVals['Time'][1:])])*pq.s
+    Delay = delta * StartCycle
+
+    DCch = ('ME5', 'ME7', 'ME29', 'ME31', 'SE5', 'SE7', 'SE29', 'SE31')
+
+    
+    TrigChannel = 'ME29'
+    TrigThres = 1e-5
+    Vgs = np.array(LogVals['Vgs']) 
+    VgsInt = np.linspace(Vgs[0],Vgs[-1],len(Vgs)*10)
+    Vds = [LogVals['Vds'][0]]
+    
+    
+    ivgain1 = 12e3*pq.V  
+    ivgain2 = 101
+    ACgain = 10*1/pq.V
+    DCgain = 1*pq.V
+    Fsig = 10
+    StabTime = 2*pq.s
+    GuardTime = 1*pq.s
+    BW = 100
+    ivgainDC = 118.8*pq.V 
+    ivgainAC = 1188*pq.V 
+
+
+    Rec = ReadMCSFile(PBSInFileM,
+                      OutSeg=None,
+                      SigNamePrefix='M')
+
+    Rec = ReadMCSFile(PBSInFileS,
+                      OutSeg=Rec,
+                      SigNamePrefix='S')
+
+
+# %% In vivo Ids
+    plt.close('all')  
+    ChKo = {}
+    reader = csv.reader(Fin, delimiter='\t')
+    lenVgs = 1000
+    Vgs = np.zeros(lenVgs)
+    Ids = np.zeros([lenVgs,8])
+    
+    reader = csv.reader(Fin, delimiter='\t')
+    for il, e in enumerate(reader):
+        if il == 0:
+            continue
+        print(e)
+        
+        vg = e[0]
+        vg = vg.replace(',','.')
+        Vgs[il-1] = float(vg)
+        for iids, ids in enumerate(e[1:]):
+            ids = ids.replace(',','.')
+            Ids[il-1,iids] = float(ids)
+    
+        
+    color = ['m','r','orange','y','g','c','b','violet']
+    plt.figure()
+    Ud0 = []
+    for i in range(8):
+        Vgs = np.append(Vgs[0:2],np.trim_zeros(Vgs[2:]))
+        ids = np.trim_zeros(Ids[:,i]) 
+        plt.plot(Vgs,ids,color = color[i])
+        if np.any(ids>=5.0):
+            
+            index = np.where(ids == np.amin(ids))
+            print(ids, np.amin(ids), index)
+            Ud0.append(Vgs[index[0][0]])
+    Ud0meanInVivo = np.mean(np.array(Ud0))
+#%%
+    
+    SwTimes = GetSwitchTimes(Sig=Rec.GetSignal(TrigChannel),
+                             Thres=TrigThres,
+                             Plot=True)
+    SlotsDC = []
+    SlotsAC = []
+
+    for sig in Rec.Signals():
+        sig.__class__ = NeoSignal
+
+        if sig.name  in DCch:
+            if sig.name.startswith('M'):
+                col = 'r'
+            else:
+                col = 'g'
+            SlotsDC.append(Rplt.WaveSlot(sig,
+                                         Position=0,
+                                         Color=col,
+                                         Alpha=0.5))
+        if sig.name.startswith('M'):
+            col = 'k'
+        else:
+            col = 'b'
+        SlotsAC.append(Rplt.WaveSlot(sig,
+                                   Position=1,
+                                   Color=col,
+                                   Alpha=0.5))
+            
+    Splots = Rplt.PlotSlots(SlotsDC)
+    Splots.PlotChannels(Time=None,
+                        Units='mV')
+    Splots.PlotEvents(SwTimes,
+                      color='k')
+    Splots.PlotEvents(LogVals['Time']*pq.s+SwTimes[0]+Delay,
+                      color='r')
+    
+    SwTimes = LogVals['Time']*pq.s+SwTimes[0]+Delay
+    figId, Axiv = plt.subplots()
+    fig, Axt = plt.subplots()
+    Ids = {}
+    for sl in SlotsDC:
+        Ids[sl.name] = []
+        for isw, (t, vg) in enumerate(zip(SwTimes, Vgs)):
+            if isw == len(SwTimes)-1:
+                ts = sl.Signal.t_stop
+            else:
+                ts = SwTimes[isw+1]
+            
+            TWind = (t+StabTime, ts-GuardTime)
+            s = sl.GetSignal(TWind, Units='V')
+            Axt.plot(s)
+            vio = np.mean(s).magnitude
+            ids = (vio*101-(-vg+Vds))/12e3
+            if ids <= 7e-6:
+                ChKo[sl.name] = True
+            else:
+                ChKo[sl.name] = False
+                
+            Ids[sl.name].append(ids)
+        if ChKo[sl.name] == False:
+            Axiv.plot(Vgs,Ids[sl.name], label=sl.name)
+   
+    DevACvals = {}
+    Ud0mean = 0
+    dev = Ids
+    Ud0 = np.zeros(len(dev))
+    for ich, (ch, ids) in enumerate(dev.iteritems()):
+        
+        if ChKo[ch] == False:
+            print(ich)
+            DevACvals[ch] = { 'Ids': np.array(ids[:-1]),
+                              'Vgs': Vgs[:-1],
+                              'Vds': Vds}
+            DataDC = Gfetdat.DataCharDC(DevACvals[ch])
+            Ud0[ich] = DataDC.GetUd0()
+            print(Ud0[ich])
+            Ud0mean=Ud0mean+Ud0[ich]
+            Axiv.plot(VgsInt, DataDC.GetIds(VgsInt),'--')
+        Ud0meanPBS = Ud0mean/(ich+1)
+
+
+
+
+#%%  Calc GM
+    GM = {}
+    CalFile = {}
+    figgm, axgm = plt.subplots()
+    for sig in Rec.Signals():
+        
+        GM[sig.name] = []
+        fig, (AxPsd, Axt) = plt.subplots(2,1)        
+        for isw, (t, vg) in enumerate(zip(SwTimes, Vgs)):
+            if isw == len(SwTimes)-1:
+                ts = sl.Signal.t_stop
+            else:
+                ts = SwTimes[isw+1]
+            TWind = (t+StabTime, ts-GuardTime)
+            s = sig.GetSignal(TWind, Units ='V')
+            
+            
+            if s.name in DCch:
+                s = (s*ivgain2-(-vg+Vds)*pq.V)/ivgain1
+            else:
+                s = s/(ivgain1*ACgain/ivgain2)
+    
+        
+            Axt.plot(s.times, s, label=vg, alpha=0.5)     
+
+            PSD = Ran.PlotPSD((s,),
+                              Time = TWind,
+                              Ax=AxPsd,
+                              FMin=1,
+                              Label=str(vg),
+                              scaling='spectrum')
+            
+            psd = PSD[sig.name]['psd']
+            Fpsd = PSD[sig.name]['ff']
+           
+            indicesPeak = np.where( ((Fpsd >= Fsig-4) & (Fpsd<=Fsig+4)))   
+
+            IDSpeak = np.sqrt(psd[np.argmax(psd[indicesPeak])+indicesPeak[0][0]]+
+                             psd[np.argmax(psd[indicesPeak])+indicesPeak[0][0]+1]+
+                             psd[np.argmax(psd[indicesPeak])+indicesPeak[0][0]-1])
+            
+            gm = IDSpeak*1000/0.707
+
+            GM[sig.name]=np.append(GM[sig.name],gm)
+         
+        if np.any(GM[sig.name]>= 2e-5) :
+            ChKo[sig.name] = False
+            color = 'k'
+        else:
+            ChKo[sig.name] = True      
+            color = 'r'
+        if sig.name in DCch:
+            color = 'g'
+        axgm.plot(Vgs, GM[sig.name], label=sig.name, color = color)   
+
+        plt.close(fig)
+        
+    axgm.legend()
+CalFile = {'GM': GM,
+           'Ud0PBS':Ud0meanPBS,
+           'Ud0InVivo':Ud0meanInVivo,
+           'DeltaUd0':Ud0meanPBS-Ud0meanInVivo,
+           'Vgs': Vgs-(Ud0meanPBS-Ud0meanInVivo)}
+CalFile['ChKo'] = ChKo
+
+
+
+dd.io.save('../Cal Data/'+'Cal-Gm'+File[:15]+'.h5', CalFile)
+
+

+ 335 - 0
In-vivo/Calibration and longitudinal assessment/Day1-2/Calibration scripts/CalibrationRec2_ExportDatFile.py

@@ -0,0 +1,335 @@
+# -*- coding: utf-8 -*-
+"""
+Created on Sat Oct 13 23:47:41 2018
+
+@author: aemdlabs
+"""
+
+# -*- coding: utf-8 -*-
+"""
+Created on Thu Sep 27 08:36:30 2018
+
+@author: aemdlabs
+"""
+
+from PhyREC.NeoInterface import NeoSegment#, ReadMCSFile
+import PhyREC.PlotWaves as Rplt
+import quantities as pq
+import matplotlib.pyplot as plt
+import numpy as np
+import neo
+import PhyREC.SignalProcess as RPro
+import deepdish as dd
+
+def ReadMCSFile(McsFile, OutSeg=None, SigNamePrefix=''):
+    import McsPy.McsData as McsData
+
+    Dat = McsData.RawData(McsFile)
+    Rec = Dat.recordings[0]
+    NSamps = Rec.duration
+
+    if OutSeg is None:
+        OutSeg = NeoSegment()
+
+    for AnaStrn, AnaStr in Rec.analog_streams.iteritems():
+        if len(AnaStr.channel_infos) == 1:
+            continue
+
+        for Chn, Chinfo in AnaStr.channel_infos.iteritems():
+            print ('Analog Stream ', Chinfo.label, Chinfo.sampling_frequency)
+            ChName = str(SigNamePrefix + Chinfo.label)
+            print(ChName)
+
+            Fs = Chinfo.sampling_frequency
+            Var, Unit = AnaStr.get_channel_in_range(Chn, 0, NSamps)
+            sig = neo.AnalogSignal(pq.Quantity(Var, Chinfo.info['Unit']),
+                                   t_start=0*pq.s,
+                                   sampling_rate=Fs.magnitude*pq.Hz,
+                                   name=ChName)
+
+            OutSeg.AddSignal(sig)
+    return OutSeg
+
+    
+
+
+
+MCSMapI={'SE1':'Ch03',
+         'SE2':'Ch05',
+         'SE3':'Ch01',
+         'SE4':'Ch02',
+         'SE5':'Ch22',
+         'SE6':'Ch06',
+         'SE7':'Ch16',
+         'SE8':'Ch37',
+         'SE9':'Ch20',
+         'SE10':'Ch10',
+         'SE11':'Ch24',
+         'SE12':'Ch08',
+         'SE13':'Ch14',
+         'SE14':'Ch04',
+         'SE15':'Ch18',
+         'SE16':'Ch33',
+         'SE17':'Ch34',
+         'SE18':'Ch60',
+         'SE19':'Ch38',
+         'SE20':'Ch64',
+         'SE21':'Ch40',
+         'SE22':'Ch56',
+         'SE23':'Ch42',
+         'SE24':'Ch70',
+         'SE25':'Ch66',
+         'SE26':'Ch65',
+         'SE27':'Ch68',
+         'SE28':'Ch67',
+         'SE29':'Ch55',
+         'SE30':'Ch62',
+         'SE31':'Ch58',
+         'SE32':'Ch69',
+         'ME1':'Ch57',
+         'ME2':'Ch61',
+         'ME3':'Ch53',
+         'ME4':'Ch63',
+         'ME5':'Ch52',
+         'ME6':'Ch41',
+         'ME7':'Ch49',
+         'ME8':'Ch51',
+         'ME9':'Ch46',
+         'ME10':'Ch45',
+         'ME11':'Ch44',
+         'ME12':'Ch39',
+         'ME13':'Ch54',
+         'ME14':'Ch43',
+         'ME15':'Ch50',
+         'ME16':'Ch47',
+         'ME17':'Ch32',
+         'ME18':'Ch27',
+         'ME19':'Ch30',
+         'ME20':'Ch29',
+         'ME21':'Ch28',
+         'ME22':'Ch25',
+         'ME23':'Ch26',
+         'ME24':'Ch07',
+         'ME25':'Ch21',
+         'ME26':'Ch11',
+         'ME27':'Ch17',
+         'ME28':'Ch15',
+         'ME29':'Ch13',
+         'ME30':'Ch31',
+         'ME31':'Ch19',
+         'ME32':'Ch09',
+         'ME0':'Ch12',
+         'SE33':'Ch59'}
+
+MCSMap = {v: k for k, v in MCSMapI.iteritems()}       
+                 
+#Col, Row  
+MCSMapFacingDown={'Ch58':(0,1),
+                  'Ch57':(0,2),
+                  'Ch56':(0,3),
+                  'Ch55':(0,4),
+                  'Ch54':(0,5),
+                  'Ch53':(0,6),
+                  'Ch52':(0,7),
+                  'Ch51':(0,8),
+                  'Ch50':(0,9),
+                  'Ch49':(0,10),
+                  'Ch60':(1,0),
+                  'Ch61':(1,1),
+                  'Ch62':(1,2),
+                  'Ch63':(1,3),
+                  'Ch64':(1,4),
+                  'Ch65':(1,5),
+                  'Ch43':(1,6),
+                  'Ch44':(1,7),
+                  'Ch45':(1,8),
+                  'Ch46':(1,9),
+                  'Ch47':(1,10),
+                  'Ch70':(2,0),
+                  'Ch69':(2,1),
+                  'Ch68':(2,2),
+                  'Ch67':(2,3),
+                  'Ch66':(2,4),
+                  'Ch42':(2,5),
+                  'Ch41':(2,6),
+                  'Ch40':(2,7),
+                  'Ch39':(2,8),
+                  'Ch38':(2,9),
+                  'Ch37':(2,10),
+                  'Ch01':(3,0),
+                  'Ch02':(3,1),
+                  'Ch03':(3,2),
+                  'Ch04':(3,3),
+                  'Ch05':(3,4),
+                  'Ch06':(3,5),
+                  'Ch30':(3,6),
+                  'Ch31':(3,7),
+                  'Ch32':(3,8),
+                  'Ch33':(3,9),
+                  'Ch34':(3,10),
+                  'Ch11':(4,0),
+                  'Ch10':(4,1),
+                  'Ch09':(4,2),
+                  'Ch08':(4,3),
+                  'Ch07':(4,4),
+                  'Ch29':(4,5),
+                  'Ch28':(4,6),
+                  'Ch27':(4,7),
+                  'Ch26':(4,8),
+                  'Ch25':(4,9),
+                  'Ch24':(4,10),
+                  'Ch12':(0,0),
+                  'Ch59':(5,0),
+                  'Ch13':(5,1),
+                  'Ch14':(5,2),
+                  'Ch15':(5,3),
+                  'Ch16':(5,4),
+                  'Ch17':(5,5),
+                  'Ch18':(5,6),
+                  'Ch19':(5,7),
+                  'Ch20':(5,8),
+                  'Ch21':(5,9),
+                  'Ch22':(5,10)}
+
+if __name__ == '__main__':
+    
+    ColTrs = {}
+    for i in range(6):
+        ColTrs[i] = [None] * 11
+    for k, v in MCSMapFacingDown.iteritems():
+        ColTrs[v[0]][v[1]] = k
+        
+        
+    ##### 3rd session
+    InFileM = '../Raw Data/2019-07-31T18-00-05B12784O18-T2-Longterm-Rec2.h5'
+    InFileS = '../Raw Data/2019-07-31T18-00-05B12784O18-T2-Longterm-Rec2_2.h5'  
+    CalFile = dd.io.load('../CalibrationFile/Cal-Gm20190731_033840.h5')
+    DatFile = '../Matlab/2019-07-31T18-00-05B12784O18-T2-Longterm-Rec2'
+    Bits = 16
+    vgs = 0.25
+    gmsign = -1
+    Range = 20e-3 
+    
+
+
+    ivgainDC = pq.A/(118.8*pq.V) 
+    ivgainAC = pq.A/(1188*pq.V) 
+    Fhigh = 100 
+    Flow = 0.001
+    
+    DCchs = ('ME5', 'ME7', 'ME29', 'ME31', 'SE5', 'SE7', 'SE29', 'SE31')
+    ACchs = MCSMapFacingDown.keys()  
+    Enc = ['M1','M2','S1','S2']
+    
+    Rec = ReadMCSFile(InFileM,
+                      OutSeg=None,
+                      SigNamePrefix='M')
+    
+    Rec = ReadMCSFile(InFileS,
+                      OutSeg=Rec,
+                      SigNamePrefix='S')
+    
+    
+    plt.close('all')
+    
+
+#%%  Plot AC ############################################################ 
+    plt.close('all')  
+    FigSize = (25*0.394, 15*0.394)  
+    Twind = (0*pq.s, None)
+    VgsInVivo = CalFile['Vgs']
+    CalRec = NeoSegment()
+    tstop = np.array([])
+    
+    for sig in Rec.Signals():
+        tstop = np.append(tstop,sig.t_stop)
+    Twind = [0*pq.s, np.min(tstop)*pq.s]
+    
+    for isig, sig in enumerate(Rec.Signals()):
+        if isig == 0:
+            sig01 = sig.duplicate_with_new_array(np.zeros(len(sig.GetSignal(Time = Twind))))
+            sig01.name = 'ME0'
+            CalRec.AddSignal(sig01)
+        if isig == 54:
+            sig70 = sig.duplicate_with_new_array(np.zeros(len(sig.GetSignal(Time = Twind))))
+            sig70.name = 'SE33'
+            CalRec.AddSignal(sig70)   
+        
+        if sig.name in Enc:
+            continue
+        
+        gm = gmsign * np.interp(vgs,VgsInVivo,CalFile['GM'][sig.name])*pq.A/pq.V
+
+        if CalFile['ChKo'][sig.name]==True:
+            gm = 1.0*pq.A/pq.V
+        
+        
+        SigProAC = [{'function': RPro.Gain, 'args': {'Gain': ivgainAC}},
+                    {'function': RPro.Gain, 'args': {'Gain': 1/gm}},
+                    {'function': RPro.RemoveDC, 'args': {}},
+
+                    ]
+        
+        SigProDC = [{'function': RPro.Gain, 'args': {'Gain': ivgainDC}},
+                    {'function': RPro.Gain, 'args': {'Gain': 1/gm}},
+                    {'function': RPro.SetZero, 'args': {'TWind': (None, 20*pq.s)}},
+                    {'function': RPro.Filter, 'args': {'Type':'highpass',
+                                              'Order':2,
+                                              'Freqs':(Flow,)}}
+                         ]
+                        
+        sig = Rec.GetSignal(sig.name)
+        if sig.name in DCchs:
+            sig.ProcessChain = SigProDC
+        else:
+            sig.ProcessChain = SigProAC
+
+        sig = sig.GetSignal(Time = Twind)
+    
+        
+        CalRec.AddSignal(sig)
+    
+
+    
+    ChNames = {val:key for (key, val) in CalRec.SigNames.items()}
+    
+    SigProEnc = [{'function': RPro.Gain, 'args': {'Gain': 1.0/50}},
+                    ]
+
+    M1sig = Rec.GetSignal('M1')
+    M2sig = Rec.GetSignal('M2')
+    M1sig.ProcessChain = SigProEnc
+    M2sig.ProcessChain = SigProEnc
+
+    M1sig = M1sig.GetSignal(Time = Twind)
+    M2sig = M2sig.GetSignal(Time = Twind)
+    CalRec.AddSignal(M1sig)
+    CalRec.AddSignal(M2sig)
+
+    ChNames[66] = 'M1'
+    ChNames[67] = 'M2'
+    
+    SortMap = np.ndarray([7, 11], dtype=object)
+ 
+    for key, val in MCSMapFacingDown.items():
+        SortMap[val[0], val[1]] = MCSMap[key]
+
+    SortMap[6,0] ='M1'
+    SortMap[6,1] ='M2'
+    NeuroScopeMap = []       
+    for col in SortMap:
+        ColName = []
+        ColCh = []
+        for ch in col:
+            if ch ==None:
+                continue
+            ColName.append(ch)
+            ColCh.append(CalRec.SigNames[ch])
+        NeuroScopeMap.append((ColName, ColCh))
+    
+    
+    ExpDat = CalRec.ExportNeuroscope(DatFile, Range, Bits,'V', ChNames, NeuroScopeMap)
+ 
+
+print('File exported to Neuroscope format, see "Cal Data" folder')       
+ 

+ 24 - 0
In-vivo/Calibration and longitudinal assessment/Day1-2/Calibration scripts/McsPy/LICENCE.txt

@@ -0,0 +1,24 @@
+Copyright (c) 2018, Multi Channel Systems MCS GmbH
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+    * Redistributions of source code must retain the above copyright
+      notice, this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the
+      documentation and/or other materials provided with the distribution.
+    * Neither the name of the Multi Channel Systems MCS GmbH nor the
+      names of its contributors may be used to endorse or promote products
+      derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+ 123 - 0
In-vivo/Calibration and longitudinal assessment/Day1-2/Calibration scripts/McsPy/McsCMOS.py

@@ -0,0 +1,123 @@
+"""
+    McsCMOS
+    ~~~~~~~
+
+    Wrapper and Helper to access MCS CMOS Data within H5 Files 
+    
+    :copyright: (c) 2015 by Multi Channel Systems MCS GmbH
+    :license: see LICENSE for more details
+"""
+
+import h5py
+import numpy
+
+class CMOSData(h5py.File):
+    """
+    Wrapper for a HDF5 File containing CMOS Data
+    """
+    def __init__(self, path):
+        """
+        Creates a CMOSData file and links it to a H5 File
+        :param path: Path to a H5 File containing CMOS Data
+        :type path: string 
+        """
+        super(CMOSData, self).__init__(path, mode='r')
+        
+        # -- map raw data --
+        self.raw_data= self['/Data/Recording_0/FrameStream/Stream_0/FrameDataEntity_0/FrameData']
+        self.conv_factors= self['/Data/Recording_0/FrameStream/Stream_0/FrameDataEntity_0/ConversionFactors']
+
+        # - map proxy data -
+        self.conv_data = CMOSConvProxy(self)
+
+        # -- map meta --
+        self.meta={}
+        
+        # - from InfoFrame
+        info_frame= self['/Data/Recording_0/FrameStream/Stream_0/InfoFrame']
+        
+        for key in info_frame.dtype.names:
+            self.meta[key]=info_frame[key][0]
+
+        if("Tick" in self.meta):
+            self.meta["FrameRate"] = 10.0**6/self.meta["Tick"]
+        
+        # - from File
+        for key, value in self.attrs.items():
+            self.meta[key]= value
+
+        # - from Data Group
+        for key, value in self['/Data'].attrs.items():
+            self.meta[key]= value
+
+        # -- map events --
+        if("EventStream" in self["Data/Recording_0/"].keys()):
+            event_group = self["Data/Recording_0/EventStream/Stream_0/"]
+            event_info = self["Data/Recording_0/EventStream/Stream_0/InfoEvent"]
+
+            self.events={}
+            self.event_frames={}
+        
+            for key in event_group.keys():
+                if "EventEntity" in key:
+                    info = event_info["Label"][event_info["EventID"]==int(key.split("_")[1])][0]
+                    self.events[info] = event_group[key][0, 0]
+                    self.event_frames[info] = event_group[key][0, 0]/self.meta["Tick"]
+
+
+
+class CMOSConvProxy:
+    """
+    Private Class, should be embedded within a CMOSData Object.
+    A proxy that transparently converts raw data to calibrated data. 
+    """
+
+    def __init__(self, parent):
+        """
+        Creates a new CMOSConvProxy
+        :param parent: Object that can provide raw_data and conv_factors
+        :type parent: CMOSData
+        """
+        self._parent = parent
+        self.dtype = numpy.int32
+
+    def __getitem__(self, slices):
+        """
+        Sliced access to converted data
+        :param slices: Data-slices to retrieve
+        :returns: converted data
+        """
+        raw_data = self._parent.raw_data.__getitem__(slices)
+        conv_fasctors = self._parent.conv_factors.__getitem__((slices[0], slices[1]))
+        return (raw_data*conv_fasctors).astype(self.dtype)
+
+    @property
+    def shape(self):
+        """
+        Shape of the data
+        """
+        return self._parent.raw_data.shape
+
+
+class CMOSSpikes(h5py.File):
+    """
+    Wrapper for a HDF5 File containing CMOS Spike Data.
+    Spike Information is accessible through the .spike Member,
+    Waveform Information (if available) through the .waveforms Member.
+    """
+    def __init__(self, path):
+        super(CMOSSpikeFile, self).__init__(path)
+
+        # -- Check for right structure --
+        if("data" in self.keys() and "spikes" in self['data'].keys()):
+            
+            # -- Map Spike-Data to RecordArray
+            self.spikes = np.core.records.fromarrays(self['data/spikes'][:,:], 
+                                                 names='time, col, row',
+                                                 formats = 'int64, int64, int64')
+            # -- Map Waveforms to Array
+            if("waveforms" in self['data'].keys()):
+                self.waveforms = self['data/waveforms'][:,:].transpose()
+                
+        else:
+            raise IOError(path+ " has no valid CMOSSpikeFile Structure")

File diff suppressed because it is too large
+ 1272 - 0
In-vivo/Calibration and longitudinal assessment/Day1-2/Calibration scripts/McsPy/McsData.py


BIN
In-vivo/Calibration and longitudinal assessment/Day1-2/Calibration scripts/McsPy/McsData.pyc


+ 85 - 0
In-vivo/Calibration and longitudinal assessment/Day1-2/Calibration scripts/McsPy/Test/TestCMOS.py

@@ -0,0 +1,85 @@
+import unittest
+import McsPy.McsCMOS
+import os
+import numpy
+
+FILENAME = os.path.join(os.path.dirname(__file__), 'TestData\\CMOSTestRec.h5')
+
+class TestMcsCMOS(unittest.TestCase):
+
+    def setUp(self):
+        self.test_file=McsPy.McsCMOS.CMOSData(FILENAME)
+
+    def test_CMOSData_meta(self):
+
+        #File Meta
+        self.assertEqual(self.test_file.meta["McsHdf5ProtocolType"], "RawData")
+        self.assertEqual(self.test_file.meta["McsHdf5ProtocolVersion"], 1)
+
+        # Data Meta
+        self.assertEqual(self.test_file.meta["ProgramName"].strip(), "CMOS-MEA-Control")
+        self.assertEqual(self.test_file.meta["ProgramVersion"].strip(), "0.7.0.0")
+        self.assertEqual(self.test_file.meta["MeaName"].strip(), "nMos32?")
+        self.assertEqual(self.test_file.meta["MeaLayout"], "")
+        self.assertEqual(self.test_file.meta["MeaSN"].strip(), "unknown")
+        self.assertEqual(self.test_file.meta["Date"].strip(), "Tuesday, November 04, 2014")
+        self.assertEqual(self.test_file.meta["DateInTicks"], 635506934728348929)
+        self.assertEqual(self.test_file.meta["FileGUID"], "67ced1bf-c1a7-4a3d-9df3-2e56fd459cbd")
+        self.assertEqual(self.test_file.meta["Comment"], "")
+
+        # InfoFrame Meta
+        self.assertEqual(self.test_file.meta["FrameID"], 1)
+        self.assertEqual(self.test_file.meta["FrameDataID"], 0)
+        self.assertEqual(self.test_file.meta["GroupID"], 1)
+        self.assertEqual(self.test_file.meta["Label"], "ROI 1")
+        self.assertEqual(self.test_file.meta["RawDataType"], "Short")
+        self.assertEqual(self.test_file.meta["Unit"], "V")
+        self.assertEqual(self.test_file.meta["Exponent"], -9)
+        self.assertEqual(self.test_file.meta["ADZero"], 0)
+        self.assertEqual(self.test_file.meta["Tick"], 50)
+        self.assertEqual(self.test_file.meta["HighPassFilterType"], "")
+        self.assertEqual(self.test_file.meta["HighPassFilterCutOffFrequency"], "-1")
+        self.assertEqual(self.test_file.meta["HighPassFilterOrder"], -1)
+        self.assertEqual(self.test_file.meta["LowPassFilterType"], "")
+        self.assertEqual(self.test_file.meta["LowPassFilterCutOffFrequency"], "-1")
+        self.assertEqual(self.test_file.meta["LowPassFilterOrder"], -1)
+        self.assertEqual(self.test_file.meta["SensorSpacing"], 1)
+        self.assertEqual(self.test_file.meta["FrameLeft"], 1)
+        self.assertEqual(self.test_file.meta["FrameTop"], 1)
+        self.assertEqual(self.test_file.meta["FrameRight"], 65)
+        self.assertEqual(self.test_file.meta["FrameBottom"], 65)
+        self.assertEqual(self.test_file.meta["ReferenceFrameLeft"], 1)
+        self.assertEqual(self.test_file.meta["ReferenceFrameTop"], 1)
+        self.assertEqual(self.test_file.meta["ReferenceFrameRight"], 65)
+        self.assertEqual(self.test_file.meta["ReferenceFrameBottom"], 65)
+
+    def test_CMOSData_data(self):
+
+        # Dataset Dimensions
+        self.assertEqual(self.test_file.raw_data.shape[0],65)
+        self.assertEqual(self.test_file.raw_data.shape[1],65)
+        self.assertEqual(self.test_file.raw_data.shape[2],2000)
+
+        #Some Random Datapoints
+        self.assertEqual(self.test_file.raw_data[56,45,33],10)
+        self.assertEqual(self.test_file.raw_data[1,11,203],-3)
+        self.assertEqual(self.test_file.raw_data[23,64,870],0)
+
+    def test_CMOSData_conversion_factors(self):
+        self.assertEqual(self.test_file.conv_factors[56,45],6456)
+        self.assertEqual(self.test_file.conv_factors[1,11],1)
+        self.assertEqual(self.test_file.conv_factors[23,64],1)
+
+    def test_CMOSData_conversion_proxy(self):
+
+        #Data Access
+        self.assertEqual(self.test_file.conv_data[56,45,33],64560)
+        self.assertEqual(self.test_file.conv_data[1,11,203],-3)
+        self.assertEqual(self.test_file.conv_data[23,64,870],0)
+
+        #Attribute proxy
+        self.assertEqual(self.test_file.conv_data.dtype,numpy.int32)
+        self.assertEqual(self.test_file.conv_data[23,64,870].dtype,numpy.int32)
+
+if __name__ == '__main__':
+    unittest.main()

BIN
In-vivo/Calibration and longitudinal assessment/Day1-2/Calibration scripts/McsPy/Test/TestData/2014-07-09T10-17-35W8 Standard all 500 Hz.h5


BIN
In-vivo/Calibration and longitudinal assessment/Day1-2/Calibration scripts/McsPy/Test/TestData/CMOSTestRec.h5


+ 344 - 0
In-vivo/Calibration and longitudinal assessment/Day1-2/Calibration scripts/McsPy/Test/TestRawDataStructures.py

@@ -0,0 +1,344 @@
+import unittest
+import McsPy.McsData
+import datetime
+import exceptions
+import os
+import numpy as np
+
+from McsPy import *
+
+test_raw_frame_data_file_path = os.path.join(os.path.dirname(__file__), 'TestData\\Sensors-10x100ms-10kHz.h5')
+
+test_data_file_path = os.path.join(os.path.dirname(__file__), 'TestData\\2014-07-09T10-17-35W8 Standard all 500 Hz.h5')
+
+average_segment_data_file_path = os.path.join(os.path.dirname(__file__), 'TestData\\20150402_00 Atrium_002.h5')
+
+#@unittest.skip("showing the principle structure of python unit tests")
+#class Test_TestRawDataStructures(unittest.TestCase):
+#    def test_A(self):
+#        self.fail("Not implemented")
+
+class Test_RawData(unittest.TestCase):
+    def setUp(self):
+        self.data = McsData.RawData(test_data_file_path)
+        self.raw_frame_data = McsData.RawData(test_raw_frame_data_file_path)
+        self.average_segments = McsData.RawData(average_segment_data_file_path)
+
+class Test_RawDataContainer(Test_RawData):
+    # Test MCS-HDF5 version
+    def test_mcs_hdf5_version(self):
+        self.assertEqual(self.data.mcs_hdf5_protocol_type, "RawData", 
+                         "The MCS-HDF5 protocol type was '%s' and not '%s' as expected!" % (self.data.mcs_hdf5_protocol_type, "RawData"))
+        self.assertEqual(self.data.mcs_hdf5_protocol_type_version, 1, 
+                         "The MCS-HDF5 protocol version was '%s' and not '1' as expected!" % self.data.mcs_hdf5_protocol_type_version)
+
+    def test_mcs_hdf5_version_frame(self):
+        self.assertEqual(self.data.mcs_hdf5_protocol_type,  "RawData", 
+                         "The MCS-HDF5 protocol type was '%s' and not '%s' as expected!" % (self.data.mcs_hdf5_protocol_type, "RawData"))
+        self.assertEqual(self.data.mcs_hdf5_protocol_type_version, 1, 
+                         "The MCS-HDF5 protocol version was '%s' and not '1' as expected!" % self.data.mcs_hdf5_protocol_type_version)
+
+    # Test session:
+    def test_session_attributes(self):
+        self.assertEqual(self.data.comment, '', 'Comment is different!')
+        self.assertEqual(self.data.clr_date, 'Mittwoch, 9. Juli 2014', 'Clr-Date is different!')
+        self.assertEqual(self.data.date_in_clr_ticks, 635404978551720981, 'Clr-Date-Ticks are different!')
+        self.assertEqual(self.data.date, datetime.datetime(2014, 7, 9, 10, 17, 35, 172098), 'Date is different!');
+        self.assertEqual(str(self.data.file_guid), '700b3ec2-d406-4943-bcef-79d73f0ac4d3', 'FileGUID is different!')
+        self.assertEqual(str(self.data.mea_layout), 'Linear8', 'Mea-Layout is different!')
+        self.assertEqual(self.data.mea_sn, '', 'MeaSN is different!')
+        self.assertEqual(self.data.mea_name, 'Linear8', 'MeaName is different!')
+        self.assertEqual(self.data.program_name, 'Multi Channel Experimenter', 'Program name is different!')
+        self.assertEqual(self.data.program_version, '0.9.8.2', 'Program version is different!') 
+
+
+    # Test recording:
+    def test_count_recordings(self):
+        self.assertEqual(len(self.data.recordings), 1, 'There should be only one recording!')
+
+    def test_recording_attributes(self):
+        first_recording = self.data.recordings[0]
+        self.assertEqual(first_recording.comment, '', 'Recording comment is different!')
+        self.assertEqual(first_recording.duration, 19700000, 'Recording duration is different!')
+        self.assertEqual(first_recording.label, '', 'Recording label is different!')
+        self.assertEqual(first_recording.recording_id, 0, 'Recording ID is different!')
+        self.assertEqual(first_recording.recording_type, '', 'Recording type is different!')
+        self.assertEqual(first_recording.timestamp, 0, 'Recording timestamp is different!')
+        self.assertAlmostEqual(first_recording.duration_time.to(ureg.sec).magnitude, 19.7, places = 1, msg = 'Recording timestamp is different!')
+
+    # Test analog streams:
+    def test_count_analog_streams(self):
+        self.assertEqual(len(self.data.recordings[0].analog_streams), 3, 'There should be only one analog stream inside the recording!')
+
+    def test_analog_stream_attributes(self):
+        first_analog_stream = self.data.recordings[0].analog_streams[0]
+        self.assertEqual(first_analog_stream.info_version, 1, "Version of the Stream-Info was %s and not as expected 1!" % first_analog_stream.info_version)
+        self.assertEqual(first_analog_stream.data_subtype, 'Electrode', 'Analog stream data sub type is different!')
+        self.assertEqual(first_analog_stream.label, 'Filter (1) Filter Data', 'Analog stream label is different!')
+        self.assertEqual(str(first_analog_stream.source_stream_guid), '43f795b0-7881-408f-a840-0207bc8e203c', 'Analog stream source GUID is different!')
+        self.assertEqual(str(first_analog_stream.stream_guid), 'a9d1ab04-2cf8-489c-a861-595e662fba4e', 'Analog stream GUID is different!')
+        self.assertEqual(first_analog_stream.stream_type, 'Analog', 'Analog stream type is different!')
+    
+    def test_analog_stream(self):
+        data_set = self.data.recordings[0].analog_streams[0].channel_data
+        self.assertEqual(data_set.shape, (8, 9850), 'Shape of dataset is different!')
+        
+        timestamp_index = self.data.recordings[0].analog_streams[0].timestamp_index
+        self.assertEqual(timestamp_index.shape, (1, 3), 'Shape of timestamp index is different!')
+
+        channel_infos = self.data.recordings[0].analog_streams[0].channel_infos
+        self.assertEqual(len(channel_infos), 8, 'Number of channel info objects is different!')
+        self.assertEqual(len(channel_infos[0].info), 16, 'Number of of components of an channel info object is different!')
+        self.assertEqual(channel_infos[0].version, 1, 'InfoChannel-Type version 1 expected but was %s' % channel_infos[0].version)
+
+    def test_analog_stream_data(self):
+        analog_stream = self.data.recordings[0].analog_streams[0]
+        signal = analog_stream.get_channel_in_range(0, 1569, 1584)
+        sig = signal[0]
+        scale = 381469 * 10**-9
+        expected_sig = np.array([4, 5, 0, -3, 2, -1, -6, 6, 0, 0, 0, 0, 0, 0, 3, -9], dtype=np.float) * scale
+        np.testing.assert_almost_equal(sig, expected_sig, decimal = 5)
+        #self.assertEquals(map(lambda x: x, sig), expected_sig, "Signal values were '%s' and not as expected '%s'" % (sig, expected_sig))
+        self.assertEqual(str(signal[1]), 'volt', "Unit of sampled values was expected to be 'volt' but was '%s'!" % str(signal[1]))
+
+    def test_analog_stream_data_timestamps(self):
+        analog_stream = self.data.recordings[0].analog_streams[0]
+        signal_ts = analog_stream.get_channel_sample_timestamps(6, 1996, 2000)
+        sig_ts = signal_ts[0]
+        expected_ts = [3992000, 3994000, 3996000, 3998000, 4000000]
+        self.assertEquals(map(lambda x: x, sig_ts), expected_ts, "Selected timestamps were '%s' and not as expected '%s'" % (sig_ts, expected_ts))
+        self.assertEqual(str(signal_ts[1]), 'microsecond', "Unit of timestamps was expected to be 'microsecond' but was '%s'!" % str(signal_ts[1]))
+
+    # Test frame streams:
+    def test_count_frame_streams(self):
+        self.assertEqual(len(self.raw_frame_data.recordings[0].frame_streams), 1, 'There should be only one frame stream!')
+        self.assertEqual(len(self.raw_frame_data.recordings[0].frame_streams[0].frame_entity), 1, 'There should be only one frame entity inside the stream!')
+
+    def test_frame_stream_attributes(self):
+        first_frame_stream = self.raw_frame_data.recordings[0].frame_streams[0]
+        self.assertEqual(first_frame_stream.info_version, 1, "Version of the Stream-Info was %s and not as expected 1!" % first_frame_stream.info_version)
+        self.assertEqual(first_frame_stream.data_subtype, 'Unknown', 'Frame stream data sub type is different!')
+        self.assertEqual(first_frame_stream.label, '', 'Frame stream label is different!')
+        self.assertEqual(str(first_frame_stream.source_stream_guid), '11bee63c-8714-4b2b-8cf9-228b1915f183', 'Frame stream source GUID is different!')
+        self.assertEqual(str(first_frame_stream.stream_guid), '784bf2ba-0e1b-4f3a-acc6-825af9bd1bf1', 'Frame stream GUID is different!')
+        self.assertEqual(first_frame_stream.stream_type, 'Frame', 'Frame stream type is different!')
+    
+    def test_frame_infos(self):
+        conv_fact_expected = np.zeros(shape=(65,65), dtype=np.int32) + 1000
+        info_expected = {
+                     'FrameLeft': 1, 'Exponent': -9, 'RawDataType': 'Short', 'LowPassFilterCutOffFrequency': '-1', 'Label': 'ROI 1', 
+                     'FrameTop': 1, 'ADZero': 0, 'LowPassFilterOrder': -1, 'ReferenceFrameTop': 1, 'FrameRight': 65, 'HighPassFilterType': '', 
+                     'Tick': 50, 'SensorSpacing': 1, 'HighPassFilterCutOffFrequency': '-1', 'FrameDataID': 0, 'FrameID': 1, 'GroupID': 1, 
+                     'ReferenceFrameRight': 65, 'ReferenceFrameBottom': 65, 'LowPassFilterType': '', 'HighPassFilterOrder': -1, 
+                     'ReferenceFrameLeft': 1, 'FrameBottom': 65, 'Unit': 'V'
+        }
+        frame_info = self.raw_frame_data.recordings[0].frame_streams[0].frame_entity[1].info
+        self.assertEqual(len(frame_info.info), 24, 'Number of of components of an channel info object is different!')
+        info_key_diff = set(frame_info.info.keys()) - set(info_expected.keys())
+        if not info_key_diff:
+            for key, value in frame_info.info.items():
+                self.assertEqual(
+                    value, info_expected[key], 
+                    "Frame info object for key '%(k)s' is ('%(val)s') not as expected ('%(ex_val)s')!" % {'k':key, 'val':value, 'ex_val':info_expected[key]}
+                )
+        self.assertEqual(frame_info.frame.height, 65, "Frame height was '%s' and not '65' as expected!" % frame_info.frame.height)
+        self.assertEqual(frame_info.frame.width, 65, "Frame width was '%s' and not '65' as expected!" % frame_info.frame.width)
+        self.assertEqual(frame_info.reference_frame.height, 65, "Frame height was '%s' and not '65' as expected!" % frame_info.reference_frame.height)
+        self.assertEqual(frame_info.reference_frame.width, 65, "Frame width was '%s' and not '65' as expected!" % frame_info.reference_frame.width)
+        self.assertEqual(frame_info.adc_basic_step.magnitude, 10**-9, "ADC step was '%s' and not '10^-9 V' as expected!" % frame_info.adc_basic_step)
+        self.assertEqual(frame_info.adc_step_for_sensor(0,0).magnitude, 1000 * 10**-9, "ADC step was '%s' and not '1000 * 10^-9 V' as expected!" % frame_info.adc_step_for_sensor(0,0))
+        self.assertEqual(frame_info.adc_step_for_sensor(1,1).magnitude, 1000 * 10**-9, "ADC step was '%s' and not '1000 * 10^-9 V' as expected!" % frame_info.adc_step_for_sensor(1,1))
+        self.assertEqual(frame_info.adc_step_for_sensor(63,63).magnitude, 1000 * 10**-9, "ADC step was '%s' and not '1000 * 10^-9 V' as expected!" % frame_info.adc_step_for_sensor(63,63))
+        self.assertTrue((frame_info.conversion_factors == conv_fact_expected).all(), "Frame sensor conversion factors matrix is different from the expected one!")
+        self.assertRaises(exceptions.IndexError, frame_info.adc_step_for_sensor, 65,65)          
+
+    def test_frame_data(self):
+        frame_entity = self.raw_frame_data.recordings[0].frame_streams[0].frame_entity[1]
+        frame_data = frame_entity.data
+        frame = frame_data[:,:,1]
+        self.assertEqual(frame.shape, (65,65), "Second slice was '%s' and not '(65,65)' as expected!" % str(frame.shape))
+        selected_values = [frame[0,0], frame[9,3], frame[0,5]]
+        expected_values = [    -10000,        211,       -727]
+        self.assertEquals(selected_values, expected_values, "Selected ADC values were '%s' and not as expected '%s'" % (selected_values, expected_values))
+        sensor_signal = frame_entity.get_sensor_signal(30, 30, 0, 1000)
+        sig = sensor_signal[0]
+        self.assertEquals(len(sig), 1001, "Length of sensor signal was '%s' and not as expected '1001'" % len(sig))
+
+    def test_frame_data_timestamps(self):
+        frame_entity = self.raw_frame_data.recordings[0].frame_streams[0].frame_entity[1]
+        timestamps = frame_entity.get_frame_timestamps(0,2000)
+        ts = timestamps[0]
+        self.assertEqual(len(ts), 2001, "Number oftime stamps were '%s' and not as expected '2001'" % len(ts))
+        timestamps = frame_entity.get_frame_timestamps(1995,2005)
+        ts = timestamps[0]
+        self.assertEqual(len(ts), 11, "Number of timestamps were '%s' and not as expected '11'" % len(ts))
+        expected_ts = [199750, 199800, 199850, 199900, 199950, 200000,  1000000,  1000050,  1000100, 1000150, 1000200]
+        self.assertEquals(map(lambda x: x, ts), expected_ts, "Timestamps were '%s' and not as expected '%s'" % (ts, expected_ts))
+        timestamps = frame_entity.get_frame_timestamps(0,5000)
+        ts = timestamps[0]
+        self.assertEqual(len(ts), 5001, "Number of timestamps were '%s' and not as expected '5001'" % len(ts))
+        selected_ts = [ ts[0], ts[1], ts[2000], ts[2001], ts[2002], ts[4001], ts[4002], ts[4003]]
+        expected_ts = [100000,100050,   200000,  1000000,  1000050,  1100000,  3000000,  3000050]
+        self.assertEquals(selected_ts, expected_ts, "Selected timestamps were '%s' and not as expected '%s'" % (selected_ts, expected_ts))
+        timestamps = frame_entity.get_frame_timestamps(16008,16008)
+        ts = timestamps[0]
+        self.assertEqual(len(ts), 1, "Number of timestamps were '%s' and not as expected '1'" % len(ts))
+        self.assertEquals(ts[0], 12500000, "Timestamps were '%s' and not as expected '%s'" % (ts, expected_ts))
+        self.assertEqual(str(timestamps[1]), 'microsecond', "Unit of timestamps was expected to be 'microsecond' but was '%s'!" % str(timestamps[1]))
+
+    # Test event streams:
+    def test_count_event_streams(self):
+        self.assertEqual(len(self.data.recordings[0].event_streams), 1, 'There should be only one event stream inside the recording!')
+        self.assertEqual(len(self.data.recordings[0].event_streams[0].event_entity), 1, 'There should be 1 event entities inside the stream!')
+
+    def test_event_stream_attributes(self):
+        first_event_stream = self.data.recordings[0].event_streams[0]
+        self.assertEqual(first_event_stream.info_version, 1, "Version of the Stream-Info was %s and not as expected 1!" % first_event_stream.info_version)
+        self.assertEqual(first_event_stream.data_subtype, 'DigitalPort', 'Event stream data sub type is different from expected \'DigitalPort\'!')
+        self.assertEqual(first_event_stream.label, 'Digital Events 1', 'Event stream label is different!')
+        self.assertEqual(str(first_event_stream.source_stream_guid), '0696bca6-7c30-4024-8e58-72da383aa248', 'Event stream source GUID is different!')
+        self.assertEqual(str(first_event_stream.stream_guid), '92bc437b-7655-4673-adfa-abbeca2c53e0', 'Event stream GUID is different!')
+        self.assertEqual(first_event_stream.stream_type, 'Event', 'Event stream type is different!')
+
+    def test_event_infos(self):
+        first_event_entity = self.data.recordings[0].event_streams[0].event_entity[0]
+        self.assertEqual(first_event_entity.info.version, 1, "EventEntityInfo-Version was %s and not \'1\' as expected!" % first_event_entity.info.version)
+        self.assertEqual(first_event_entity.info.id, 0, "ID is not as expected!")
+        self.assertEqual(first_event_entity.info.raw_data_bytes, 4, "RawDataBytes is not as expected!")
+        self.assertEquals(first_event_entity.info.source_channel_ids, [8],"Source channel IDs are different!") 
+        self.assertEquals(first_event_entity.info.source_channel_labels.values(), 
+                          ["1"],"Source channels label is different (was '%s' instead of '['1']')!" % 
+                          first_event_entity.info.source_channel_labels.values()) 
+
+    def test_event_data(self):
+        first_event_entity = self.data.recordings[0].event_streams[0].event_entity[0]
+        self.assertEqual(first_event_entity.count, 12, "Count was expected to be 12 but was %s!" % first_event_entity.count)
+        events = first_event_entity.get_events()
+        self.assertEqual(str(events[1]), 'microsecond', "Event time unit was expected to be 'microsecond' but was '%s'!" % str(events[1]))
+        self.assertEqual((events[0]).shape, (2,12), "Event structured was expected to be (2,12) but was %s!" % str(events[0].shape))
+        events_ts = first_event_entity.get_event_timestamps(0,3)
+        #self.assertAlmostEquals(events[0],[1.204050, 2.099150, 2.106800] , places = 5, msg = "Event timestamps were not as expected!")
+        np.testing.assert_almost_equal(events_ts[0],[216000, 1916000, 3616000], decimal = 5)
+        events_ts = first_event_entity.get_event_timestamps(4,5)
+        self.assertAlmostEqual(events_ts[0][0], 7016000, places = 4, msg = "Last event timestamp was %s and not as expected 216000!" % events[0][0])
+        events_duration = first_event_entity.get_event_durations(2,8)
+        np.testing.assert_almost_equal(events_duration[0],[0, 0, 0, 0, 0, 0], decimal = 5)
+        self.assertRaises(exceptions.IndexError, first_event_entity.get_events, 16, 4)
+        self.assertRaises(exceptions.IndexError, first_event_entity.get_events, 412, 500)   
+        self.assertRaises(exceptions.IndexError, first_event_entity.get_events, -1, 5) 
+
+    # Test segment streams:
+    def test_count_segment_streams(self):
+        self.assertEqual(len(self.data.recordings[0].segment_streams), 1, 'There should be only one segment stream inside the recording!')
+        self.assertEqual(len(self.data.recordings[0].segment_streams[0].segment_entity), 8, 'There should be 8 segment entities inside the stream!')
+
+    def test_segment_stream_attributes(self):
+        first_segment_stream = self.data.recordings[0].segment_streams[0]
+        self.assertEqual(first_segment_stream.info_version, 1, "Version of the Stream-Info was %s and not as expected 1!" % first_segment_stream.info_version)
+        self.assertEqual(first_segment_stream.stream_type, 'Segment', "Segment stream type was '%s' and not 'Segment'!" % first_segment_stream.stream_type)
+        self.assertEqual(first_segment_stream.data_subtype, 'Spike', "Segment stream data sub type was '%s' and not 'Spike' as expected!" % first_segment_stream.data_subtype)
+        self.assertEqual(first_segment_stream.label, 'Spike Detector (1) Spike Data', "Segment label was '%s' and not '' as expected!" % first_segment_stream.label)
+        self.assertEqual(str(first_segment_stream.source_stream_guid), 'a9d1ab04-2cf8-489c-a861-595e662fba4e', 
+                         "Segment stream source GUID was '%s' and not 'a9d1ab04-2cf8-489c-a861-595e662fba4e' as expected!" % str(first_segment_stream.source_stream_guid))
+        self.assertEqual(str(first_segment_stream.stream_guid), '7c2105e5-5ea4-4fdc-91d8-6b85f47773c2', 
+                         "Segment stream GUID was '%s' and not '7c2105e5-5ea4-4fdc-91d8-6b85f47773c2' as expected!" % str(first_segment_stream.stream_guid))
+
+    def test_segment_infos(self):
+        fifth_segment_entity = self.data.recordings[0].segment_streams[0].segment_entity[4]
+        self.assertEqual(fifth_segment_entity.info.version, 1, "SegmentEntityInfo-Version was '%s' and not '1' as expected!" % fifth_segment_entity.info.version)
+        self.assertEqual(fifth_segment_entity.info.id, 4, "ID was '%s' and not '4' as expected!" % fifth_segment_entity.info.id)
+        self.assertEqual(fifth_segment_entity.info.group_id, 0, "Group ID was '%s' and not '0' as expected!" % fifth_segment_entity.info.group_id)
+        self.assertEqual(fifth_segment_entity.info.pre_interval.magnitude, 1000, "Pre-Interval was '%s' and not '1000' as expected!" % fifth_segment_entity.info.pre_interval.magnitude)
+        self.assertEqual(str(fifth_segment_entity.info.pre_interval.units), 'microsecond', "Pre-Interval unit was '%s' and not 'microsecond' as expected!" % str(fifth_segment_entity.info.pre_interval.units))
+        self.assertEqual(fifth_segment_entity.info.post_interval.magnitude, 2000, "Post-Interval was '%s' and not '2000' as expected!" % fifth_segment_entity.info.post_interval.magnitude)
+        self.assertEqual(str(fifth_segment_entity.info.post_interval.units), 'microsecond', "Post-Interval unit was '%s' and not 'microsecond' as expected!" % str(fifth_segment_entity.info.post_interval.units))
+        self.assertEqual(fifth_segment_entity.info.type, 'Cutout', "Type was '%s' and not 'Cutout' as expected!" % fifth_segment_entity.info.type)
+        self.assertEqual(fifth_segment_entity.info.count, 1, "Count of segments was '%s' and not '1' as expected!" % fifth_segment_entity.info.count)
+        self.assertEquals(fifth_segment_entity.info.source_channel_of_segment.keys(), [0], 
+                          "Source channel dataset index was different (was '%s' instead of '['0']')!" % fifth_segment_entity.info.source_channel_of_segment.keys()) 
+        self.assertEquals(fifth_segment_entity.info.source_channel_of_segment[0].channel_id, 4, 
+                          "Source channel ID was different (was '%s' instead of '4')!" % fifth_segment_entity.info.source_channel_of_segment[0].channel_id) 
+
+    def test_segment_data(self):
+        first_segment_entity = self.data.recordings[0].segment_streams[0].segment_entity[0]
+        self.assertEqual(first_segment_entity.segment_sample_count, 26, "Segment sample count was expected to be  but was %s!" % first_segment_entity.segment_sample_count)
+        signal = first_segment_entity.get_segment_in_range(0)
+        self.assertEqual(signal[0].shape, (2, 26), "Matrix of segment signal points was expected to be '(2,26)' but was '%s'!" % str(signal[0].shape))
+        self.assertEqual(str(signal[1]), 'volt', "Unit of segment signal was expected to be 'volt' but was '%s'!" % str(signal[1]))
+        signal_flat = first_segment_entity.get_segment_in_range(0, flat = True)
+        self.assertEqual(len(signal_flat[0]), 52, "Vector ('flat = True') of segment signal points was expected to be '52' but was '%s'!" % len(signal_flat[0]))
+        self.assertRaises(exceptions.IndexError, first_segment_entity.get_segment_in_range, segment_id = 0, flat = False, idx_start = 16, idx_end = 4)
+        self.assertRaises(exceptions.IndexError, first_segment_entity.get_segment_in_range, segment_id = 0, flat = False, idx_start = 40, idx_end = 49)
+        self.assertRaises(exceptions.IndexError, first_segment_entity.get_segment_in_range, segment_id = 0, flat = False, idx_start = -1, idx_end = 10)
+
+    def test_segment_data_timestamps(self):
+        first_segment_entity = self.data.recordings[0].segment_streams[0].segment_entity[0]
+        signal_ts = first_segment_entity.get_segment_sample_timestamps(0)
+        self.assertEqual(signal_ts[0].shape, (2, 26), "Matrix of segment timestamps was expected to be '(2,26)' but was '%s'!" % str(signal_ts[0].shape))
+        self.assertEqual(str(signal_ts[1]), 'microsecond', "Unit of timestamps was expected to be 'microsecond' but was '%s'!" % str(signal_ts[1]))
+        ts_selected = (signal_ts[0][:,0]).tolist()
+        expected_ts_first_segment = [943000, 945000]
+        self.assertEquals(ts_selected, expected_ts_first_segment, "Timestamps for the first segment were '%s' and not as expected '%s" % (ts_selected, expected_ts_first_segment))
+        ts_selected = (signal_ts[0][:,2]).tolist()
+        expected_ts_third_segment = [963000, 965000]
+        self.assertEquals(ts_selected, expected_ts_third_segment, "Timestamps for the third segment were '%s' and not as expected '%s" % (ts_selected, expected_ts_third_segment))
+        signal_flat_ts = first_segment_entity.get_segment_sample_timestamps(0, flat = True)
+        self.assertEqual(len(signal_flat_ts[0]), 52, "Vector ('flat = True') of segment signal points was expected to be '52' but was '%s'!" % len(signal_flat_ts[0]))
+        self.assertRaises(exceptions.IndexError, first_segment_entity.get_segment_sample_timestamps, segment_id = 0, flat = False, idx_start = 16, idx_end = 4)
+        self.assertRaises(exceptions.IndexError, first_segment_entity.get_segment_sample_timestamps, segment_id = 0, flat = False, idx_start = 40, idx_end = 49)
+        self.assertRaises(exceptions.IndexError, first_segment_entity.get_segment_sample_timestamps, segment_id = 0, flat = False, idx_start = -1, idx_end = 10)
+
+    # Test average segment streams:
+    def test_average_segment_stream_counts(self):
+        self.assertEqual(len(self.average_segments.recordings[0].segment_streams), 1, 'There should be one segment streams inside the recording!')
+        self.assertEqual(self.average_segments.recordings[0].segment_streams[0].data_subtype, 'Average', "The data subtype of the first segment stream should be 'Average'!")
+        self.assertEqual(len(self.average_segments.recordings[0].segment_streams[0].segment_entity), 11, 'There should be 11 average segment entities inside the stream!')
+
+    def test_average_segment_data(self):
+        first_average_segment_entity = self.average_segments.recordings[0].segment_streams[0].segment_entity[18]
+        self.assertEqual(first_average_segment_entity.number_of_averages, 8, "Number of averages was expected to be '8' but was %s!" % first_average_segment_entity.number_of_averages)
+
+    # Test timestamp streams:
+    def test_count_timestamp_streams(self):
+        self.assertEqual(len(self.data.recordings[0].timestamp_streams), 1, 'There should be only one timestamp stream inside the recording!')
+        self.assertEqual(len(self.data.recordings[0].timestamp_streams[0].timestamp_entity), 8, 
+                         'There should be 8 event entities inside the stream (found %s)!' % len(self.data.recordings[0].timestamp_streams[0].timestamp_entity))
+
+    def test_timestamp_stream_attributes(self):
+        first_timestamp_stream = self.data.recordings[0].timestamp_streams[0]
+        self.assertEqual(first_timestamp_stream.info_version, 1, "Version of the Stream-Info was %s and not as expected 1!" % first_timestamp_stream.info_version)
+        self.assertEqual(first_timestamp_stream.data_subtype, 'NeuralSpike', 'Timestamp stream data sub type is different from expected \'NeuralSpike\'!')
+        self.assertEqual(first_timestamp_stream.label, 'Spike Detector (1) Spike Timestamps', 'Timestamp stream label is different!')
+        self.assertEqual(str(first_timestamp_stream.source_stream_guid), 'a9d1ab04-2cf8-489c-a861-595e662fba4e', 'Timestamp stream source GUID is different!')
+        self.assertEqual(str(first_timestamp_stream.stream_guid), 'b71fc432-be6a-4135-9d15-3c7c1a4b4ed6', 'TimeStamp stream GUID is different!')
+        self.assertEqual(first_timestamp_stream.stream_type, 'TimeStamp', 'Timestamp stream type is different!')
+
+    def test_timestamp_infos(self):
+        first_timestamp_entity = self.data.recordings[0].timestamp_streams[0].timestamp_entity[0]
+        self.assertEqual(first_timestamp_entity.info.version, 1, "TimeStampEntityInfo-Version was '%s' and not '1' as expected!" % first_timestamp_entity.info.version)
+        self.assertEqual(first_timestamp_entity.info.id, 0, "ID is not as expected!")
+        self.assertEqual(first_timestamp_entity.info.group_id, 0, "Group ID is not as expected!")
+        self.assertEqual(first_timestamp_entity.info.data_type, 'Long', "DataType is not as expected!")
+        self.assertEqual(first_timestamp_entity.info.unit, 's', "Unit is not as expected (was %s instead of \'s\')!" % first_timestamp_entity.info.unit)
+        self.assertEqual(first_timestamp_entity.info.exponent, -6, "Exponent is not as expected (was %s instead of \'-6\')!" % first_timestamp_entity.info.exponent)
+        self.assertEqual(first_timestamp_entity.info.measuring_unit, 1 * ureg.us , 
+                          "Exponent is not as expected (was %s instead of \'us\')!" % first_timestamp_entity.info.measuring_unit)
+        self.assertEquals(first_timestamp_entity.info.source_channel_ids, [0],"Source channel IDs are different!") 
+        self.assertEquals(first_timestamp_entity.info.source_channel_labels.values(), 
+                           ["E1"],"Source channels label is different (was '%s' instead of '['E1']')!" % 
+                           first_timestamp_entity.info.source_channel_labels.values())
+
+    def test_timestamp_data(self):
+        first_timestamp_entity = self.data.recordings[0].timestamp_streams[0].timestamp_entity[0]
+        self.assertEqual(first_timestamp_entity.count, 26, "Count was expected to be 26 but was %s!" % first_timestamp_entity.count)
+        timestamps = first_timestamp_entity.get_timestamps()
+        self.assertEqual(timestamps[1], 1 * ureg.us, "Timestamp time unit was expected to be 'us' but was '%s'!" % timestamps[1])
+        expected_ts = [944000, 954000, 964000, 3030000, 3040000, 3052000, 
+                       3096000, 5104000, 5116000, 5126000, 7204000, 7212000, 
+                       7226000, 9290000, 9298000, 11376000, 11386000, 11442000, 
+                       13462000, 13472000, 13528000, 15548000, 15558000, 17634000, 
+                       17644000, 17686000]
+        self.assertEquals(timestamps[0][0].tolist(), expected_ts, "Timestamps of the first TS-Entity were '%s' and not as expected '%s" % (timestamps[0], expected_ts))
+
+if __name__ == '__main__':
+    unittest.main()

BIN
In-vivo/Calibration and longitudinal assessment/Day1-2/Calibration scripts/McsPy/Test/__init__.py


+ 54 - 0
In-vivo/Calibration and longitudinal assessment/Day1-2/Calibration scripts/McsPy/__init__.py

@@ -0,0 +1,54 @@
+"""
+    McsPy
+    ~~~~~
+
+    McsPy is a Python module/package to read, handle and operate on HDF5-based raw data
+    files converted from recordings of devices of the Multi Channel Systems MCS GmbH.
+
+    :copyright: (c) 2015 by Multi Channel Systems MCS GmbH
+    :license: see LICENSE for more details
+"""
+
+#print("McsPy init!")
+version = 0.02
+
+# Supported MCS-HDF5 protocol types and versions:
+class McsHdf5Protocols:
+    """
+    Class of supported MCS-HDF5 protocol types and version ranges
+
+    Entry: (Protocol Type Name => Tuple of supported version range from (including) the first version entry up to (including) the second version entry)
+    """
+    SUPPORTED_PROTOCOLS = {"RawData" : (1, 3),  # from first to second version number and including this versions
+                           "InfoChannel" : (1, 1), # Info-Object Versions
+                           "FrameEntityInfo" : (1, 1),
+                           "EventEntityInfo" : (1, 1),
+                           "SegmentEntityInfo" : (1, 1),
+                           "TimeStampEntityInfo" : (1, 1),
+                           "AnalogStreamInfoVersion" : (1, 1), # StreamInfo-Object Versions
+                           "FrameStreamInfoVersion" : (1, 1),
+                           "EventStreamInfoVersion" : (1, 1),
+                           "SegmentStreamInfoVersion" : (1, 1),
+                           "TimeStampStreamInfoVersion" : (1, 1)}
+
+    @classmethod
+    def check_protocol_type_version(self, protocol_type_name, version):
+        """
+        Check if the given version of a protocol is supported by the implementation
+
+        :param protocol_type_name: name of the protocol that is tested
+        :param version: version number that should be checked
+        :returns: is true if the given protocol and version is supported
+        """
+        if McsHdf5Protocols.SUPPORTED_PROTOCOLS.has_key(protocol_type_name):
+            supported_versions = McsHdf5Protocols.SUPPORTED_PROTOCOLS[protocol_type_name]
+            if (version < supported_versions[0]) or (supported_versions[1] < version):
+                raise IOError('Given HDF5 file contains \'%s\' type of version %s and supported are only all versions from %s up to %s' % 
+                               (protocol_type_name, version, supported_versions[0], supported_versions[1]))
+        else:
+            raise IOError("The given HDF5 contains a type \'%s\' that is unknown in this implementation!" % protocol_type_name)
+        return True
+
+from pint import UnitRegistry
+ureg = UnitRegistry()
+Q_ = ureg.Quantity

BIN
In-vivo/Calibration and longitudinal assessment/Day1-2/Calibration scripts/McsPy/__init__.pyc


BIN
In-vivo/Calibration and longitudinal assessment/Day1-2/Calibration scripts/McsPy/__pycache__/__init__.cpython-37.pyc


BIN
In-vivo/Calibration and longitudinal assessment/Day1-2/CalibrationFile/Cal-Gm20190731_033840.h5


+ 23 - 0
In-vivo/Calibration and longitudinal assessment/Day1-2/IV charact/20190731_033840 Current vs Vgs

@@ -0,0 +1,23 @@
+Vgs [V]	Result A5 [µA]	Result A7 [µA]	Result A29 [µA]	Result A31 [µA]	Result B5 [µA]	Result B7 [µA]	Result B29 [µA]	Result B31 [µA]
+0	72,16	78,74	6,53	77,15	85,34	71,90	68,68	69,99
+0,019047619047619	71,00	77,41	6,27	75,90	83,79	70,54	67,37	68,87
+0,0380952380952381	70,01	76,25	6,07	74,84	82,47	69,39	66,27	67,97
+0,0571428571428571	68,64	74,67	5,84	73,37	80,71	67,88	64,83	66,69
+0,0761904761904762	67,34	73,18	5,61	71,99	79,02	66,45	63,49	65,52
+0,0952380952380952	65,54	71,14	5,35	70,07	76,81	64,56	61,70	63,90
+0,114285714285714	64,01	69,38	5,15	68,45	74,88	62,89	60,14	62,53
+0,133333333333333	61,96	67,07	4,84	66,26	72,37	60,72	58,11	60,66
+0,152380952380952	59,96	64,82	4,61	64,14	69,97	58,68	56,19	58,90
+0,171428571428571	57,52	62,10	4,34	61,51	66,99	56,12	53,77	56,62
+0,19047619047619	55,20	59,50	4,08	59,04	64,18	53,71	51,50	54,53
+0,20952380952381	52,42	56,43	3,80	56,09	60,85	50,87	48,80	51,95
+0,228571428571429	49,65	53,32	3,51	53,13	57,48	47,96	46,06	49,33
+0,247619047619048	46,48	49,74	3,20	49,73	53,62	44,63	42,88	46,24
+0,266666666666667	43,44	46,29	2,88	46,44	49,89	41,47	39,82	43,28
+0,285714285714286	39,97	42,38	2,58	42,67	45,70	37,95	36,32	39,83
+0,304761904761905	36,57	38,51	2,27	38,91	41,50	34,49	32,84	36,39
+0,323809523809524	32,87	34,46	1,99	34,87	37,08	30,84	29,15	32,64
+0,342857142857143	29,46	30,76	1,75	31,16	32,98	27,42	25,80	29,05
+0,361904761904762	26,21	27,33	1,52	27,64	29,11	24,12	22,75	25,55
+0,380952380952381	23,40	24,47	1,37	24,62	25,85	21,32	20,34	22,55
+0,4	21,22	22,34	1,29	22,37	23,30	19,09	18,68	20,19

+ 23 - 0
In-vivo/Calibration and longitudinal assessment/Day1-2/IV charact/20190731_033840 Current vs Vgs_5sStep.txt

@@ -0,0 +1,23 @@
+Vgs [V]	Result A5 [µA]	Result A7 [µA]	Result A29 [µA]	Result A31 [µA]	Result B5 [µA]	Result B7 [µA]	Result B29 [µA]	Result B31 [µA]
+0	72,16	78,74	6,53	77,15	85,34	71,90	68,68	69,99
+0,019047619047619	71,00	77,41	6,27	75,90	83,79	70,54	67,37	68,87
+0,0380952380952381	70,01	76,25	6,07	74,84	82,47	69,39	66,27	67,97
+0,0571428571428571	68,64	74,67	5,84	73,37	80,71	67,88	64,83	66,69
+0,0761904761904762	67,34	73,18	5,61	71,99	79,02	66,45	63,49	65,52
+0,0952380952380952	65,54	71,14	5,35	70,07	76,81	64,56	61,70	63,90
+0,114285714285714	64,01	69,38	5,15	68,45	74,88	62,89	60,14	62,53
+0,133333333333333	61,96	67,07	4,84	66,26	72,37	60,72	58,11	60,66
+0,152380952380952	59,96	64,82	4,61	64,14	69,97	58,68	56,19	58,90
+0,171428571428571	57,52	62,10	4,34	61,51	66,99	56,12	53,77	56,62
+0,19047619047619	55,20	59,50	4,08	59,04	64,18	53,71	51,50	54,53
+0,20952380952381	52,42	56,43	3,80	56,09	60,85	50,87	48,80	51,95
+0,228571428571429	49,65	53,32	3,51	53,13	57,48	47,96	46,06	49,33
+0,247619047619048	46,48	49,74	3,20	49,73	53,62	44,63	42,88	46,24
+0,266666666666667	43,44	46,29	2,88	46,44	49,89	41,47	39,82	43,28
+0,285714285714286	39,97	42,38	2,58	42,67	45,70	37,95	36,32	39,83
+0,304761904761905	36,57	38,51	2,27	38,91	41,50	34,49	32,84	36,39
+0,323809523809524	32,87	34,46	1,99	34,87	37,08	30,84	29,15	32,64
+0,342857142857143	29,46	30,76	1,75	31,16	32,98	27,42	25,80	29,05
+0,361904761904762	26,21	27,33	1,52	27,64	29,11	24,12	22,75	25,55
+0,380952380952381	23,40	24,47	1,37	24,62	25,85	21,32	20,34	22,55
+0,4	21,22	22,34	1,29	22,37	23,30	19,09	18,68	20,19

File diff suppressed because it is too large
+ 1337 - 0
In-vivo/Calibration and longitudinal assessment/Day1-2/IV charact/20190731_033840 Current vs time


+ 23 - 0
In-vivo/Calibration and longitudinal assessment/Day1-2/IV charact/20190731_035018 Current vs Vgs

@@ -0,0 +1,23 @@
+Vgs [V]	Result A5 [µA]	Result A7 [µA]	Result A29 [µA]	Result A31 [µA]	Result B5 [µA]	Result B7 [µA]	Result B29 [µA]	Result B31 [µA]
+0	71,62	78,15	6,58	76,79	85,51	71,76	68,89	69,93
+0,019047619047619	70,69	77,04	6,32	75,75	84,11	70,52	67,60	68,87
+0,0380952380952381	69,78	75,93	6,12	74,81	82,85	69,39	66,50	68,00
+0,0571428571428571	68,43	74,37	5,88	73,40	81,12	67,88	65,06	66,77
+0,0761904761904762	67,13	72,86	5,69	72,01	79,48	66,52	63,74	65,62
+0,0952380952380952	65,32	70,83	5,40	70,10	77,28	64,67	61,99	64,04
+0,114285714285714	63,73	69,03	5,14	68,43	75,35	63,01	60,44	62,66
+0,133333333333333	61,62	66,65	4,85	66,20	72,81	60,82	58,39	60,78
+0,152380952380952	59,60	64,40	4,65	64,06	70,39	58,78	56,49	59,04
+0,171428571428571	57,06	61,59	4,37	61,39	67,39	56,20	54,07	56,75
+0,19047619047619	54,62	58,88	4,06	58,82	64,50	53,71	51,75	54,59
+0,20952380952381	51,76	55,73	3,79	55,78	61,14	50,82	49,02	51,98
+0,228571428571429	48,82	52,50	3,47	52,67	57,63	47,90	46,24	49,30
+0,247619047619048	45,43	48,77	3,17	49,08	53,58	44,50	43,00	46,11
+0,266666666666667	42,13	45,10	2,86	45,58	49,64	41,18	39,81	42,98
+0,285714285714286	38,41	40,96	2,57	41,58	45,19	37,45	36,16	39,36
+0,304761904761905	34,71	36,84	2,28	37,57	40,77	33,81	32,50	35,69
+0,323809523809524	30,75	32,52	1,98	33,30	36,06	29,92	28,65	31,70
+0,342857142857143	31,87	33,64	3,54	34,49	37,33	31,25	30,10	33,10
+0,361904761904762	23,43	24,70	1,50	25,54	27,32	22,54	21,79	24,08
+0,380952380952381	20,78	21,98	1,38	22,54	23,96	19,81	19,43	21,10
+0,4	19,02	20,18	1,31	20,41	21,47	17,85	17,94	18,92

+ 23 - 0
In-vivo/Calibration and longitudinal assessment/Day1-2/IV charact/20190731_035018 Current vs Vgs_20sStep.txt

@@ -0,0 +1,23 @@
+Vgs [V]	Result A5 [µA]	Result A7 [µA]	Result A29 [µA]	Result A31 [µA]	Result B5 [µA]	Result B7 [µA]	Result B29 [µA]	Result B31 [µA]
+0	71,62	78,15	6,58	76,79	85,51	71,76	68,89	69,93
+0,019047619047619	70,69	77,04	6,32	75,75	84,11	70,52	67,60	68,87
+0,0380952380952381	69,78	75,93	6,12	74,81	82,85	69,39	66,50	68,00
+0,0571428571428571	68,43	74,37	5,88	73,40	81,12	67,88	65,06	66,77
+0,0761904761904762	67,13	72,86	5,69	72,01	79,48	66,52	63,74	65,62
+0,0952380952380952	65,32	70,83	5,40	70,10	77,28	64,67	61,99	64,04
+0,114285714285714	63,73	69,03	5,14	68,43	75,35	63,01	60,44	62,66
+0,133333333333333	61,62	66,65	4,85	66,20	72,81	60,82	58,39	60,78
+0,152380952380952	59,60	64,40	4,65	64,06	70,39	58,78	56,49	59,04
+0,171428571428571	57,06	61,59	4,37	61,39	67,39	56,20	54,07	56,75
+0,19047619047619	54,62	58,88	4,06	58,82	64,50	53,71	51,75	54,59
+0,20952380952381	51,76	55,73	3,79	55,78	61,14	50,82	49,02	51,98
+0,228571428571429	48,82	52,50	3,47	52,67	57,63	47,90	46,24	49,30
+0,247619047619048	45,43	48,77	3,17	49,08	53,58	44,50	43,00	46,11
+0,266666666666667	42,13	45,10	2,86	45,58	49,64	41,18	39,81	42,98
+0,285714285714286	38,41	40,96	2,57	41,58	45,19	37,45	36,16	39,36
+0,304761904761905	34,71	36,84	2,28	37,57	40,77	33,81	32,50	35,69
+0,323809523809524	30,75	32,52	1,98	33,30	36,06	29,92	28,65	31,70
+0,342857142857143	31,87	33,64	3,54	34,49	37,33	31,25	30,10	33,10
+0,361904761904762	23,43	24,70	1,50	25,54	27,32	22,54	21,79	24,08
+0,380952380952381	20,78	21,98	1,38	22,54	23,96	19,81	19,43	21,10
+0,4	19,02	20,18	1,31	20,41	21,47	17,85	17,94	18,92

File diff suppressed because it is too large
+ 6444 - 0
In-vivo/Calibration and longitudinal assessment/Day1-2/IV charact/20190731_035018 Current vs time


File diff suppressed because it is too large
+ 6444 - 0
In-vivo/Calibration and longitudinal assessment/Day1-2/IV charact/20190731_035018 Current vs time.txt


BIN
In-vivo/Calibration and longitudinal assessment/Day1-2/IV charact/20190731_115211 Current vs Vgs


BIN
In-vivo/Calibration and longitudinal assessment/Day1-2/IV charact/20190731_115239 Current vs Vgs


+ 19 - 0
In-vivo/Calibration and longitudinal assessment/Day1-2/IV charact/20190731_115540 Current vs Vgs_5sStep-afterRec2

@@ -0,0 +1,19 @@
+Vgs [V]	Result A5 [µA]	Result A7 [µA]	Result A29 [µA]	Result A31 [µA]	Result B5 [µA]	Result B7 [µA]	Result B29 [µA]	Result B31 [µA]
+0	58,04	63,17	4,49	61,92	68,89	57,21	55,46	57,87
+0,0264705882352941	56,06	60,85	4,20	59,78	66,20	54,96	53,29	55,94
+0,0529411764705882	54,01	58,47	3,98	57,61	63,59	52,78	51,23	54,07
+0,0794117647058824	51,45	55,57	3,67	54,91	60,46	50,09	48,71	51,69
+0,105882352941176	48,74	52,53	3,39	52,05	57,13	47,32	46,10	49,21
+0,132352941176471	45,71	49,11	3,11	48,86	53,44	44,25	43,19	46,36
+0,158823529411765	42,43	45,43	2,83	45,40	49,52	40,95	40,07	43,25
+0,185294117647059	39,08	41,71	2,58	41,87	45,54	37,67	36,87	40,09
+0,211764705882353	35,35	37,53	2,29	37,88	41,05	34,04	33,26	36,43
+0,238235294117647	31,63	33,47	2,05	33,95	36,62	30,56	29,76	32,81
+0,264705882352941	27,71	29,33	1,79	29,84	32,05	26,93	26,11	28,92
+0,291176470588235	24,28	25,76	1,60	26,22	28,03	23,66	22,96	25,41
+0,317647058823529	21,33	22,68	1,45	23,03	24,52	20,68	20,29	22,14
+0,344117647058824	19,39	20,64	1,38	20,82	21,97	18,51	18,57	19,77
+0,370588235294118	18,58	19,66	1,39	19,66	20,41	17,36	17,90	18,41
+0,397058823529412	18,94	19,79	1,47	19,61	19,96	17,36	18,34	18,20
+0,423529411764706	20,18	20,81	1,60	20,43	20,39	18,28	19,61	18,91
+0,45	21,66	22,28	3,08	21,88	21,60	19,91	21,50	20,35

+ 19 - 0
In-vivo/Calibration and longitudinal assessment/Day1-2/IV charact/20190731_115540 Current vs Vgs_5sStep-afterRec2.txt

@@ -0,0 +1,19 @@
+Vgs [V]	Result A5 [µA]	Result A7 [µA]	Result A29 [µA]	Result A31 [µA]	Result B5 [µA]	Result B7 [µA]	Result B29 [µA]	Result B31 [µA]
+0	58,04	63,17	4,49	61,92	68,89	57,21	55,46	57,87
+0,0264705882352941	56,06	60,85	4,20	59,78	66,20	54,96	53,29	55,94
+0,0529411764705882	54,01	58,47	3,98	57,61	63,59	52,78	51,23	54,07
+0,0794117647058824	51,45	55,57	3,67	54,91	60,46	50,09	48,71	51,69
+0,105882352941176	48,74	52,53	3,39	52,05	57,13	47,32	46,10	49,21
+0,132352941176471	45,71	49,11	3,11	48,86	53,44	44,25	43,19	46,36
+0,158823529411765	42,43	45,43	2,83	45,40	49,52	40,95	40,07	43,25
+0,185294117647059	39,08	41,71	2,58	41,87	45,54	37,67	36,87	40,09
+0,211764705882353	35,35	37,53	2,29	37,88	41,05	34,04	33,26	36,43
+0,238235294117647	31,63	33,47	2,05	33,95	36,62	30,56	29,76	32,81
+0,264705882352941	27,71	29,33	1,79	29,84	32,05	26,93	26,11	28,92
+0,291176470588235	24,28	25,76	1,60	26,22	28,03	23,66	22,96	25,41
+0,317647058823529	21,33	22,68	1,45	23,03	24,52	20,68	20,29	22,14
+0,344117647058824	19,39	20,64	1,38	20,82	21,97	18,51	18,57	19,77
+0,370588235294118	18,58	19,66	1,39	19,66	20,41	17,36	17,90	18,41
+0,397058823529412	18,94	19,79	1,47	19,61	19,96	17,36	18,34	18,20
+0,423529411764706	20,18	20,81	1,60	20,43	20,39	18,28	19,61	18,91
+0,45	21,66	22,28	3,08	21,88	21,60	19,91	21,50	20,35

File diff suppressed because it is too large
+ 1119 - 0
In-vivo/Calibration and longitudinal assessment/Day1-2/IV charact/20190731_115540 Current vs time_5sStep-afterRec2


+ 19 - 0
In-vivo/Calibration and longitudinal assessment/Day1-2/IV charact/20190801_031608 Current vs Vgs5s-afterRec6-highRange

@@ -0,0 +1,19 @@
+Vgs [V]	Result A5 [µA]	Result A7 [µA]	Result A29 [µA]	Result A31 [µA]	Result B5 [µA]	Result B7 [µA]	Result B29 [µA]	Result B31 [µA]
+0	55,64	60,65	4,20	59,73	63,98	55,12	53,07	55,04
+0,0264705882352941	53,73	58,44	3,93	57,60	61,18	52,86	50,87	53,14
+0,0529411764705882	51,48	55,92	3,67	55,23	58,34	50,46	48,59	51,09
+0,0794117647058824	48,70	52,83	3,41	52,29	54,99	47,64	45,95	48,60
+0,105882352941176	45,82	49,61	3,12	49,19	51,49	44,66	43,14	45,96
+0,132352941176471	42,57	45,97	2,84	45,70	47,69	41,41	40,06	42,99
+0,158823529411765	39,12	42,12	2,57	41,98	43,69	37,97	36,73	39,75
+0,185294117647059	35,58	38,18	2,34	38,14	39,62	34,53	33,32	36,41
+0,211764705882353	31,76	33,96	2,04	33,97	35,29	30,88	29,66	32,73
+0,238235294117647	28,08	30,02	1,83	30,00	31,24	27,40	26,22	29,13
+0,264705882352941	24,60	26,31	1,63	26,27	27,42	24,04	23,02	25,54
+0,291176470588235	21,86	23,42	1,49	23,35	24,39	21,27	20,56	22,52
+0,317647058823529	19,92	21,31	1,42	21,28	22,12	19,10	18,88	20,13
+0,344117647058824	19,09	20,27	1,48	20,29	20,86	17,98	18,35	18,80
+0,370588235294118	19,26	20,16	1,54	20,18	20,43	17,87	18,76	18,45
+0,397058823529412	20,36	20,99	1,67	20,92	20,90	18,73	20,03	19,02
+0,423529411764706	22,12	22,57	1,84	22,29	22,16	20,27	21,87	20,33
+0,45	24,33	24,74	2,03	24,17	24,04	22,33	24,14	22,14

+ 19 - 0
In-vivo/Calibration and longitudinal assessment/Day1-2/IV charact/20190801_031608 Current vs Vgs5s-afterRec6-highRange.txt

@@ -0,0 +1,19 @@
+Vgs [V]	Result A5 [µA]	Result A7 [µA]	Result A29 [µA]	Result A31 [µA]	Result B5 [µA]	Result B7 [µA]	Result B29 [µA]	Result B31 [µA]
+0	55,64	60,65	4,20	59,73	63,98	55,12	53,07	55,04
+0,0264705882352941	53,73	58,44	3,93	57,60	61,18	52,86	50,87	53,14
+0,0529411764705882	51,48	55,92	3,67	55,23	58,34	50,46	48,59	51,09
+0,0794117647058824	48,70	52,83	3,41	52,29	54,99	47,64	45,95	48,60
+0,105882352941176	45,82	49,61	3,12	49,19	51,49	44,66	43,14	45,96
+0,132352941176471	42,57	45,97	2,84	45,70	47,69	41,41	40,06	42,99
+0,158823529411765	39,12	42,12	2,57	41,98	43,69	37,97	36,73	39,75
+0,185294117647059	35,58	38,18	2,34	38,14	39,62	34,53	33,32	36,41
+0,211764705882353	31,76	33,96	2,04	33,97	35,29	30,88	29,66	32,73
+0,238235294117647	28,08	30,02	1,83	30,00	31,24	27,40	26,22	29,13
+0,264705882352941	24,60	26,31	1,63	26,27	27,42	24,04	23,02	25,54
+0,291176470588235	21,86	23,42	1,49	23,35	24,39	21,27	20,56	22,52
+0,317647058823529	19,92	21,31	1,42	21,28	22,12	19,10	18,88	20,13
+0,344117647058824	19,09	20,27	1,48	20,29	20,86	17,98	18,35	18,80
+0,370588235294118	19,26	20,16	1,54	20,18	20,43	17,87	18,76	18,45
+0,397058823529412	20,36	20,99	1,67	20,92	20,90	18,73	20,03	19,02
+0,423529411764706	22,12	22,57	1,84	22,29	22,16	20,27	21,87	20,33
+0,45	24,33	24,74	2,03	24,17	24,04	22,33	24,14	22,14

File diff suppressed because it is too large
+ 1090 - 0
In-vivo/Calibration and longitudinal assessment/Day1-2/IV charact/20190801_031608 Current vs time5s-afterRec6-highRange


+ 23 - 0
In-vivo/Calibration and longitudinal assessment/Day1-2/IV charact/B12784O18-T2-InVivo-VgsSweep1

@@ -0,0 +1,23 @@
+Date/Time	Vgs	Vds	Vref	AD/DC (Top)	AC/DC (Bottom)	Calibration	Headstage SN (Top)	Headstage SN (Bottom)
+31.07.2019 15:35:12	0	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+31.07.2019 15:35:18	0,019047619047619	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+31.07.2019 15:35:24	0,0380952380952381	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+31.07.2019 15:35:30	0,0571428571428571	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+31.07.2019 15:35:36	0,0761904761904762	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+31.07.2019 15:35:43	0,0952380952380952	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+31.07.2019 15:35:48	0,114285714285714	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+31.07.2019 15:35:54	0,133333333333333	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+31.07.2019 15:36:01	0,152380952380952	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+31.07.2019 15:36:07	0,171428571428571	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+31.07.2019 15:36:13	0,19047619047619	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+31.07.2019 15:36:18	0,20952380952381	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+31.07.2019 15:36:25	0,228571428571429	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+31.07.2019 15:36:31	0,247619047619048	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+31.07.2019 15:36:37	0,266666666666667	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+31.07.2019 15:36:43	0,285714285714286	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+31.07.2019 15:36:49	0,304761904761905	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+31.07.2019 15:36:55	0,323809523809524	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+31.07.2019 15:37:01	0,342857142857143	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+31.07.2019 15:37:07	0,361904761904762	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+31.07.2019 15:37:13	0,380952380952381	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+31.07.2019 15:37:19	0,4	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  

+ 23 - 0
In-vivo/Calibration and longitudinal assessment/Day1-2/IV charact/B12784O18-T2-InVivo-VgsSweep20s

@@ -0,0 +1,23 @@
+Date/Time	Vgs	Vds	Vref	AD/DC (Top)	AC/DC (Bottom)	Calibration	Headstage SN (Top)	Headstage SN (Bottom)
+31.07.2019 15:39:29	0	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+31.07.2019 15:39:51	0,019047619047619	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+31.07.2019 15:40:13	0,0380952380952381	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+31.07.2019 15:40:36	0,0571428571428571	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+31.07.2019 15:40:58	0,0761904761904762	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+31.07.2019 15:41:21	0,0952380952380952	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+31.07.2019 15:41:44	0,114285714285714	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+31.07.2019 15:42:06	0,133333333333333	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+31.07.2019 15:42:29	0,152380952380952	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+31.07.2019 15:42:51	0,171428571428571	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+31.07.2019 15:43:14	0,19047619047619	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+31.07.2019 15:43:37	0,20952380952381	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+31.07.2019 15:44:00	0,228571428571429	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+31.07.2019 15:44:22	0,247619047619048	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+31.07.2019 15:44:44	0,266666666666667	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+31.07.2019 15:45:07	0,285714285714286	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+31.07.2019 15:45:29	0,304761904761905	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+31.07.2019 15:45:52	0,323809523809524	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+31.07.2019 15:48:42	0,342857142857143	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+31.07.2019 15:49:05	0,361904761904762	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+31.07.2019 15:49:27	0,380952380952381	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+31.07.2019 15:49:50	0,4	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  

+ 23 - 0
In-vivo/Calibration and longitudinal assessment/Day1-2/IV charact/B12784O18-T2-InVivo-VgsSweep5s-afterRec2

@@ -0,0 +1,23 @@
+Date/Time	Vgs	Vds	Vref	AD/DC (Top)	AC/DC (Bottom)	Calibration	Headstage SN (Top)	Headstage SN (Bottom)
+31.07.2019 23:49:16	0	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+31.07.2019 23:49:22	0,019047619047619	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+31.07.2019 23:49:28	0,0380952380952381	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+31.07.2019 23:49:34	0,0571428571428571	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+31.07.2019 23:49:40	0,0761904761904762	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+31.07.2019 23:49:46	0,0952380952380952	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+31.07.2019 23:49:52	0,114285714285714	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+31.07.2019 23:49:58	0,133333333333333	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+31.07.2019 23:50:04	0,152380952380952	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+31.07.2019 23:50:11	0,171428571428571	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+31.07.2019 23:50:17	0,19047619047619	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+31.07.2019 23:50:22	0,20952380952381	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+31.07.2019 23:50:28	0,228571428571429	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+31.07.2019 23:50:35	0,247619047619048	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+31.07.2019 23:50:41	0,266666666666667	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+31.07.2019 23:50:47	0,285714285714286	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+31.07.2019 23:50:53	0,304761904761905	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+31.07.2019 23:50:59	0,323809523809524	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+31.07.2019 23:51:05	0,342857142857143	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+31.07.2019 23:51:11	0,361904761904762	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+31.07.2019 23:51:17	0,380952380952381	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+31.07.2019 23:51:23	0,4	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  

+ 19 - 0
In-vivo/Calibration and longitudinal assessment/Day1-2/IV charact/B12784O18-T2-InVivo-VgsSweep5s-afterRec2-highRange

@@ -0,0 +1,19 @@
+Date/Time	Vgs	Vds	Vref	AD/DC (Top)	AC/DC (Bottom)	Calibration	Headstage SN (Top)	Headstage SN (Bottom)
+31.07.2019 23:53:26	0,15	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+31.07.2019 23:53:32	0,167647058823529	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+31.07.2019 23:53:39	0,185294117647059	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+31.07.2019 23:53:45	0,202941176470588	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+31.07.2019 23:53:51	0,220588235294118	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+31.07.2019 23:53:57	0,238235294117647	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+31.07.2019 23:54:03	0,255882352941176	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+31.07.2019 23:54:09	0,273529411764706	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+31.07.2019 23:54:15	0,291176470588235	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+31.07.2019 23:54:21	0,308823529411765	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+31.07.2019 23:54:27	0,326470588235294	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+31.07.2019 23:54:33	0,344117647058824	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+31.07.2019 23:54:39	0,361764705882353	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+31.07.2019 23:54:46	0,379411764705882	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+31.07.2019 23:54:52	0,397058823529412	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+31.07.2019 23:54:58	0,414705882352941	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+31.07.2019 23:55:04	0,432352941176471	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+31.07.2019 23:55:11	0,45	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  

+ 19 - 0
In-vivo/Calibration and longitudinal assessment/Day1-2/IV charact/B12784O18-T2-InVivo-VgsSweep5s-afterRec6-highRange

@@ -0,0 +1,19 @@
+Date/Time	Vgs	Vds	Vref	AD/DC (Top)	AC/DC (Bottom)	Calibration	Headstage SN (Top)	Headstage SN (Bottom)
+01.08.2019 15:13:46	0,15	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+01.08.2019 15:13:52	0,167647058823529	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+01.08.2019 15:13:58	0,185294117647059	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+01.08.2019 15:14:04	0,202941176470588	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+01.08.2019 15:14:10	0,220588235294118	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+01.08.2019 15:14:16	0,238235294117647	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+01.08.2019 15:14:22	0,255882352941176	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+01.08.2019 15:14:28	0,273529411764706	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+01.08.2019 15:14:34	0,291176470588235	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+01.08.2019 15:14:40	0,308823529411765	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+01.08.2019 15:14:46	0,326470588235294	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+01.08.2019 15:14:52	0,344117647058824	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+01.08.2019 15:14:58	0,361764705882353	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+01.08.2019 15:15:04	0,379411764705882	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+01.08.2019 15:15:11	0,397058823529412	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+01.08.2019 15:15:16	0,414705882352941	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+01.08.2019 15:15:22	0,432352941176471	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  
+01.08.2019 15:15:29	0,45	0,1	1,25	DC	DC	76	SN:0001 / Type: W32 (Custom HS 60) BC_Top 	SN:0002 / Type: W32 (Custom HS 61)  

+ 1 - 0
In-vivo/Calibration and longitudinal assessment/Day1-2/Raw Data/2019-07-31T18-00-05B12784O18-T2-Longterm-Rec2.h5

@@ -0,0 +1 @@
+/annex/objects/MD5-s668660023--1a26502f9fdb24e7428b9cab7e48af29

+ 1 - 0
In-vivo/Calibration and longitudinal assessment/Day1-2/Raw Data/2019-07-31T18-00-05B12784O18-T2-Longterm-Rec2_2.h5

@@ -0,0 +1 @@
+/annex/objects/MD5-s659198330--1e310faf1237f2e3559d78347e441f53

+ 1 - 0
In-vivo/Calibration and longitudinal assessment/Day1-2/Raw Data/2019-08-01T15-46-48B12784O18-T2-1uA.h5

@@ -0,0 +1 @@
+/annex/objects/MD5-s436800443--226d52502eda260b535312361e335b08

+ 1 - 0
In-vivo/Calibration and longitudinal assessment/Day1-2/Raw Data/2019-08-01T15-46-48B12784O18-T2-1uA_2.h5

@@ -0,0 +1 @@
+/annex/objects/MD5-s425975553--240a35ce94259e58f307a432782c5280

BIN
In-vivo/Calibration and longitudinal assessment/Day1-2/Recording notes-day1-2.xlsx