Skip to content

Commit

Permalink
deploy: 1bc60b8
Browse files Browse the repository at this point in the history
  • Loading branch information
qian-chu committed Dec 30, 2024
1 parent 1c45c77 commit 6a8fdbe
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 58 deletions.
8 changes: 3 additions & 5 deletions genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -562,6 +562,8 @@ <h2 id="P">P</h2>

<ul>
<li><a href="reference/recording.html#pyneon.NeonRecording.plot_scanpath_on_video">(pyneon.NeonRecording method)</a>
</li>
<li><a href="reference/video.html#pyneon.video.NeonVideo.plot_scanpath_on_video">(pyneon.video.NeonVideo method)</a>
</li>
</ul></li>
<li>
Expand Down Expand Up @@ -657,12 +659,8 @@ <h2 id="S">S</h2>
</li>
<li><a href="reference/events.html#pyneon.events.NeonEV.start_ts">start_ts (pyneon.events.NeonEV property)</a>
</li>
<li><a href="reference/video.html#pyneon.video.sync_gaze_to_video">sync_gaze_to_video() (in module pyneon.video)</a>

<ul>
<li><a href="reference/recording.html#pyneon.NeonRecording.sync_gaze_to_video">(pyneon.NeonRecording method)</a>
<li><a href="reference/recording.html#pyneon.NeonRecording.sync_gaze_to_video">sync_gaze_to_video() (pyneon.NeonRecording method)</a>
</li>
</ul></li>
</ul></td>
</tr></table>

Expand Down
Binary file modified objects.inv
Binary file not shown.
1 change: 0 additions & 1 deletion reference/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,6 @@
</li>
<li class="toctree-l1"><a class="reference internal" href="video.html">Scene video class</a><ul>
<li class="toctree-l2"><a class="reference internal" href="video.html#pyneon.video.NeonVideo"><code class="docutils literal notranslate"><span class="pre">NeonVideo</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="video.html#pyneon.video.sync_gaze_to_video"><code class="docutils literal notranslate"><span class="pre">sync_gaze_to_video()</span></code></a></li>
<li class="toctree-l2"><a class="reference internal" href="video.html#pyneon.video.estimate_scanpath"><code class="docutils literal notranslate"><span class="pre">estimate_scanpath()</span></code></a></li>
</ul>
</li>
Expand Down
42 changes: 20 additions & 22 deletions reference/recording.html

Large diffs are not rendered by default.

47 changes: 19 additions & 28 deletions reference/video.html
Original file line number Diff line number Diff line change
Expand Up @@ -459,35 +459,26 @@
</dl>
</dd></dl>

</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="pyneon.video.sync_gaze_to_video">
<span class="sig-prename descclassname"><span class="pre">pyneon.video.</span></span><span class="sig-name descname"><span class="pre">sync_gaze_to_video</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">rec</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference internal" href="recording.html#pyneon.NeonRecording" title="pyneon.NeonRecording"><span class="pre">NeonRecording</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">window_size</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.13)"><span class="pre">int</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/constants.html#None" title="(in Python v3.13)"><span class="pre">None</span></a></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><a class="reference external" href="https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.html#pandas.DataFrame" title="(in pandas v2.2.3)"><span class="pre">DataFrame</span></a></span></span><a class="headerlink" href="#pyneon.video.sync_gaze_to_video" title="Link to this definition">#</a></dt>
<dd><p>Synchronize gaze data to video frames by applying windowed averaging
around each video frame timestamp. See <code class="xref py py-func docutils literal notranslate"><span class="pre">window_average()</span></code> for details
on the averaging process.</p>
<section id="parameters">
<h2>Parameters:<a class="headerlink" href="#parameters" title="Link to this heading">#</a></h2>
<dl class="simple">
<dt>rec<span class="classifier">NeonRecording</span></dt><dd><p>Recording object containing gaze and video data.</p>
</dd>
<dt>window_size<span class="classifier">int, optional</span></dt><dd><p>The size of the time window (in nanoseconds)
over which to compute the average around each new timestamp.
If <code class="docutils literal notranslate"><span class="pre">None</span></code> (default), the window size is set to the median interval
between the new timestamps, i.e., <code class="docutils literal notranslate"><span class="pre">np.median(np.diff(new_ts))</span></code>.
The window size must be larger than the median interval between the original data timestamps,
i.e., <code class="docutils literal notranslate"><span class="pre">window_size</span> <span class="pre">&gt;</span> <span class="pre">np.median(np.diff(data.index))</span></code>.</p>
</dd>
</dl>
</section>
<section id="returns">
<h2>Returns:<a class="headerlink" href="#returns" title="Link to this heading">#</a></h2>
<dl class="simple">
<dt>pd.DataFrame</dt><dd><p>DataFrame containing gaze data mapped to video timestamps.</p>
<dl class="py method">
<dt class="sig sig-object py" id="pyneon.video.NeonVideo.plot_scanpath_on_video">
<span class="sig-name descname"><span class="pre">plot_scanpath_on_video</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">scanpath</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.html#pandas.DataFrame" title="(in pandas v2.2.3)"><span class="pre">DataFrame</span></a></span></em>, <em class="sig-param"><span class="n"><span class="pre">circle_radius</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.13)"><span class="pre">int</span></a></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">10</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">line_thickness</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.13)"><span class="pre">int</span></a></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">2</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">max_fixations</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.13)"><span class="pre">int</span></a></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">10</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">show_video</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.13)"><span class="pre">bool</span></a></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">video_output_path</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/pathlib.html#pathlib.Path" title="(in Python v3.13)"><span class="pre">Path</span></a><span class="w"> </span><span class="p"><span class="pre">|</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.13)"><span class="pre">str</span></a></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">'scanpath.mp4'</span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><a class="reference external" href="https://docs.python.org/3/library/constants.html#None" title="(in Python v3.13)"><span class="pre">None</span></a></span></span><a class="headerlink" href="#pyneon.video.NeonVideo.plot_scanpath_on_video" title="Link to this definition">#</a></dt>
<dd><p>Plot scanpath on top of the video frames. The resulting video can be displayed and/or saved.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>scanpath</strong> (<a class="reference external" href="https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.html#pandas.DataFrame" title="(in pandas v2.2.3)"><code class="xref py py-class docutils literal notranslate"><span class="pre">pandas.DataFrame</span></code></a>) – DataFrame containing the fixations and gaze data.</p></li>
<li><p><strong>circle_radius</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.13)"><em>int</em></a>) – Radius of the fixation circles in pixels. Defaults to 10.</p></li>
<li><p><strong>line_thickness</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.13)"><em>int</em></a><em> or </em><em>None</em>) – Thickness of the lines connecting fixations. If None, no lines are drawn.
Defaults to 2.</p></li>
<li><p><strong>max_fixations</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.13)"><em>int</em></a>) – Maximum number of fixations to plot per frame. Defaults to 10.</p></li>
<li><p><strong>show_video</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.13)"><em>bool</em></a>) – Whether to display the video with fixations overlaid. Defaults to False.</p></li>
<li><p><strong>video_output_path</strong> (<a class="reference external" href="https://docs.python.org/3/library/pathlib.html#pathlib.Path" title="(in Python v3.13)"><code class="xref py py-class docutils literal notranslate"><span class="pre">pathlib.Path</span></code></a> or str or None) – Path to save the video with fixations overlaid. If None, the video is not saved.
Defaults to ‘scanpath.mp4’.</p></li>
</ul>
</dd>
</dl>
</section>
</dd></dl>

</dd></dl>

<dl class="py function">
Expand Down Expand Up @@ -568,9 +559,9 @@ <h2>Returns:<a class="headerlink" href="#returns" title="Link to this heading">#
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#pyneon.video.NeonVideo.width"><code class="docutils literal notranslate"><span class="pre">NeonVideo.width</span></code></a></li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#pyneon.video.NeonVideo.height"><code class="docutils literal notranslate"><span class="pre">NeonVideo.height</span></code></a></li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#pyneon.video.NeonVideo.plot_frame"><code class="docutils literal notranslate"><span class="pre">NeonVideo.plot_frame()</span></code></a></li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#pyneon.video.NeonVideo.plot_scanpath_on_video"><code class="docutils literal notranslate"><span class="pre">NeonVideo.plot_scanpath_on_video()</span></code></a></li>
</ul>
</li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#pyneon.video.sync_gaze_to_video"><code class="docutils literal notranslate"><span class="pre">sync_gaze_to_video()</span></code></a></li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#pyneon.video.estimate_scanpath"><code class="docutils literal notranslate"><span class="pre">estimate_scanpath()</span></code></a></li>
</ul>
</nav></div>
Expand Down
Loading

0 comments on commit 6a8fdbe

Please sign in to comment.