FCS-analysis / PyCorrFit

data analysis and fitting software for fluorescence correlation spectroscopy (FCS)
pycorrfit.craban.de
Other
49 stars 13 forks source link

Picoquant 64-bit .ptu file support #84

Open DyangLi opened 10 years ago

DyangLi commented 10 years ago

Hi Paul,

Will there be support for .ptu file from Picoquant in the near future?

paulmueller commented 10 years ago

Hi arfartom, I am not familiar with the PicoQuant file format. Dominic (@dwaithe), who wrote the Python implementation for the pt3 files, might be able to help here?

For reference the picoquant link: http://www.picoquant.com/products/category/software/symphotime-64-fluorescence-lifetime-imaging-and-correlation-software

Cheers, Paul

paulmueller commented 10 years ago

These are repositories that mention the file format. Maybe it has already been implemented.

https://github.com/snizzleorg/PicoQuant-Time-Tagged-File-Format-Demos by @snizzleorg

https://github.com/tsbischof/libpicoquant by @tsbischof

Cheers, Paul

paulmueller commented 7 years ago

FCS_point_correlator (https://github.com/dwaithe/FCS_point_correlator) implements the .ptu file format. It should be possible to implement it in PyCorrFit as well. Please get into contact with me, if you are interested.

GrantFoley commented 1 year ago

Hi Paul,

My name is Grant Foley, a chemistry graduate student. I have recently constructed an FCS instrument, and I am looking to analyze the correlation curves I obtained for calibration of the instrument using PyCorrFit. The correlator that I am using is a PicoHarp 300 from Picoquant. The files that it produces come in either a .ptu or .cor file type. I have tried to follow the instructions in the manual for file conversion to a .csv, but I am not sure I am doing this properly. Would you be able to offer some advice or a procedure to analyze my data? Thank you, and please let me know if I can provide any additional information.

Best regards, Grant Foley

paulmueller commented 1 year ago

Hi Grant,

I currently don't have the time to work on PyCorrFit. But I am happy to merge pull requests.

Cheers, Paul

GrantFoley commented 1 year ago

Hi Paul,

Ok then. I appreciate your help.

Best, Grant

tsbischof commented 1 year ago

Hi Grant,

I should have some bandwidth in the coming days, can you send the details of your request?

Best regards, Thomas

GrantFoley commented 1 year ago

Hi Thomas,

Thank you for your response. I have recently set up an FCS instrument and have obtained a correlation curve using a PicoHarp 300 hardware correlator. However, though I have obtained the data, I currently do not have a way to analyze the data. I know that Picoquant offers the Symphotime 64 software for analysis of its files, but my advisor has informed me that this is option is not possible for us at this time. Because of this, I am exploring other methods to properly analyze my data (obtaining diffusion coefficients, number of molecules in the observation volume, etc.). Because the PicoHarp 300 outputs files in a .cor and .ptu file format, PyCorrFit cannot directly read these files. I have attempted to convert them to a .csv file by following the instructions in the manual, but I am not sure that I did it right. This is where I am currently at. Please let me know if I can provide any further information or files, and thanks again for your response.

Best, Grant

tsbischof commented 1 year ago

Right, there are a few good open source packages for this. To be clear, are you looking to use the cor files or the ptu files? The workflows will be quite different depending on whether you are working up correlation data or TCSPC data.

GrantFoley commented 1 year ago

I will probably use the .ptu files. Those are the files generated from the TCSPC data correct?

tsbischof commented 1 year ago

Yes they should be. Can you send a link to a sample file? I wrote the code for this format a while back, but I know there have been some changes in recent years and I would like to check that things work.

Are you looking to extract the individual photon events, or generate correlation data? I can link to the relevant documents as makes sense

GrantFoley commented 1 year ago

I tried dropping in both a .cor and a .ptu file, but github says that those file types are not supported. How should I send over a sample file? I am also still working out some kinks, such as file naming, so a lot of the .ptu files I have are not properly labelled. (I have been doing a lot of trial and error these past few months to the instrument working). If the file I am able to get to you doesn't have the right trend, let me know and I can send you some others.

GrantFoley commented 1 year ago

I think I am trying to generate correlation data. I am still relatively new to data analysis for FCS, so I apologize if I am a little unsure.

tsbischof commented 1 year ago

A Google Drive, Dropbox, or similar link would be fine for sending the files.

The short version is that the ptu files contain the raw photon arrival time records (TTTR), which will need to be processed into correlations. I wrote a few tools for this (https://github.com/tsbischof/photon_correlation), and a bunch of other software is listed here: https://www.tcspc.com/doku.php/software#open_source_software. Note that you will still need to convert the data from these correlation tools into something supported by PyCorrFit.

In principle the cor file is this correlation data, but I have never worked with that format. With that file and any associated documentation you can find, I can look at implementing that format into PyCorrFit.

GrantFoley commented 1 year ago

Thomas,

Here is a link to a google drive containing a .cor and .ptu file. Let me know if these will work.

https://drive.google.com/drive/folders/0AAtfE6P5kQ3SUk9PVA

Grant

tsbischof commented 1 year ago

Can you make that link open, or check your email to give me access? It is currently restricted

GrantFoley commented 1 year ago

Hi Thomas,

I changed to access to the google drive, so hopefully you should have access now. Please let me know if that doesn't work, and I will try something else.

Grant

GrantFoley commented 1 year ago

Hi Thomas,

Sorry for the delay, but I got your message to access the google drive. However, because I created it with my school account, you cannot access it. I do have another gmail account that is not through my institution that I can use. I will send you a link for that ASAP.

GrantFoley commented 1 year ago

Here is the link. I hope this one works. Apologies for all of the mishaps. https://drive.google.com/drive/folders/1fZ3nIR0u5sQXnjrPXcJDhaUy3htBYkzy?usp=sharing

tsbischof commented 1 year ago

I can access the files now, thanks! The cor format looks reasonably straightforward, and I should have a bit of time later this week to take a pass at it.

tsbischof commented 1 year ago

I have started fleshing out a pure Python reader for the ptu format (https://github.com/tsbischof/picoquantio). Any specific ptu types to prioritize? I have sample data from HydraHarp t2 and PicoHarp t2, and in principle know the corresponding formats for t3 (https://github.com/tsbischof/picoquant-sample-data/)

paulmueller commented 1 year ago

If you ask me as the maintainer of PyCorrFit, I would vote for the .pt3 format.

But I would suggest to do this in small incremental steps and initially only implement what you (and the community) need (I don't know how much effort it is).