FCS-analysis / PyCorrFit

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

Implement reader for PicoQuant cor files #199

Closed tsbischof closed 1 year ago

tsbischof commented 1 year ago

This branch implements the PicoQuant cor file format, as discussed in #84. It has been tested against Python 3.10 on ubuntu 22.04, with the sample data file provided in #84. I had to update a few of the calls to numpy to specify data sizes (e.g. np.int -> np.int64), but otherwise the changes are just to add the new format.

@GrantFoley Would you give permission for me to make your data samples public? I would add the ptu file to tsbischof/libpicoquant, and the cor file to FCS-analysis/FCSdata. The intent would be to provide these as examples for future development and testing.

paulmueller commented 1 year ago

@tsbischof Thanks a lot for the effort! The CI pipeline is ages old. Don't worry about it now. I will also test it locally and then eventually migrate to GH Actions.

BTW with reference to your C code in https://github.com/tsbischof/libpicoquant, are you planning to create a libpicoquant Python package (https://pypi.org/project/libpicoquant)? I would gladly add it to the PyCorrFit dependency list (see OP in #84).

@GrantFoley Please just comment here whether we can put your data to the public domain (CC-0) :pray:

tsbischof commented 1 year ago

I do intend to revisit libpicoquant and add a Python version. I started fleshing it out last week and will upload hopefully over the weekend.

GrantFoley commented 1 year ago

Hi everyone,

Thank you very much for all of your work on this. Yes, you have my permission to make the data samples public.

Grant

GrantFoley commented 1 year ago

I had some follow up questions about the future steps for data analysis. If I take the .cor file that is produced in from the picoharp, are there any additional steps that I need to take before PyCorrFit can read this data? I know these these things take some time to install and develop, but I was just wanting to be prepared. Thank you both again @paulmueller and @tsbischof for your help thus far, and please let me know if I can provide any additional information or help.

paulmueller commented 1 year ago

@GrantFoley Unfortunately, depending on how you are installing PyCorrFit, you will have to wait for one of those issues: #201 #202 #203, or you install PyCorrFit from the main branch.

tsbischof commented 1 year ago

But as far as I can tell, the develop branch should allow you to read in and work with the cor files directly, with no further modification

paulmueller commented 1 year ago

Correct, except that there is now only one main branch (to keep things simple).

GrantFoley commented 1 year ago

Ok then. How do I install PyCorrFit from the main branch? I installed PyCorrFit using the installation instructions provided on the documentation page (https://pycorrfit.readthedocs.io/en/stable/). I am using the windows version.

tsbischof commented 1 year ago

The simplest option should be to clone the repository and install using pip:

git clone http://github.com/FCS-analysis/PyCorrFit
cd PyCorrFit
pip install .[GUI]

This assumes you have added Python to your path and have git installed.

GrantFoley commented 1 year ago

Hi Thomas,

This is not working for me. I am using an anaconda environment that has python 3.11 and git installed. However, when I attempt to run pip install .[GUI], it says it is unable to create the process. Do you have any suggestions? Thanks

Grant

GrantFoley commented 1 year ago

I had another question that came up. I was trying to install pycorrfit from the source, as outlined here https://github.com/FCS-analysis/PyCorrFit/wiki/Running-from-source#windows I have downloaded anaconda distribution and made an environment with Python 3.10.8. I have also downloaded MikTex. I have installed all of the required packages except for wxpython, the reason for that one being it cannot download with a Python version greater than 3.9.x. Aside from this, the most recent error I have come across is an ImportError, which states it cannot import name 'MutableSet' from 'collections'. Do either of you have any suggestions for working around this? Thanks.

Grant

paulmueller commented 1 year ago

Sorry, I currently cannot (due to my available time) give support in that direction.

To keep the general workflow simple, please create a new issue for anything not related to the cor-reader here.