Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
cgohlke committed Jul 4, 2024
1 parent 3a252a5 commit 44d6509
Show file tree
Hide file tree
Showing 69 changed files with 156 additions and 150 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
},
"outputs": [],
"source": [
"import math\n\nimport numpy\n\nfrom phasorpy.plot import PhasorPlot"
"import math\n\nimport numpy\n\nfrom phasorpy.plot import PhasorPlot\n\nnumpy.random.seed(42)"
]
},
{
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
},
"outputs": [],
"source": [
"import numpy\n\nfrom phasorpy.phasor import phasor_from_lifetime, phasor_to_polar\nfrom phasorpy.plot import PhasorPlot, plot_phasor, plot_polar_frequency\n\nrng = numpy.random.default_rng()"
"import numpy\n\nfrom phasorpy.phasor import phasor_from_lifetime, phasor_to_polar\nfrom phasorpy.plot import PhasorPlot, plot_phasor, plot_polar_frequency\n\nrng = numpy.random.default_rng(42)"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@

from phasorpy.plot import PhasorPlot

numpy.random.seed(42)

# %%
# Empty phasor plot
# -----------------
Expand Down Expand Up @@ -53,7 +55,6 @@
plot.plot([0.39, 0.4, 0.41], [0.21, 0.19, 0.2], 'x', label='3')
plot.show()


# %%
# Cursors
# -------
Expand Down Expand Up @@ -114,7 +115,6 @@
plot.contour(real, imag)
plot.show()


# %%
# Image
# -----
Expand Down Expand Up @@ -178,7 +178,6 @@
)
pyplot.show()


# %%
# plot_phasor function
# --------------------
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from phasorpy.phasor import phasor_from_lifetime, phasor_to_polar
from phasorpy.plot import PhasorPlot, plot_phasor, plot_polar_frequency

rng = numpy.random.default_rng()
rng = numpy.random.default_rng(42)

# %%
# Single-component lifetimes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
from phasorpy.phasor import phasor_from_lifetime
from phasorpy.plot import PhasorPlot

numpy.random.seed(42)

# %%
# Fractions of combination of two components
# ------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
},
"outputs": [],
"source": [
"import matplotlib.pyplot as plt\nimport numpy\n\nfrom phasorpy.components import two_fractions_from_phasor\nfrom phasorpy.phasor import phasor_from_lifetime\nfrom phasorpy.plot import PhasorPlot"
"import matplotlib.pyplot as plt\nimport numpy\n\nfrom phasorpy.components import two_fractions_from_phasor\nfrom phasorpy.phasor import phasor_from_lifetime\nfrom phasorpy.plot import PhasorPlot\n\nnumpy.random.seed(42)"
]
},
{
Expand Down
Binary file modified main/_images/sphx_glr_phasorpy_components_001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified main/_images/sphx_glr_phasorpy_components_002.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified main/_images/sphx_glr_phasorpy_components_003.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified main/_images/sphx_glr_phasorpy_components_thumb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified main/_images/sphx_glr_phasorpy_fret_001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified main/_images/sphx_glr_phasorpy_fret_002.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified main/_images/sphx_glr_phasorpy_fret_003.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified main/_images/sphx_glr_phasorpy_fret_004.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified main/_images/sphx_glr_phasorpy_fret_005.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified main/_images/sphx_glr_phasorpy_fret_006.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified main/_images/sphx_glr_phasorpy_fret_007.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified main/_images/sphx_glr_phasorpy_fret_008.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified main/_images/sphx_glr_phasorpy_introduction_001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified main/_images/sphx_glr_phasorpy_introduction_002.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified main/_images/sphx_glr_phasorpy_introduction_003.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified main/_images/sphx_glr_phasorpy_introduction_004.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified main/_images/sphx_glr_phasorpy_logo_001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified main/_images/sphx_glr_phasorpy_phasor_from_lifetime_001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified main/_images/sphx_glr_phasorpy_phasor_from_lifetime_002.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified main/_images/sphx_glr_phasorpy_phasor_from_lifetime_003.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified main/_images/sphx_glr_phasorpy_phasor_from_lifetime_004.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified main/_images/sphx_glr_phasorpy_phasor_from_lifetime_005.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified main/_images/sphx_glr_phasorpy_phasor_from_lifetime_006.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified main/_images/sphx_glr_phasorpy_phasor_from_lifetime_007.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified main/_images/sphx_glr_phasorpy_phasorplot_001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified main/_images/sphx_glr_phasorpy_phasorplot_002.png
Binary file modified main/_images/sphx_glr_phasorpy_phasorplot_003.png
Binary file modified main/_images/sphx_glr_phasorpy_phasorplot_004.png
Binary file modified main/_images/sphx_glr_phasorpy_phasorplot_005.png
Binary file modified main/_images/sphx_glr_phasorpy_phasorplot_006.png
Binary file modified main/_images/sphx_glr_phasorpy_phasorplot_007.png
Binary file modified main/_images/sphx_glr_phasorpy_phasorplot_008.png
Binary file modified main/_images/sphx_glr_phasorpy_phasorplot_009.png
Binary file modified main/_images/sphx_glr_phasorpy_phasorplot_010.png
Binary file modified main/_images/sphx_glr_phasorpy_phasorplot_011.png
Binary file modified main/_images/sphx_glr_phasorpy_phasorplot_012.png
Binary file modified main/_images/sphx_glr_phasorpy_phasorplot_013.png
Binary file modified main/_images/sphx_glr_phasorpy_phasorplot_thumb.png
20 changes: 10 additions & 10 deletions main/_sources/sg_execution_times.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

Computation times
=================
**00:22.696** total execution time for 7 files **from all galleries**:
**00:26.564** total execution time for 7 files **from all galleries**:

.. container::

Expand All @@ -32,24 +32,24 @@ Computation times
* - Example
- Time
- Mem (MB)
* - :ref:`sphx_glr_tutorials_benchmarks_phasorpy_phasor_from_signal.py` (``../tutorials/benchmarks/phasorpy_phasor_from_signal.py``)
- 00:10.762
- 0.0
* - :ref:`sphx_glr_tutorials_phasorpy_introduction.py` (``../tutorials/phasorpy_introduction.py``)
- 00:08.703
- 00:13.430
- 0.0
* - :ref:`sphx_glr_tutorials_benchmarks_phasorpy_phasor_from_signal.py` (``../tutorials/benchmarks/phasorpy_phasor_from_signal.py``)
- 00:09.970
- 0.0
* - :ref:`sphx_glr_tutorials_phasorpy_fret.py` (``../tutorials/phasorpy_fret.py``)
- 00:01.698
- 00:01.670
- 0.0
* - :ref:`sphx_glr_tutorials_phasorpy_phasorplot.py` (``../tutorials/phasorpy_phasorplot.py``)
- 00:00.680
- 00:00.663
- 0.0
* - :ref:`sphx_glr_tutorials_phasorpy_phasor_from_lifetime.py` (``../tutorials/phasorpy_phasor_from_lifetime.py``)
- 00:00.451
- 00:00.442
- 0.0
* - :ref:`sphx_glr_tutorials_phasorpy_components.py` (``../tutorials/phasorpy_components.py``)
- 00:00.355
- 00:00.341
- 0.0
* - :ref:`sphx_glr_tutorials_misc_phasorpy_logo.py` (``../tutorials/misc/phasorpy_logo.py``)
- 00:00.048
- 00:00.049
- 0.0
Original file line number Diff line number Diff line change
Expand Up @@ -147,36 +147,36 @@ and number of threads:
harmonics 1
axis -1
phasor_from_signal 0.055s 1.00
threads 2 0.031s 0.57
phasor_from_signal_fft 0.426s 7.79
scipy_fft 0.434s 7.94
phasor_from_signal 0.054s 1.00
threads 2 0.032s 0.58
phasor_from_signal_fft 0.412s 7.59
scipy_fft 0.422s 7.76
axis 0
phasor_from_signal 0.164s 3.00
threads 2 0.080s 1.47
phasor_from_signal_fft 0.684s 12.51
scipy_fft 0.477s 8.73
phasor_from_signal 0.164s 3.01
threads 2 0.081s 1.48
phasor_from_signal_fft 0.700s 12.88
scipy_fft 0.525s 9.67
axis 2
phasor_from_signal 0.054s 0.99
threads 2 0.031s 0.57
phasor_from_signal_fft 0.455s 8.33
scipy_fft 0.398s 7.29
phasor_from_signal 0.054s 1.00
threads 2 0.032s 0.58
phasor_from_signal_fft 0.410s 7.55
scipy_fft 0.424s 7.79
harmonics 8
axis -1
phasor_from_signal 0.436s 7.99
threads 2 0.247s 4.53
phasor_from_signal_fft 0.414s 7.58
scipy_fft 0.410s 7.50
phasor_from_signal 0.437s 8.04
threads 2 0.244s 4.50
phasor_from_signal_fft 0.432s 7.96
scipy_fft 0.441s 8.11
axis 0
phasor_from_signal 1.335s 24.43
threads 2 0.655s 11.98
phasor_from_signal_fft 0.687s 12.58
scipy_fft 0.504s 9.21
phasor_from_signal 1.310s 24.11
threads 2 0.660s 12.14
phasor_from_signal_fft 0.705s 12.97
scipy_fft 0.503s 9.26
axis 2
phasor_from_signal 0.436s 7.98
threads 2 0.246s 4.49
phasor_from_signal_fft 0.413s 7.55
scipy_fft 0.409s 7.48
phasor_from_signal 0.437s 8.05
threads 2 0.252s 4.63
phasor_from_signal_fft 0.429s 7.89
scipy_fft 0.442s 8.13
Expand Down Expand Up @@ -255,7 +255,7 @@ when computing large number of harmonics with an optimized FFT function.

.. rst-class:: sphx-glr-timing

**Total running time of the script:** (0 minutes 10.761 seconds)
**Total running time of the script:** (0 minutes 9.970 seconds)


.. _sphx_glr_download_tutorials_benchmarks_phasorpy_phasor_from_signal.py:
Expand Down
4 changes: 2 additions & 2 deletions main/_sources/tutorials/benchmarks/sg_execution_times.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

Computation times
=================
**00:10.762** total execution time for 1 file **from tutorials/benchmarks**:
**00:09.970** total execution time for 1 file **from tutorials/benchmarks**:

.. container::

Expand All @@ -33,5 +33,5 @@ Computation times
- Time
- Mem (MB)
* - :ref:`sphx_glr_tutorials_benchmarks_phasorpy_phasor_from_signal.py` (``phasorpy_phasor_from_signal.py``)
- 00:10.762
- 00:09.970
- 0.0
2 changes: 1 addition & 1 deletion main/_sources/tutorials/misc/phasorpy_logo.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Create the PhasorPy logo using the PhasorPy library.
.. rst-class:: sphx-glr-timing

**Total running time of the script:** (0 minutes 0.048 seconds)
**Total running time of the script:** (0 minutes 0.049 seconds)


.. _sphx_glr_download_tutorials_misc_phasorpy_logo.py:
Expand Down
4 changes: 2 additions & 2 deletions main/_sources/tutorials/misc/sg_execution_times.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

Computation times
=================
**00:00.048** total execution time for 1 file **from tutorials/misc**:
**00:00.049** total execution time for 1 file **from tutorials/misc**:

.. container::

Expand All @@ -33,5 +33,5 @@ Computation times
- Time
- Mem (MB)
* - :ref:`sphx_glr_tutorials_misc_phasorpy_logo.py` (``phasorpy_logo.py``)
- 00:00.048
- 00:00.049
- 0.0
24 changes: 13 additions & 11 deletions main/_sources/tutorials/phasorpy_components.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ An introduction to component analysis in the phasor space.
Import required modules, functions, and classes:

.. GENERATED FROM PYTHON SOURCE LINES 11-19
.. GENERATED FROM PYTHON SOURCE LINES 11-21
.. code-block:: Python
Expand All @@ -39,14 +39,16 @@ Import required modules, functions, and classes:
from phasorpy.phasor import phasor_from_lifetime
from phasorpy.plot import PhasorPlot
numpy.random.seed(42)
.. GENERATED FROM PYTHON SOURCE LINES 20-27
.. GENERATED FROM PYTHON SOURCE LINES 22-29
Fractions of combination of two components
------------------------------------------
Expand All @@ -56,7 +58,7 @@ the line between the two components. For example, a combination with 25%
contribution of a component with lifetime 8.0 ns and 75% contribution of
a second component with lifetime 1.0 ns at 80 MHz:

.. GENERATED FROM PYTHON SOURCE LINES 27-42
.. GENERATED FROM PYTHON SOURCE LINES 29-44
.. code-block:: Python
Expand Down Expand Up @@ -87,13 +89,13 @@ a second component with lifetime 1.0 ns at 80 MHz:



.. GENERATED FROM PYTHON SOURCE LINES 43-46
.. GENERATED FROM PYTHON SOURCE LINES 45-48
If the location of both components is known, their contributions
to the phasor point that lies on the line between the components
can be calculated:

.. GENERATED FROM PYTHON SOURCE LINES 46-54
.. GENERATED FROM PYTHON SOURCE LINES 48-56
.. code-block:: Python
Expand All @@ -119,15 +121,15 @@ can be calculated:
.. GENERATED FROM PYTHON SOURCE LINES 55-60
.. GENERATED FROM PYTHON SOURCE LINES 57-62
Contribution of two known components in multiple phasors
--------------------------------------------------------

Phasors can have different contributions of two components with known
phasor coordinates:

.. GENERATED FROM PYTHON SOURCE LINES 60-72
.. GENERATED FROM PYTHON SOURCE LINES 62-74
.. code-block:: Python
Expand Down Expand Up @@ -155,13 +157,13 @@ phasor coordinates:



.. GENERATED FROM PYTHON SOURCE LINES 73-76
.. GENERATED FROM PYTHON SOURCE LINES 75-78
If the phasor coordinates of two components contributing to multiple
phasors are known, their fractional contributions to each phasor coordinate
can be calculated and plotted as histograms:

.. GENERATED FROM PYTHON SOURCE LINES 76-103
.. GENERATED FROM PYTHON SOURCE LINES 78-105
.. code-block:: Python
Expand Down Expand Up @@ -204,14 +206,14 @@ can be calculated and plotted as histograms:



.. GENERATED FROM PYTHON SOURCE LINES 104-105
.. GENERATED FROM PYTHON SOURCE LINES 106-107
sphinx_gallery_thumbnail_number = 2


.. rst-class:: sphx-glr-timing

**Total running time of the script:** (0 minutes 0.355 seconds)
**Total running time of the script:** (0 minutes 0.341 seconds)


.. _sphx_glr_download_tutorials_phasorpy_components.py:
Expand Down
2 changes: 1 addition & 1 deletion main/_sources/tutorials/phasorpy_fret.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ mypy: disable-error-code="arg-type"

.. rst-class:: sphx-glr-timing

**Total running time of the script:** (0 minutes 1.698 seconds)
**Total running time of the script:** (0 minutes 1.670 seconds)


.. _sphx_glr_download_tutorials_phasorpy_fret.py:
Expand Down
6 changes: 3 additions & 3 deletions main/_sources/tutorials/phasorpy_introduction.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -424,12 +424,12 @@ Print information about Python interpreter and installed packages:
Python-3.11.9
phasorpy-0.1.dev
numpy-2.0.0
tifffile-2024.6.18
tifffile-2024.7.2
imagecodecs-n/a
lfdfiles-2024.5.24
sdtfile-2024.5.24
ptufile-2024.5.24
matplotlib-3.9.0
matplotlib-3.9.1
scipy-1.14.0
skimage-0.24.0
sklearn-n/a
Expand All @@ -448,7 +448,7 @@ sphinx_gallery_thumbnail_number = 3

.. rst-class:: sphx-glr-timing

**Total running time of the script:** (0 minutes 8.703 seconds)
**Total running time of the script:** (0 minutes 13.430 seconds)


.. _sphx_glr_download_tutorials_phasorpy_introduction.py:
Expand Down
4 changes: 2 additions & 2 deletions main/_sources/tutorials/phasorpy_phasor_from_lifetime.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Import required modules and functions:
from phasorpy.phasor import phasor_from_lifetime, phasor_to_polar
from phasorpy.plot import PhasorPlot, plot_phasor, plot_polar_frequency
rng = numpy.random.default_rng()
rng = numpy.random.default_rng(42)
Expand Down Expand Up @@ -358,7 +358,7 @@ sphinx_gallery_thumbnail_number = -2

.. rst-class:: sphx-glr-timing

**Total running time of the script:** (0 minutes 0.451 seconds)
**Total running time of the script:** (0 minutes 0.442 seconds)


.. _sphx_glr_download_tutorials_phasorpy_phasor_from_lifetime.py:
Expand Down
Loading

0 comments on commit 44d6509

Please sign in to comment.