Pytrigger

quick and dirty trigger detection.

datapdf = '/home/danc/data/e,rfhp1.0Hz,COH'
ch = channel.index(datapdf, 'trig')
 d = data.read(datapdf)
d.getdata(0, d.pnts_in_file, ch.channelindexhdr)
uvals,nzind,nz=trigger.vals(d.data_block)
i=trigger.ind(uvals, nzind,nz)

so the indexes to the start of all nonzero values in the trigger channels are.

0, 678, 1356, 2034, 2712

lets plot the trigger channel of this COH file.

figure();plot(d.data_block);show()

trigdetpng.png
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License