phasorpy 0.6__cp311-cp311-win_arm64.whl → 0.7__cp311-cp311-win_arm64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- phasorpy/__init__.py +1 -1
- phasorpy/_phasorpy.cp311-win_arm64.pyd +0 -0
- phasorpy/_phasorpy.pyx +281 -9
- phasorpy/_utils.py +101 -28
- phasorpy/cli.py +19 -1
- phasorpy/cluster.py +10 -16
- phasorpy/color.py +11 -7
- phasorpy/{components.py → component.py} +255 -32
- phasorpy/{cursors.py → cursor.py} +31 -33
- phasorpy/datasets.py +117 -7
- phasorpy/experimental.py +8 -10
- phasorpy/io/__init__.py +1 -0
- phasorpy/io/_flimlabs.py +20 -10
- phasorpy/io/_leica.py +3 -1
- phasorpy/io/_ometiff.py +2 -3
- phasorpy/io/_other.py +115 -7
- phasorpy/io/_simfcs.py +41 -16
- phasorpy/lifetime.py +2058 -0
- phasorpy/phasor.py +71 -1947
- phasorpy/plot/_functions.py +8 -2
- phasorpy/plot/_lifetime_plots.py +33 -23
- phasorpy/plot/_phasorplot.py +547 -159
- phasorpy/plot/_phasorplot_fret.py +11 -9
- phasorpy/utils.py +21 -10
- {phasorpy-0.6.dist-info → phasorpy-0.7.dist-info}/METADATA +2 -2
- phasorpy-0.7.dist-info/RECORD +35 -0
- phasorpy-0.6.dist-info/RECORD +0 -34
- {phasorpy-0.6.dist-info → phasorpy-0.7.dist-info}/WHEEL +0 -0
- {phasorpy-0.6.dist-info → phasorpy-0.7.dist-info}/entry_points.txt +0 -0
- {phasorpy-0.6.dist-info → phasorpy-0.7.dist-info}/licenses/LICENSE.txt +0 -0
- {phasorpy-0.6.dist-info → phasorpy-0.7.dist-info}/top_level.txt +0 -0
phasorpy/plot/_functions.py
CHANGED
@@ -66,10 +66,15 @@ def plot_phasor(
|
|
66
66
|
show : bool, optional, default: True
|
67
67
|
Display figure.
|
68
68
|
**kwargs
|
69
|
-
Additional
|
69
|
+
Additional arguments passed to :py:class:`PhasorPlot`,
|
70
70
|
:py:meth:`PhasorPlot.plot`, :py:meth:`PhasorPlot.hist2d`, or
|
71
71
|
:py:meth:`PhasorPlot.contour` depending on `style`.
|
72
72
|
|
73
|
+
Raises
|
74
|
+
------
|
75
|
+
ValueError
|
76
|
+
If style is not one of 'plot', 'hist2d', or 'contour'.
|
77
|
+
|
73
78
|
See Also
|
74
79
|
--------
|
75
80
|
phasorpy.plot.PhasorPlot
|
@@ -87,6 +92,7 @@ def plot_phasor(
|
|
87
92
|
'xticks',
|
88
93
|
'yticks',
|
89
94
|
'grid',
|
95
|
+
'pad',
|
90
96
|
)
|
91
97
|
|
92
98
|
real = numpy.asanyarray(real)
|
@@ -619,7 +625,7 @@ def plot_histograms(
|
|
619
625
|
|
620
626
|
Parameters
|
621
627
|
----------
|
622
|
-
data: array_like
|
628
|
+
*data : array_like
|
623
629
|
Data arrays to be plotted as histograms.
|
624
630
|
title : str, optional
|
625
631
|
Figure title.
|
phasorpy/plot/_lifetime_plots.py
CHANGED
@@ -17,16 +17,18 @@ from matplotlib.lines import Line2D
|
|
17
17
|
from matplotlib.widgets import Slider
|
18
18
|
|
19
19
|
from .._utils import update_kwargs
|
20
|
-
from ..
|
20
|
+
from ..lifetime import (
|
21
21
|
lifetime_to_frequency,
|
22
22
|
lifetime_to_signal,
|
23
23
|
phasor_from_lifetime,
|
24
|
+
)
|
25
|
+
from ..phasor import (
|
24
26
|
phasor_to_polar,
|
25
27
|
phasor_transform,
|
26
28
|
)
|
27
29
|
from ..plot._phasorplot import (
|
30
|
+
CircleTicks,
|
28
31
|
PhasorPlot,
|
29
|
-
SemicircleTicks,
|
30
32
|
_semicircle_ticks,
|
31
33
|
)
|
32
34
|
|
@@ -91,7 +93,7 @@ class LifetimePlots:
|
|
91
93
|
_modulation_lines: list[Line2D]
|
92
94
|
|
93
95
|
_semicircle_line: Line2D
|
94
|
-
_semicircle_ticks:
|
96
|
+
_semicircle_ticks: CircleTicks | None
|
95
97
|
|
96
98
|
_component_colors = (
|
97
99
|
# 'tab:blue', # main
|
@@ -167,7 +169,12 @@ class LifetimePlots:
|
|
167
169
|
time_plot.set_xlabel('Time [ns]')
|
168
170
|
time_plot.set_ylabel('Intensity [normalized]')
|
169
171
|
lines = time_plot.plot(
|
170
|
-
times,
|
172
|
+
times,
|
173
|
+
signal,
|
174
|
+
label='Signal',
|
175
|
+
color='tab:blue',
|
176
|
+
linewidth=2,
|
177
|
+
zorder=10,
|
171
178
|
)
|
172
179
|
self._signal_lines.append(lines[0])
|
173
180
|
if num_components > 1:
|
@@ -177,7 +184,7 @@ class LifetimePlots:
|
|
177
184
|
component_signal[i],
|
178
185
|
label=f'Lifetime {i}',
|
179
186
|
color=self._component_colors[i],
|
180
|
-
|
187
|
+
linewidth=0.8,
|
181
188
|
alpha=0.5,
|
182
189
|
)
|
183
190
|
self._signal_lines.append(lines[0])
|
@@ -186,7 +193,7 @@ class LifetimePlots:
|
|
186
193
|
irf,
|
187
194
|
label='Instrument response',
|
188
195
|
color='tab:grey',
|
189
|
-
|
196
|
+
linewidth=0.8,
|
190
197
|
alpha=0.5,
|
191
198
|
)
|
192
199
|
self._signal_lines.append(lines[0])
|
@@ -204,11 +211,11 @@ class LifetimePlots:
|
|
204
211
|
if num_components > 1:
|
205
212
|
for i in range(num_components):
|
206
213
|
lines = phasorplot.plot(
|
207
|
-
|
208
|
-
|
214
|
+
(real, component_real[i]),
|
215
|
+
(imag, component_imag[i]),
|
209
216
|
color=self._component_colors[i],
|
210
|
-
|
211
|
-
|
217
|
+
linestyle='-',
|
218
|
+
linewidth=0.8,
|
212
219
|
alpha=0.5,
|
213
220
|
)
|
214
221
|
self._phasor_lines.append(lines[0])
|
@@ -225,14 +232,14 @@ class LifetimePlots:
|
|
225
232
|
phase_plot.set_xscale('log', base=10)
|
226
233
|
phase_plot.set_xlabel('Frequency (MHz)')
|
227
234
|
phase_plot.set_ylabel('Phase (°)', color='tab:blue')
|
228
|
-
phase_plot.set_yticks(
|
229
|
-
phase_plot.plot(
|
235
|
+
phase_plot.set_yticks((0.0, 30.0, 60.0, 90.0))
|
236
|
+
phase_plot.plot((1, 1), (0.0, 90.0), alpha=0.0) # set autoscale
|
230
237
|
lines = phase_plot.plot(
|
231
|
-
|
232
|
-
|
238
|
+
(frequency, frequency),
|
239
|
+
(0, 90),
|
233
240
|
'--',
|
234
241
|
color='gray',
|
235
|
-
|
242
|
+
linewidth=0.8,
|
236
243
|
alpha=0.5,
|
237
244
|
)
|
238
245
|
self._frequency_line = lines[0]
|
@@ -241,7 +248,7 @@ class LifetimePlots:
|
|
241
248
|
)
|
242
249
|
self._phase_point = lines[0]
|
243
250
|
lines = phase_plot.plot(
|
244
|
-
self._frequencies, phase_, color='tab:blue',
|
251
|
+
self._frequencies, phase_, color='tab:blue', linewidth=2, zorder=2
|
245
252
|
)
|
246
253
|
self._phase_lines.append(lines[0])
|
247
254
|
if num_components > 1:
|
@@ -250,7 +257,7 @@ class LifetimePlots:
|
|
250
257
|
self._frequencies,
|
251
258
|
component_phase_[i],
|
252
259
|
color=self._component_colors[i],
|
253
|
-
|
260
|
+
linewidth=0.5,
|
254
261
|
alpha=0.5,
|
255
262
|
)
|
256
263
|
self._phase_lines.append(lines[0])
|
@@ -260,14 +267,18 @@ class LifetimePlots:
|
|
260
267
|
# twinx modulation_plot is always plotted on top of phase_plot
|
261
268
|
modulation_plot = phase_plot.twinx()
|
262
269
|
modulation_plot.set_ylabel('Modulation (%)', color='tab:red')
|
263
|
-
modulation_plot.set_yticks(
|
264
|
-
modulation_plot.plot(
|
270
|
+
modulation_plot.set_yticks((0.0, 25.0, 50.0, 75.0, 100.0))
|
271
|
+
modulation_plot.plot((1, 1), (0.0, 100.0), alpha=0.0) # set autoscale
|
265
272
|
lines = modulation_plot.plot(
|
266
273
|
frequency, modulation, 'o', color='tab:red', markersize=8, zorder=2
|
267
274
|
)
|
268
275
|
self._modulation_point = lines[0]
|
269
276
|
lines = modulation_plot.plot(
|
270
|
-
self._frequencies,
|
277
|
+
self._frequencies,
|
278
|
+
modulation_,
|
279
|
+
color='tab:red',
|
280
|
+
linewidth=2,
|
281
|
+
zorder=2,
|
271
282
|
)
|
272
283
|
self._modulation_lines.append(lines[0])
|
273
284
|
if num_components > 1:
|
@@ -276,7 +287,7 @@ class LifetimePlots:
|
|
276
287
|
self._frequencies,
|
277
288
|
component_modulation_[i],
|
278
289
|
color=self._component_colors[i],
|
279
|
-
|
290
|
+
linewidth=0.5,
|
280
291
|
alpha=0.5,
|
281
292
|
)
|
282
293
|
self._modulation_lines.append(lines[0])
|
@@ -520,8 +531,7 @@ class LifetimePlots:
|
|
520
531
|
[real, component_real[i]], [imag, component_imag[i]]
|
521
532
|
)
|
522
533
|
self._phasor_points[i + 1].set_data(
|
523
|
-
[component_real[i]],
|
524
|
-
[component_imag[i]],
|
534
|
+
[component_real[i]], [component_imag[i]]
|
525
535
|
)
|
526
536
|
|
527
537
|
# frequency domain plot
|