From c7a0f24fb1272c8a6f2861068b7db06d61462075 Mon Sep 17 00:00:00 2001 From: Yuerou Tang Date: Mon, 12 Aug 2024 21:40:18 -0700 Subject: [PATCH 1/2] fixed displayed image --- .github/workflows/build_docs.yml | 1 + docs/source/sg_execution_times.rst | 50 ++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+) diff --git a/.github/workflows/build_docs.yml b/.github/workflows/build_docs.yml index ab7e66e..ff0a6e2 100644 --- a/.github/workflows/build_docs.yml +++ b/.github/workflows/build_docs.yml @@ -33,6 +33,7 @@ jobs: sudo apt-get update sudo apt-get install -y inkscape sudo apt-get install -y ffmpeg + pip install ffmpeg pip install --upgrade pip pip install -q wheel numpy scipy Pillow==9.5.0 matplotlib opencv-python pip install -q ipython Sphinx sphinx-gallery numpydoc sphinx-rtd-theme sphinx-bootstrap-theme diff --git a/docs/source/sg_execution_times.rst b/docs/source/sg_execution_times.rst index 097d6c7..6b6537c 100644 --- a/docs/source/sg_execution_times.rst +++ b/docs/source/sg_execution_times.rst @@ -47,3 +47,53 @@ Computation times * - :ref:`sphx_glr_auto_examples_introduction_demo_image_coordinates.py` (``../../examples/introduction/demo_image_coordinates.py``) - 00:00.000 - 0.0 + + +:orphan: + +.. _sphx_glr_sg_execution_times: + + +Computation times +================= +**00:02.588** total execution time for 5 files **from all galleries**: + +.. container:: + + .. raw:: html + + + + + + + + .. list-table:: + :header-rows: 1 + :class: table table-striped sg-datatable + + * - Example + - Time + - Mem (MB) + * - :ref:`sphx_glr_auto_examples_introduction_demo_show_filters.py` (``../../examples/introduction/demo_show_filters.py``) + - 00:02.588 + - 0.0 + * - :ref:`sphx_glr_auto_examples_introduction_demo_batching.py` (``../../examples/introduction/demo_batching.py``) + - 00:00.000 + - 0.0 + * - :ref:`sphx_glr_auto_examples_introduction_demo_example.py` (``../../examples/introduction/demo_example.py``) + - 00:00.000 + - 0.0 + * - :ref:`sphx_glr_auto_examples_introduction_demo_gabor_filters.py` (``../../examples/introduction/demo_gabor_filters.py``) + - 00:00.000 + - 0.0 + * - :ref:`sphx_glr_auto_examples_introduction_demo_image_coordinates.py` (``../../examples/introduction/demo_image_coordinates.py``) + - 00:00.000 + - 0.0 From d8935de0ded271e8ca2e61233e35aaf46e08d8f6 Mon Sep 17 00:00:00 2001 From: Yuerou Tang Date: Thu, 15 Aug 2024 15:19:02 -0700 Subject: [PATCH 2/2] fixed ffmpeg position --- .github/workflows/build_docs.yml | 2 +- docs/source/sg_execution_times.rst | 54 +--------------------- examples/introduction/demo_show_filters.py | 3 +- 3 files changed, 5 insertions(+), 54 deletions(-) diff --git a/.github/workflows/build_docs.yml b/.github/workflows/build_docs.yml index ff0a6e2..c670e48 100644 --- a/.github/workflows/build_docs.yml +++ b/.github/workflows/build_docs.yml @@ -33,8 +33,8 @@ jobs: sudo apt-get update sudo apt-get install -y inkscape sudo apt-get install -y ffmpeg - pip install ffmpeg pip install --upgrade pip + pip install ffmpeg pip install -q wheel numpy scipy Pillow==9.5.0 matplotlib opencv-python pip install -q ipython Sphinx sphinx-gallery numpydoc sphinx-rtd-theme sphinx-bootstrap-theme pip install -e . --no-build-isolation diff --git a/docs/source/sg_execution_times.rst b/docs/source/sg_execution_times.rst index 6b6537c..9dabda7 100644 --- a/docs/source/sg_execution_times.rst +++ b/docs/source/sg_execution_times.rst @@ -6,7 +6,7 @@ Computation times ================= -**00:02.412** total execution time for 5 files **from all galleries**: +**00:02.599** total execution time for 5 files **from all galleries**: .. container:: @@ -33,57 +33,7 @@ Computation times - Time - Mem (MB) * - :ref:`sphx_glr_auto_examples_introduction_demo_show_filters.py` (``../../examples/introduction/demo_show_filters.py``) - - 00:02.412 - - 0.0 - * - :ref:`sphx_glr_auto_examples_introduction_demo_batching.py` (``../../examples/introduction/demo_batching.py``) - - 00:00.000 - - 0.0 - * - :ref:`sphx_glr_auto_examples_introduction_demo_example.py` (``../../examples/introduction/demo_example.py``) - - 00:00.000 - - 0.0 - * - :ref:`sphx_glr_auto_examples_introduction_demo_gabor_filters.py` (``../../examples/introduction/demo_gabor_filters.py``) - - 00:00.000 - - 0.0 - * - :ref:`sphx_glr_auto_examples_introduction_demo_image_coordinates.py` (``../../examples/introduction/demo_image_coordinates.py``) - - 00:00.000 - - 0.0 - - -:orphan: - -.. _sphx_glr_sg_execution_times: - - -Computation times -================= -**00:02.588** total execution time for 5 files **from all galleries**: - -.. container:: - - .. raw:: html - - - - - - - - .. list-table:: - :header-rows: 1 - :class: table table-striped sg-datatable - - * - Example - - Time - - Mem (MB) - * - :ref:`sphx_glr_auto_examples_introduction_demo_show_filters.py` (``../../examples/introduction/demo_show_filters.py``) - - 00:02.588 + - 00:02.599 - 0.0 * - :ref:`sphx_glr_auto_examples_introduction_demo_batching.py` (``../../examples/introduction/demo_batching.py``) - 00:00.000 diff --git a/examples/introduction/demo_show_filters.py b/examples/introduction/demo_show_filters.py index b8ae855..6fd15d9 100644 --- a/examples/introduction/demo_show_filters.py +++ b/examples/introduction/demo_show_filters.py @@ -28,7 +28,7 @@ # %% # (*Ignore this code block. It is needed to display the animation as a video on this website*) -output = '../../docs/build/html/_downloads/example_moten_filter.gif' +output = '../../docs/build/html/_downloads/example_moten_filter.mp4' fig = animation._fig title = 'Example filter:\ndirection of motion=180, spatial fq=16cpi, temporal fq=4Hz' fig.suptitle(title) @@ -41,3 +41,4 @@ ax.matshow(spatial_component, vmin=-1, vmax=1, cmap='coolwarm') __ = ax.set_xticks([]) __ = ax.set_yticks([]) +# %%