Antonino Ingargiola edited smFRET data analysis.tex  over 9 years ago

Commit id: 005c889bed0403f9875df6278fa7e2470e4674e1

deletions | additions      

       

\subsection{Loading the data}  Currently, FRETBursts supports loading data from a few file formats: SM files (a binary format saved by a common LabVIEW program used in smFRET setups), SPC (a binary format used by TCSPC Becker & Hickl cards) and HDF5-Ph-Data an open binary format single-molecule data based on HDF5.  We encourage adopting HDF5-Ph-Data format beacuse because  it is relatively simple, scalable, well documented, space efficient and very fast[Link]. All the FRETBursts example data files are in HDF5-Ph-Data. An additional file-set can be found here[multi-spot paper data files]. All the functions to load the different file formats are defined in the \verb|loader| module. In particular, to load an HDF5-Ph-Data file use: 

where \verb|file_name| is a string containing the file path. In the previous command, the variable `d` (of type `Data`) is the fundamental object in FRETBursts that contains the measurement data and several methods to process it.  In case the data is available in a format not directly supported it is possible to manually create a `Data` variable. For example, for non-ALEX smFRET data, two arrays of same length are needed: the timestamps and the acceptor-mask. The timestamps is an int64 numpy array containing the recorded photon timestamps in arbitrary units (usually dictated by the acquisition hardware clock period). The acceptor-mask is a numpy boolean array that is True when the corresponding timestamps comes from the acceptor channel and False when it comes from the donor channel. Once you have these arryas arrays  you can manually create a `Data` object with: \verb|d = Data(ph_times_m=[timestamps], A_em=[acceptor_mask], clk_p=10e-9, ALEX=False)|