Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

start chisurf instance from python script #45

Open
NicolaasvanderVoort opened this issue Nov 3, 2020 · 2 comments
Open

start chisurf instance from python script #45

NicolaasvanderVoort opened this issue Nov 3, 2020 · 2 comments

Comments

@NicolaasvanderVoort
Copy link

Is your feature request related to a problem? Please describe.
For the CD95 project we are doing many TCSPC fits, similar to the TGR5 project. The option to run scripts in Chisurf is already quite helpful. Is it also possible to create a Chisurf instance from a python interpreter and do fitting there? In this way chisurf TCSPC fitting can be embedded in whatever analysis other analysis is undertaken.
We do live-cell data, so we generate a lot of data for which I'd like to automate the analysis.

Describe the solution you'd like

  • which dir must be added to $PYTHONPATH
  • how to import the chisurf package
  • how to initialize a Chisurf instance
    From there the combination command line + cs gui should enable scripting Donor only calibrated Donor Acceptor fits.

Describe alternatives you've considered
I have a few scripts for running batch fits in Chisurf. It works ok, but it's a bit messy and I'd like to automate human clicking as far as routine analysis is concerned. If it works nicely, it can be modularly implemented wherever TCSPC fitting is needed.

Additional context
Chisurf running py2.7 and Jupyter QtConsole 4.2.1 (I couldn't find the software version).
Is pain to be expected from running py2.7 chisurf in 3.7 interpreter?

Many thanks,

@tpeulen
Copy link
Member

tpeulen commented Nov 5, 2020

This is a great idea. Using and chisurf in other software is possible. Take a look at the following test:

https://github.com/Fluorescence-Tools/chisurf/blob/master/test/test_fit_tcspc.py

I already migrated the master branch of chisurf to python 3. Since the last release, there were many changes. This and the lack of testing by (qualified) testers is the main reason I did not release a new version.

@NicolaasvanderVoort
Copy link
Author

NicolaasvanderVoort commented Nov 6, 2020

Sure I can test the new version of chisurf.

I cloned the master repo and ran:
pwd :
~/chisurf
python setup.py
I got asked to install mako and pybind11 (I thought I had pybind11 installed, but whatever)

Next, in python shell:

import chisurf.models
ModuleNotFoundError: No module named 'slugify'
pip install slugify
ERROR: chisurf 19.9.22 requires deprecation, which is not installed.
ERROR: chisurf 19.9.22 requires emcee, which is not installed.
ERROR: chisurf 19.9.22 requires pyopencl, which is not installed.
ERROR: chisurf 19.9.22 requires PyQt5, which is not installed.
ERROR: chisurf 19.9.22 requires pyqtgraph, which is not installed.
ERROR: chisurf 19.9.22 requires python-docx, which is not installed.
ERROR: chisurf 19.9.22 requires sip, which is not installed.
pip install deprecation emcee pyopencl PyQt5 pyqtgraph python-docx sip

Then I tried importing again:
import chisurf.models

File "C:\ProgramData\Anaconda3\lib\site-packages\chisurf-19.9.22-py3.7-win-amd64.egg\chisurf\fio\photons.py", line 34, in
import tttrlib

ModuleNotFoundError: No module named 'tttrlib'

I checked and there is a file called tttr in ~\chisurf\chisurf\fio, but not tttrlib.

Untill sofar,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants