コード例 #1
0
ファイル: plot_mcdl_data.py プロジェクト: psilentp/Haltere
outroot = '/Volumes/Untitled/ConvertedVideo/'
#inroot = '/media/Data/HighSpeedVideo/'

videos = ['Fly_2_M_C001H001S0001',
         'Fly_2_M_C001H001S0002',
         'Fly_2_M_C001H001S0003',
         'Fly_2_M_C001H001S0005']
         
"""
videos = ['fly14_wba_C001H001S0001',
          'fly14_wba_C001H001S0003',
          'fly15_wba_C001H001S0001',
          'fly15_wba_C001H001S0002',
          'fly15_wba_C001H001S0003',
          'fly16_wba_C001H001S0001']
"""

outdirs = [outroot + fly + '_conv/' for fly in videos]

mcdl_files = [dname + vname + '.mcd' for dname,vname in zip(outdirs,videos)]


lmr = [read_mcdl(f)[1]['A2'] - read_mcdl(f)[1]['A3'] for f in mcdl_files]

for i,signal in enumerate(lmr):
    plb.subplot(len(lmr),1,i+1)    
    plb.plot(signal)
    ax = plb.gca()
    ax.set_title(videos[i])
    
plb.show()
コード例 #2
0
ファイル: Analysis_3_7.py プロジェクト: psilentp/Haltere
# -*- coding: utf-8 -*-
"""
Created on Thu Mar 14 16:29:45 2013

@author: psilentp

Anylize the Wingbeat anylizer data from the first set of Flight arena exp.
"""


import read_mcdl as rmcd
import pylab as plb
testset = [(1,3),(2,1),(2,2),(2,3),(2,4),(3,1),(3,2),(3,4),(4,1),(4,7),(4,8),(4,9),(5,2),(5,4),(5,6),(5,7)]
traces = list()
for tup in testset:
    fn = '/media/2AFED5CA7343D0E2/HighSpeedVideo/PH_fly%s_C001H001S000%s/PH_fly%s_C001H001S000%s.mcd'%(tup[0],tup[1],tup[0],tup[1])
    read_data,frame_data = rmcd.read_mcdl(fn)
    plb.plot(frame_data['A2']-frame_data['A3'],'k',alpha = 0.3)
    traces.append(frame_data['A2']-frame_data['A3'])