Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
cgohlke committed May 9, 2024
1 parent fe57189 commit dc0f9d2
Show file tree
Hide file tree
Showing 41 changed files with 133 additions and 129 deletions.
Binary file not shown.
Binary file not shown.
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_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_phasorplot_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_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_phasorplot_010.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_012.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_013.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_thumb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion main/_modules/phasorpy/components.html
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ <h1>Source code for phasorpy.components</h1><div class="highlight"><pre>
<span class="sd"> --------</span>
<span class="sd"> &gt;&gt;&gt; two_fractions_from_phasor(</span>
<span class="sd"> ... [0.6, 0.5, 0.4], [0.4, 0.3, 0.2], [0.2, 0.9], [0.4, 0.3]</span>
<span class="sd"> ... ) # doctest: +NUMBER</span>
<span class="sd"> ... ) # doctest: +NUMBER</span>
<span class="sd"> (array([0.44, 0.56, 0.68]), array([0.56, 0.44, 0.32]))</span>

<span class="sd"> &quot;&quot;&quot;</span>
Expand Down
34 changes: 17 additions & 17 deletions main/_modules/phasorpy/phasor.html
Original file line number Diff line number Diff line change
Expand Up @@ -668,10 +668,10 @@ <h1>Source code for phasorpy.phasor</h1><div class="highlight"><pre>

<span class="sd"> &gt;&gt;&gt; sample_phase = numpy.linspace(0, 2 * math.pi, 5, endpoint=False)[::-1]</span>
<span class="sd"> &gt;&gt;&gt; signal = 1.1 * (</span>
<span class="sd"> ... numpy.cos(sample_phase - 0.78539816) * 2 * 0.70710678 + 1</span>
<span class="sd"> ... numpy.cos(sample_phase - 0.78539816) * 2 * 0.70710678 + 1</span>
<span class="sd"> ... )</span>
<span class="sd"> &gt;&gt;&gt; phasor_from_signal(</span>
<span class="sd"> ... signal, sample_phase=sample_phase</span>
<span class="sd"> ... signal, sample_phase=sample_phase</span>
<span class="sd"> ... ) # doctest: +NUMBER</span>
<span class="sd"> (1.1, 0.5, 0.5)</span>

Expand Down Expand Up @@ -818,7 +818,7 @@ <h1>Source code for phasorpy.phasor</h1><div class="highlight"><pre>

<span class="sd"> &gt;&gt;&gt; sample_phase = numpy.linspace(0, 2 * math.pi, 5, endpoint=False)</span>
<span class="sd"> &gt;&gt;&gt; signal = 1.1 * (</span>
<span class="sd"> ... numpy.cos(sample_phase - 0.78539816) * 2 * 0.70710678 + 1</span>
<span class="sd"> ... numpy.cos(sample_phase - 0.78539816) * 2 * 0.70710678 + 1</span>
<span class="sd"> ... )</span>
<span class="sd"> &gt;&gt;&gt; phasor_from_signal_fft(signal, harmonic=[1, 2]) # doctest: +NUMBER</span>
<span class="sd"> (1.1, array([0.5, 0.0]), array([0.5, -0]))</span>
Expand Down Expand Up @@ -1044,10 +1044,13 @@ <h1>Source code for phasorpy.phasor</h1><div class="highlight"><pre>
<span class="sd"> Examples</span>
<span class="sd"> --------</span>
<span class="sd"> &gt;&gt;&gt; phasor_calibrate(</span>
<span class="sd"> ... [0.1, 0.2, 0.3], [0.4, 0.5, 0.6],</span>
<span class="sd"> ... [0.2, 0.3, 0.4], [0.5, 0.6, 0.7],</span>
<span class="sd"> ... frequency=80, lifetime=4</span>
<span class="sd"> ... ) # doctest: +NUMBER</span>
<span class="sd"> ... [0.1, 0.2, 0.3],</span>
<span class="sd"> ... [0.4, 0.5, 0.6],</span>
<span class="sd"> ... [0.2, 0.3, 0.4],</span>
<span class="sd"> ... [0.5, 0.6, 0.7],</span>
<span class="sd"> ... frequency=80,</span>
<span class="sd"> ... lifetime=4,</span>
<span class="sd"> ... ) # doctest: +NUMBER</span>
<span class="sd"> (array([0.0658, 0.132, 0.198]), array([0.2657, 0.332, 0.399]))</span>

<span class="sd"> &quot;&quot;&quot;</span>
Expand Down Expand Up @@ -1138,18 +1141,15 @@ <h1>Source code for phasorpy.phasor</h1><div class="highlight"><pre>
<span class="sd"> Use scalar reference coordinates to rotate and scale phasor coordinates:</span>

<span class="sd"> &gt;&gt;&gt; phasor_transform(</span>
<span class="sd"> ... [0.1, 0.2, 0.3],</span>
<span class="sd"> ... [0.4, 0.5, 0.6],</span>
<span class="sd"> ... 0.1,</span>
<span class="sd"> ... 0.5</span>
<span class="sd"> ... ) # doctest: +NUMBER</span>
<span class="sd"> ... [0.1, 0.2, 0.3], [0.4, 0.5, 0.6], 0.1, 0.5</span>
<span class="sd"> ... ) # doctest: +NUMBER</span>
<span class="sd"> (array([0.0298, 0.0745, 0.119]), array([0.204, 0.259, 0.3135]))</span>

<span class="sd"> Use separate reference coordinates for each phasor coordinate:</span>

<span class="sd"> &gt;&gt;&gt; phasor_transform(</span>
<span class="sd"> ... [0.1, 0.2, 0.3], [0.4, 0.5, 0.6], [0.2, 0.2, 0.3], [0.5, 0.2, 0.3]</span>
<span class="sd"> ... ) # doctest: +NUMBER</span>
<span class="sd"> ... ) # doctest: +NUMBER</span>
<span class="sd"> (array([0.00927, 0.0193, 0.0328]), array([0.206, 0.106, 0.1986]))</span>

<span class="sd"> &quot;&quot;&quot;</span>
Expand Down Expand Up @@ -1213,7 +1213,7 @@ <h1>Source code for phasorpy.phasor</h1><div class="highlight"><pre>

<span class="sd"> polar_from_reference(</span>
<span class="sd"> *phasor_to_polar(measured_real, measured_imag),</span>
<span class="sd"> *phasor_to_polar(known_real, known_imag)</span>
<span class="sd"> *phasor_to_polar(known_real, known_imag),</span>
<span class="sd"> )</span>

<span class="sd"> Examples</span>
Expand Down Expand Up @@ -1459,7 +1459,7 @@ <h1>Source code for phasorpy.phasor</h1><div class="highlight"><pre>
<span class="sd"> only if the phasor coordinates lie on the universal semicircle:</span>

<span class="sd"> &gt;&gt;&gt; phasor_to_apparent_lifetime(</span>
<span class="sd"> ... 0.5, [0.5, 0.45], frequency=80</span>
<span class="sd"> ... 0.5, [0.5, 0.45], frequency=80</span>
<span class="sd"> ... ) # doctest: +NUMBER</span>
<span class="sd"> (array([1.989, 1.79]), array([1.989, 2.188]))</span>

Expand Down Expand Up @@ -1894,7 +1894,7 @@ <h1>Source code for phasorpy.phasor</h1><div class="highlight"><pre>
<span class="sd"> Phasor coordinates of many single-component lifetimes (fractions omitted):</span>

<span class="sd"> &gt;&gt;&gt; phasor_from_lifetime(</span>
<span class="sd"> ... 80.0, [3.9788735, 1.9894368, 0.9947183],</span>
<span class="sd"> ... 80.0, [3.9788735, 1.9894368, 0.9947183]</span>
<span class="sd"> ... ) # doctest: +NUMBER</span>
<span class="sd"> (array([0.2, 0.5, 0.8]), array([0.4, 0.5, 0.4]))</span>

Expand All @@ -1920,7 +1920,7 @@ <h1>Source code for phasorpy.phasor</h1><div class="highlight"><pre>
<span class="sd"> ... [40e6, 80e6],</span>
<span class="sd"> ... [[1e-9, 0.9947183e-9], [3.9788735e-9, 0.9947183e-9]],</span>
<span class="sd"> ... [[0, 1], [0.5, 0.5]],</span>
<span class="sd"> ... unit_conversion=1.0</span>
<span class="sd"> ... unit_conversion=1.0,</span>
<span class="sd"> ... ) # doctest: +NUMBER</span>
<span class="sd"> (array([[0.941, 0.721], [0.8, 0.5]]), array([[0.235, 0.368], [0.4, 0.4]]))</span>

Expand Down
4 changes: 3 additions & 1 deletion main/_sources/contributing.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -188,13 +188,15 @@ Configuration settings for pytest and other tools are in the
Code standards
..............

All the PhasorPy source code must conform to the
All the PhasorPy source code, including tutorials and docstring examples,
must conform to the
`PEP8 <https://peps.python.org/pep-0008/>`_
standard and be formatted with
`black <https://black.readthedocs.io/en/stable/>`_
(single quotes and lines up to 79 characters are allowed)::

$ python -m black .
$ python -m blackdoc src/phasorpy

User-facing classes and functions must use
`type hints <https://peps.python.org/pep-0484/>`_
Expand Down
16 changes: 8 additions & 8 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:27.588** total execution time for 7 files **from all galleries**:
**00:30.777** total execution time for 7 files **from all galleries**:

.. container::

Expand All @@ -33,23 +33,23 @@ Computation times
- Time
- Mem (MB)
* - :ref:`sphx_glr_tutorials_benchmarks_phasorpy_phasor_from_signal.py` (``../tutorials/benchmarks/phasorpy_phasor_from_signal.py``)
- 00:13.684
- 00:14.354
- 0.0
* - :ref:`sphx_glr_tutorials_phasorpy_introduction.py` (``../tutorials/phasorpy_introduction.py``)
- 00:09.610
- 00:12.355
- 0.0
* - :ref:`sphx_glr_tutorials_phasorpy_fret.py` (``../tutorials/phasorpy_fret.py``)
- 00:02.257
- 00:02.104
- 0.0
* - :ref:`sphx_glr_tutorials_phasorpy_phasorplot.py` (``../tutorials/phasorpy_phasorplot.py``)
- 00:00.900
- 00:00.868
- 0.0
* - :ref:`sphx_glr_tutorials_phasorpy_phasor_from_lifetime.py` (``../tutorials/phasorpy_phasor_from_lifetime.py``)
- 00:00.605
- 00:00.584
- 0.0
* - :ref:`sphx_glr_tutorials_phasorpy_components.py` (``../tutorials/phasorpy_components.py``)
- 00:00.469
- 00:00.450
- 0.0
* - :ref:`sphx_glr_tutorials_misc_phasorpy_logo.py` (``../tutorials/misc/phasorpy_logo.py``)
- 00:00.063
- 00:00.062
- 0.0
Original file line number Diff line number Diff line change
Expand Up @@ -149,34 +149,34 @@ and number of threads:
axis -1
phasor_from_signal 0.056s 1.00
threads 2 0.032s 0.57
phasor_from_signal_fft 0.395s 7.08
scipy_fft 0.399s 7.15
phasor_from_signal_fft 0.410s 7.32
scipy_fft 0.438s 7.82
axis 0
phasor_from_signal 0.165s 2.95
phasor_from_signal 0.165s 2.94
threads 2 0.081s 1.44
phasor_from_signal_fft 2.661s 47.71
scipy_fft 0.488s 8.76
phasor_from_signal_fft 3.002s 53.63
scipy_fft 0.515s 9.20
axis 2
phasor_from_signal 0.056s 1.00
threads 2 0.032s 0.57
phasor_from_signal_fft 0.396s 7.09
scipy_fft 0.411s 7.37
phasor_from_signal_fft 0.416s 7.43
scipy_fft 0.433s 7.73
harmonics 8
axis -1
phasor_from_signal 0.447s 8.00
threads 2 0.246s 4.42
phasor_from_signal_fft 0.411s 7.36
scipy_fft 0.423s 7.59
phasor_from_signal 0.454s 8.11
threads 2 0.245s 4.38
phasor_from_signal_fft 0.443s 7.91
scipy_fft 0.425s 7.59
axis 0
phasor_from_signal 1.315s 23.57
threads 2 0.658s 11.80
phasor_from_signal_fft 2.663s 47.74
scipy_fft 0.490s 8.78
phasor_from_signal 1.341s 23.96
threads 2 0.656s 11.73
phasor_from_signal_fft 2.745s 49.04
scipy_fft 0.522s 9.32
axis 2
phasor_from_signal 0.445s 7.98
threads 2 0.246s 4.41
phasor_from_signal_fft 0.407s 7.29
scipy_fft 0.424s 7.60
phasor_from_signal 0.444s 7.94
threads 2 0.248s 4.42
phasor_from_signal_fft 0.417s 7.45
scipy_fft 0.433s 7.73
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 13.684 seconds)
**Total running time of the script:** (0 minutes 14.354 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:13.684** total execution time for 1 file **from tutorials/benchmarks**:
**00:14.354** 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:13.684
- 00:14.354
- 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.063 seconds)
**Total running time of the script:** (0 minutes 0.062 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.063** total execution time for 1 file **from tutorials/misc**:
**00:00.062** 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.063
- 00:00.062
- 0.0
2 changes: 1 addition & 1 deletion main/_sources/tutorials/phasorpy_components.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ sphinx_gallery_thumbnail_number = 2

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

**Total running time of the script:** (0 minutes 0.469 seconds)
**Total running time of the script:** (0 minutes 0.450 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 2.257 seconds)
**Total running time of the script:** (0 minutes 2.104 seconds)


.. _sphx_glr_download_tutorials_phasorpy_fret.py:
Expand Down
4 changes: 2 additions & 2 deletions main/_sources/tutorials/phasorpy_introduction.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ Print information about Python interpreter and installed packages:
Python-3.11.9
phasorpy-0.1.dev
numpy-1.26.4
tifffile-2024.4.24
tifffile-2024.5.3
imagecodecs-n/a
lfdfiles-2024.4.24
sdtfile-2024.4.24
Expand All @@ -448,7 +448,7 @@ sphinx_gallery_thumbnail_number = 3

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

**Total running time of the script:** (0 minutes 9.610 seconds)
**Total running time of the script:** (0 minutes 12.355 seconds)


.. _sphx_glr_download_tutorials_phasorpy_introduction.py:
Expand Down
Original file line number Diff line number Diff line change
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.605 seconds)
**Total running time of the script:** (0 minutes 0.584 seconds)


.. _sphx_glr_download_tutorials_phasorpy_phasor_from_lifetime.py:
Expand Down
2 changes: 1 addition & 1 deletion main/_sources/tutorials/phasorpy_phasorplot.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ sphinx_gallery_thumbnail_number = 10

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

**Total running time of the script:** (0 minutes 0.900 seconds)
**Total running time of the script:** (0 minutes 0.868 seconds)


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

Computation times
=================
**00:13.841** total execution time for 5 files **from tutorials**:
**00:16.360** total execution time for 5 files **from tutorials**:

.. container::

Expand All @@ -33,17 +33,17 @@ Computation times
- Time
- Mem (MB)
* - :ref:`sphx_glr_tutorials_phasorpy_introduction.py` (``phasorpy_introduction.py``)
- 00:09.610
- 00:12.355
- 0.0
* - :ref:`sphx_glr_tutorials_phasorpy_fret.py` (``phasorpy_fret.py``)
- 00:02.257
- 00:02.104
- 0.0
* - :ref:`sphx_glr_tutorials_phasorpy_phasorplot.py` (``phasorpy_phasorplot.py``)
- 00:00.900
- 00:00.868
- 0.0
* - :ref:`sphx_glr_tutorials_phasorpy_phasor_from_lifetime.py` (``phasorpy_phasor_from_lifetime.py``)
- 00:00.605
- 00:00.584
- 0.0
* - :ref:`sphx_glr_tutorials_phasorpy_components.py` (``phasorpy_components.py``)
- 00:00.469
- 00:00.450
- 0.0
2 changes: 1 addition & 1 deletion main/api/components.html
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">two_fractions_from_phasor</span><span class="p">(</span>
<span class="gp">... </span> <span class="p">[</span><span class="mf">0.6</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.4</span><span class="p">],</span> <span class="p">[</span><span class="mf">0.4</span><span class="p">,</span> <span class="mf">0.3</span><span class="p">,</span> <span class="mf">0.2</span><span class="p">],</span> <span class="p">[</span><span class="mf">0.2</span><span class="p">,</span> <span class="mf">0.9</span><span class="p">],</span> <span class="p">[</span><span class="mf">0.4</span><span class="p">,</span> <span class="mf">0.3</span><span class="p">]</span>
<span class="gp">... </span><span class="p">)</span>
<span class="gp">... </span><span class="p">)</span>
<span class="go">(array([0.44, 0.56, 0.68]), array([0.56, 0.44, 0.32]))</span>
</pre></div>
</div>
Expand Down
Loading

0 comments on commit dc0f9d2

Please sign in to comment.