bgamari / photon-tools

Python utilities for working with photon timestamp data from fluorescence spectroscopy experiments
GNU General Public License v3.0
13 stars 6 forks source link

fcs-corr troubleshooting #5

Open lejeanseb opened 6 years ago

lejeanseb commented 6 years ago

After install photon-tools as describe in your git hub page I found some troubleshooting. In fact, if I execute “$ fcs-corr --min-lag=1e-6 --max-lag=1 myfile.timetag” an error appears :”Favia threw an error: exit code 1” “sorry, option ALT+’\x7f’ not yet implemented.\n” I tested Favia program in many ways but just help function work… My setup was a Raspberry pi3 Thanks for advice J.Seb

ywsong2 commented 6 years ago

Is there a sample file for .timech file? I have raw data that has channel and time stamp but I want to see exact format of .timech file if you have.

Thank you very much! -Song

bgamari commented 6 years ago

I don't have one off hand but it's quite straightforward to generate one. For instance,

import numpy as np

# Here are a few events, represented as (timestamp, channel number) pairs
events = [
    (10, 0),
    (30, 0),
    (55, 1),
    (73, 0),
    (74, 1)
]
events = np.array(events, dtype='u8,u1')
events.tofile('test.timech')

# or how about some random Poissonian events (all on channel 0):
n = 1000000  # one million events
interarrivals = np.random.exponential(1000, size=n)
times = np.cumsum(interarrivals).round().astype('u8')
events = np.vstack([times, np.zeros(n, dtype='u1')])
events.tofile('poissonian.timech')
ywsong2 commented 6 years ago

Thank you, bgamari, for real fast response. I will try out with my raw data that I collected by PicoHarp 300. :) Thanks again. -Song