Testint NeuralynxIO.py from Neo.io

DW 2015.12.04


In [1]:
import numpy as np
import matplotlib.pyplot as plt
from scipy.signal import medfilt, triang
from neo import io 
import gitInformation
import quantities as pq
import os

In [2]:
%matplotlib inline

In [3]:
gitInformation.printInformation()


Information about this notebook
============================================================
Date: 2016-01-05
Python Version: 2.7.10 |Anaconda 2.3.0 (64-bit)| (default, May 28 2015, 16:44:52) [MSC v.1500 64 bit (AMD64)]
Git directory: C:\Users\Dominik\Documents\GitRep\kt-2015-DSPHandsOn\.git
Current git SHA: aa3853e0374225c26d947dd83698e78c9c013954
Remotes: fork, origin, 
Current branch: master
fork remote URL: http://github.com/dowa4213/kt-2015-DSPHandsOn.git
origin remote URL: https://github.com/ktakagaki/kt-2015-DSPHandsOn.git

In [4]:
cachedir = 'C:\\Users\\Dominik\\Documents\\GitRep\\kt-2015-DSPHandsOn\\MedianFilter\\Python\\07. Real Data'

In [5]:
NIO = io.NeuralynxIO(sessiondir = cachedir, cachedir = cachedir, print_diagnostic=True)
block = NIO.read_block(events=True)
seg = block.segments[0]
analogsignal = seg.analogsignalarrays[0]


NeuralynxIO: Calculating hash of session files to check for cached parameter files.
NeuralynxIO: Ignoring file of unknown data type Comparison between DTW and fast DTW.ipynb
NeuralynxIO: Ignoring file of unknown data type Medfilt, Threshold.ipynb
NeuralynxIO: Ignoring file of unknown data type Neo NeuralynxIO.ipynb
NeuralynxIO: Ignoring file of unknown data type Real data median filter.ipynb
NeuralynxIO: Starting individual file checks.
NeuralynxIO: 
Detected 1 .ncs file(s).
NeuralynxIO: Scanning CSC2_2906522576_3004694900.ncs.
NeuralynxIO: NCS packet check successful.
NeuralynxIO: Successfully decoded text header of file (CSC2_2906522576_3004694900.ncs).
NeuralynxIO: 
Detected 0 .nse file(s).
NeuralynxIO: 
Detected 0 .nev file(s).
NeuralynxIO: 
Detected 0 .ntt file(s).
NeuralynxIO: Initialized IO for session C:\Users\Dominik\Documents\GitRep\kt-2015-DSPHandsOn\MedianFilter\Python\07. Real Data
NeuralynxIO: Can not load nse of channel 1. No corresponding nse file present.
NeuralynxIO: Can not load ntt of channel 1. No corresponding ntt file present.

In [6]:
plt.figure(figsize=(30,7))
plt.plot(analogsignal.times.rescale(pq.ms), analogsignal.magnitude)


Out[6]:
[<matplotlib.lines.Line2D at 0x18408588>]