Skip to content

Commit ddf5f31

Browse files
author
Paul Müller
committed
Merge pull request #141 from FCS-analysis/develop
version 0.9.4
2 parents 99c6142 + bbcbf86 commit ddf5f31

File tree

15 files changed

+322
-94
lines changed

15 files changed

+322
-94
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,4 +104,4 @@ deploy:
104104
- "${RELEASE_PKG_FILEA}"
105105
on:
106106
tags: true
107-
repo: paulmueller/PyCorrFit
107+
repo: FCS-analysis/PyCorrFit

ChangeLog.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
0.9.4
2+
- Batch control allows to select individual parameters (#108)
3+
- Allow to exclude pages from batch fitting (#107)
4+
- Bugfixes:
5+
- Fix `ValueError` in parameter display
6+
- Possibly fixed error with `yaml.safe_dump`
7+
on Mac OSx 10.8.5
8+
- Make sure background is lower than signal (#137)
19
0.9.3
210
- Fitting: migrate to lmfit
311
- This introduces a new dependency for building PyCorrFit.

PKG-INFO

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ Metadata-Version: 1.0
22
Name: pycorrfit
33
Version: 0.8.0
44
Summary: UNKNOWN
5-
Home-page: https://github.com/paulmueller/PyCorrFit
5+
Home-page: https://github.com/FCS-analysis/PyCorrFit
66
Author: Paul Mueller
77
Author-email: paul.mueller@biotec.tu-dresden.de
88
License: GPL v2
9-
Description: ![PyCorrFit](https://raw.github.com/paulmueller/PyCorrFit/master/doc-src/Images/PyCorrFit_logo_dark.png)
9+
Description: ![PyCorrFit](https://raw.github.com/FCS-analysis/PyCorrFit/master/doc-src/Images/PyCorrFit_logo_dark.png)
1010
=========
1111

1212
This repository contains the source code of PyCorrFit - a scientific tool for fitting
@@ -24,10 +24,10 @@ Description: ![PyCorrFit](https://raw.github.com/paulmueller/PyCorrFit/master/do
2424
information, visit the official homepage at http://pycorrfit.craban.de.
2525

2626

27-
- [Download the latest version](https://github.com/paulmueller/PyCorrFit/releases)
28-
- [Documentation](https://github.com/paulmueller/PyCorrFit/raw/master/PyCorrFit_doc.pdf)
29-
- [Run PyCorrFit from source](https://github.com/paulmueller/PyCorrFit/wiki/Running-PyCorrFit-from-source)
30-
- [Write model functions](https://github.com/paulmueller/PyCorrFit/wiki/Writing-model-functions)
31-
- [Need help?](https://github.com/paulmueller/PyCorrFit/wiki/Creating-a-new-issue)
27+
- [Download the latest version](https://github.com/FCS-analysis/PyCorrFit/releases)
28+
- [Documentation](https://github.com/FCS-analysis/PyCorrFit/raw/master/PyCorrFit_doc.pdf)
29+
- [Run PyCorrFit from source](https://github.com/FCS-analysis/PyCorrFit/wiki/Running-PyCorrFit-from-source)
30+
- [Write model functions](https://github.com/FCS-analysis/PyCorrFit/wiki/Writing-model-functions)
31+
- [Need help?](https://github.com/FCS-analysis/PyCorrFit/wiki/Creating-a-new-issue)
3232

3333
Platform: UNKNOWN

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
![PyCorrFit](https://raw.github.com/paulmueller/PyCorrFit/master/doc/Images/PyCorrFit_logo_dark.png)
1+
![PyCorrFit](https://raw.github.com/FCS-analysis/PyCorrFit/master/doc/Images/PyCorrFit_logo_dark.png)
22
=========
33
[![PyPI](http://img.shields.io/pypi/v/PyCorrFit.svg)](https://pypi.python.org/pypi/pycorrfit)
44
[![Build Win](https://img.shields.io/appveyor/ci/paulmueller/PyCorrFit/master.svg?label=build_win)](https://ci.appveyor.com/project/paulmueller/pycorrfit)
5-
[![Build Mac](https://img.shields.io/travis/paulmueller/PyCorrFit/master.svg?label=build_mac)](https://travis-ci.org/paulmueller/PyCorrFit)
5+
[![Build Mac](https://img.shields.io/travis/FCS-analysis/PyCorrFit/master.svg?label=build_mac)](https://travis-ci.org/FCS-analysis/PyCorrFit)
66

77

88

@@ -21,8 +21,8 @@ with different excitation geometries like total internal reflection (TIR). For m
2121
information, visit the official homepage at http://pycorrfit.craban.de.
2222

2323

24-
- [Download the latest version](https://github.com/paulmueller/PyCorrFit/releases)
25-
- [Documentation](https://github.com/paulmueller/PyCorrFit/wiki/PyCorrFit_doc.pdf)
26-
- [Run PyCorrFit from source](https://github.com/paulmueller/PyCorrFit/wiki/Running-from-source)
27-
- [Write your own model functions](https://github.com/paulmueller/PyCorrFit/wiki/Writing-model-functions)
28-
- [Need help?](https://github.com/paulmueller/PyCorrFit/wiki/Creating-a-new-issue)
24+
- [Download the latest version](https://github.com/FCS-analysis/PyCorrFit/releases)
25+
- [Documentation](https://github.com/FCS-analysis/PyCorrFit/wiki/PyCorrFit_doc.pdf)
26+
- [Run PyCorrFit from source](https://github.com/FCS-analysis/PyCorrFit/wiki/Running-from-source)
27+
- [Write your own model functions](https://github.com/FCS-analysis/PyCorrFit/wiki/Writing-model-functions)
28+
- [Need help?](https://github.com/FCS-analysis/PyCorrFit/wiki/Creating-a-new-issue)

Readme.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ This package provides the Python module `pycorrfit` and its graphical user inter
1818
graphical user interface is written with wxPython. A HowTo for the installation of the
1919
latest version of PyCorrFit using pip can be found there:
2020

21-
https://github.com/paulmueller/PyCorrFit/wiki/Installation_pip
21+
https://github.com/FCS-analysis/PyCorrFit/wiki/Installation_pip
2222

2323
Further reading:
2424

25-
- Latest downloads: https://github.com/paulmueller/PyCorrFit/releases
26-
- Documentation: https://github.com/paulmueller/PyCorrFit/wiki/PyCorrFit_doc.pdf
27-
- Write model functions: https://github.com/paulmueller/PyCorrFit/wiki/Writing-model-functions
28-
- Need help? https://github.com/paulmueller/PyCorrFit/wiki/Creating-a-new-issue
25+
- Latest downloads: https://github.com/FCS-analysis/PyCorrFit/releases
26+
- Documentation: https://github.com/FCS-analysis/PyCorrFit/wiki/PyCorrFit_doc.pdf
27+
- Write model functions: https://github.com/FCS-analysis/PyCorrFit/wiki/Writing-model-functions
28+
- Need help? https://github.com/FCS-analysis/PyCorrFit/wiki/Creating-a-new-issue

doc/PyCorrFit_doc_content.tex

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ \section{Introduction}
22
\label{sec:intro}
33
\subsection{Preface}
44
\label{sec:intro.prefa}
5-
\textit{PyCorrFit} emerged from my work in the Schwille Lab\footnote{\url{http://www.biochem.mpg.de/en/rd/schwille/}} at the Biotechnology Center of the TU Dresden in 2011/2012. Since then, the program has been further developed based on numerous input from FCS users, in particular Franziska Thomas, Grzesiek Chwastek, Janine Tittel, and Thomas Weidemann. The program source code is available at GitHub\footnote{\url{https://github.com/paulmueller/PyCorrFit}}. Please do not hesitate to sign up and add a feature request. If you you find a bug, please let us know via GitHub.\\
5+
\textit{PyCorrFit} emerged from my work in the Schwille Lab\footnote{\url{http://www.biochem.mpg.de/en/rd/schwille/}} at the Biotechnology Center of the TU Dresden in 2011/2012. Since then, the program has been further developed based on numerous input from FCS users, in particular Franziska Thomas, Grzesiek Chwastek, Janine Tittel, and Thomas Weidemann. The program source code is available at GitHub\footnote{\url{https://github.com/FCS-analysis/PyCorrFit}}. Please do not hesitate to sign up and add a feature request. If you you find a bug, please let us know via GitHub.\\
66

77
\noindent \textit{PyCorrFit} was written to simplify the work with experimentally obtained correlation curves. These can be processed independently (operating system, location, time). PyCorrFit supports commonly used file formats and enables users to allocate and organize their data in a simple way.\\
88

@@ -54,10 +54,10 @@ \subsubsection{Software}
5454
For Windows XP and later, stand-alone binary executables are available from the download page.
5555
\item \textbf{Ubuntu/Debian.}
5656
PyCorrFit is available from the Debian repositories and can be installed via the operating systems packaging tool (e.g. \texttt{apt-get install pycorrfit}).
57-
\item\textbf{PyPI.} To run \textit{PyCorrFit} on any other operating system, the installation of Python v.2.7 is required. \textit{PyCorrFit} is included in the Python package index (PyPI, \url{http://pypi.python.org/pypi/pip}) and can be installed via\footnote{See also the wiki article at \url{https://github.com/paulmueller/PyCorrFit/wiki/Installation_pip}}
57+
\item\textbf{PyPI.} To run \textit{PyCorrFit} on any other operating system, the installation of Python v.2.7 is required. \textit{PyCorrFit} is included in the Python package index (PyPI, \url{http://pypi.python.org/pypi/pip}) and can be installed via\footnote{See also the wiki article at \url{https://github.com/FCS-analysis/PyCorrFit/wiki/Installation_pip}}
5858
\texttt{pip~install~pycorrfit$\!$[GUI]}.
5959
\item \textbf{Sources.}
60-
You can also directly download the source code at any developmental stage\footnote{See also the wiki article at \url{https://github.com/paulmueller/PyCorrFit/wiki/Running-from-source}}.
60+
You can also directly download the source code at any developmental stage\footnote{See also the wiki article at \url{https://github.com/FCS-analysis/PyCorrFit/wiki/Running-from-source}}.
6161
\end{itemize}
6262

6363

@@ -203,10 +203,14 @@ \subsubsection{Tools / Batch control}
203203
\label{sec:menub.tools.batch}
204204
By default, the current page is taken as a reference to perform automated fitting. A batch is defined as the ensemble of correlation data sets (pages) assigned to the same model function within a session. A session can therefore have several batches, even for the same data.
205205

206-
For fitting, it is crucial to carefully define the starting parameters, whether parameters should be fixed or varied, the range of values which make physically sense, and other options offered within the \textit{Main window}. By executing \textit{Apply to applicable pages}, these settings are transferred to all other pages assigned to the same fit model. Note that this includes the range of lag times (lag time channels) which may have been changed with the \textit{Data range }tool for individual pages.
206+
For fitting, it is crucial to carefully define the starting parameters, whether parameters should be fixed or varied, the range of values which make physically sense, and other options offered within the \textit{Main window}. By executing \textit{Apply to applicable pages}, these settings are transferred to all other pages assigned to the same fit model. Note that this includes the range of lag times (lag time channels) which may have been changed with the \textit{Data range} tool for individual pages.
207+
208+
It is possible to prevent the application of fitting parameters to individual pages by checking the \textit{prevent batch modification} checkbox in the \textit{Model parameters} box of a page.
207209

208210
The button \textit{Fit applicable pages} then performs fitting on all pages of the same batch. Alternatively, the user can define an external source of parameters as a reference, i.e. the first page of some \textit{Other session} (*.pcfs). However, this assumes a consistent assignment of model functions.
209211

212+
213+
210214
\subsubsection{Tools / Global fitting}
211215
\label{sec:menub.tools.globa}
212216
Global fitting is useful when experimental curves share the same values for certain physical parameters. For example, due to physical constraints in two-focus FCS both autocorrelation curves and cross-correlation curves should adopt the same values for the diffusion time $\tau_\mathrm{diff}$ and the number of particles $n$. A global fit can be applied such that $n$ and $\tau_\mathrm{diff}$ are identical for all data sets. All curves are added to a single array. In contrast to fixing the shared parameters across a batch, in \textit{Global fitting} $\chi^2$ is minimized for all data sets simultaneously (see \hyref{Section}{sec:theor.nonle}). To perform \textit{Global fitting}, a subset of curves has to be selected by typing the numbers into the input field or by highlighting the pages via the \textit{Overlay curves} tool.
@@ -731,6 +735,6 @@ \subsubsection{Algorithms}
731735
\input{PyCorrFit_doc_models}
732736

733737
\section{Troubleshooting}
734-
If you are having problems with PyCorrFit, you might find the solution in the frequently asked questions\footnote{\url{https://github.com/paulmueller/PyCorrFit/wiki/Frequently-Asked-Questions-\%28FAQ\%29}} or on other pages in the \textit{PyCorrFit}
735-
wiki\footnote{\url{https://github.com/paulmueller/PyCorrFit/wiki}}.
738+
If you are having problems with PyCorrFit, you might find the solution in the frequently asked questions\footnote{\url{https://github.com/FCS-analysis/PyCorrFit/wiki/Frequently-Asked-Questions-\%28FAQ\%29}} or on other pages in the \textit{PyCorrFit}
739+
wiki\footnote{\url{https://github.com/FCS-analysis/PyCorrFit/wiki}}.
736740
There you will also find instructions on how to contact us to file a bug or to request a feature.

doc/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
This folder contains the TeX-source of the
2-
[PyCorrFit documentation](https://github.com/paulmueller/PyCorrFit/wiki/PyCorrFit_doc.pdf).
2+
[PyCorrFit documentation](https://github.com/FCS-analysis/PyCorrFit/wiki/PyCorrFit_doc.pdf).
33

44
If, for some reason, you wish to compile it yourself, you will need a
55
working LaTeX distribution.

pycorrfit/doc.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,6 @@ def SoftwareUsed():
185185

186186

187187
# Github homepage
188-
GitChLog = "https://raw.github.com/paulmueller/PyCorrFit/master/ChangeLog.txt"
189-
GitHome = "https://github.com/paulmueller/PyCorrFit"
190-
GitWiki = "https://github.com/paulmueller/PyCorrFit/wiki"
188+
GitChLog = "https://raw.github.com/FCS-analysis/PyCorrFit/master/ChangeLog.txt"
189+
GitHome = "https://github.com/FCS-analysis/PyCorrFit"
190+
GitWiki = "https://github.com/FCS-analysis/PyCorrFit/wiki"

pycorrfit/fcs_data_set.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,6 @@ def __init__(self, backgrounds=[], correlation=None, corr_type="AC",
188188
self.fit_weight_type = fit_weight_type
189189
self.fit_weight_parameters = fit_weight_data
190190

191-
# lock prevents any changes to the parameters
192-
self.lock_parameters = False
193191
self.normparm = normparm
194192
self.title = title
195193
self.traces = traces
@@ -452,17 +450,16 @@ def fit_weight_data(self, value):
452450
@property
453451
def fit_parameters(self):
454452
"""parameters that were fitted/will be used for fitting"""
453+
# Do not return `self._fit_parameters.copy()`, because
454+
# some methods of PyCorrFit depende on the array being
455+
# accessible and changeable with indices.
455456
return self._fit_parameters
456457

457458
@fit_parameters.setter
458459
def fit_parameters(self, value):
459460
# must unlock parameters, if change is required
460461
value = np.array(value)
461-
if self.lock_parameters == False:
462-
self._fit_parameters = self.check_parms(value)
463-
else:
464-
warnings.warn("Correlation {}: fixed parameters unchanged.".
465-
format(self.uid))
462+
self._fit_parameters = self.check_parms(value)
466463

467464
@property
468465
def fit_parameters_range(self):

pycorrfit/frontend.py

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1429,9 +1429,17 @@ def OnOpenSession(self, e=None, sessionfile=None):
14291429
except:
14301430
pass
14311431
try:
1432-
Infodict["Preferences"] # not used yet
1432+
prefdict = Infodict["Preferences"]
14331433
except:
14341434
pass
1435+
else:
1436+
for key in prefdict:
1437+
if key == "Pages prevent batch modification":
1438+
for pid in prefdict[key]:
1439+
for i in np.arange(N):
1440+
page = self.notebook.GetPage(i)
1441+
if page.counter.strip("#: ") == pid:
1442+
page.prevent_batch_modification = True
14351443
if self.notebook.GetPageCount() > 0:
14361444
# Enable the "Current" Menu
14371445
self.EnableToolCurrent(True)
@@ -1591,6 +1599,14 @@ def OnSaveSession(self,e=None):
15911599
Infodict["External Weights"][counter] = external_weights
15921600
# Append Session Comment:
15931601
Infodict["Comments"]["Session"] = self.SessionComment
1602+
# Protected pages:
1603+
protpage = []
1604+
for i in np.arange(N):
1605+
# Set Page
1606+
Page = self.notebook.GetPage(i)
1607+
if Page.prevent_batch_modification:
1608+
protpage.append(Page.counter.strip("#: "))
1609+
Infodict["Preferences"]["Pages prevent batch modification"] = protpage
15941610
# File dialog
15951611
dlg = wx.FileDialog(self, "Save session file", self.dirname, "",
15961612
"PyCorrFit session (*.pcfs)|*.pcfs|All files (*.*)|*.*",

0 commit comments

Comments
 (0)