Skip to content

Commit

Permalink
deploy: f498b47
Browse files Browse the repository at this point in the history
  • Loading branch information
niksirbi committed Sep 18, 2023
1 parent 1ae2d8b commit 7c17f14
Show file tree
Hide file tree
Showing 13 changed files with 29 additions and 28 deletions.
2 changes: 1 addition & 1 deletion .buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 0825e4f919f5f738f1b4e255bd30900d
config: 99427ca175a9ac675cf66b0d913fc4af
tags: 645f666f9bcd5a90fca523b33c5a78b7
Binary file modified .doctrees/auto_examples/load_and_explore_poses.doctree
Binary file not shown.
Binary file modified .doctrees/auto_examples/sg_execution_times.doctree
Binary file not shown.
Binary file modified .doctrees/contributing.doctree
Binary file not shown.
Binary file modified .doctrees/environment.pickle
Binary file not shown.
Binary file not shown.
Binary file not shown.
26 changes: 14 additions & 12 deletions _modules/movement/io/validators.html
Original file line number Diff line number Diff line change
Expand Up @@ -608,6 +608,18 @@ <h1>Source code for movement.io.validators</h1><div class="highlight"><pre>
<span class="k">return</span> <span class="n">fps</span>


<span class="k">def</span> <span class="nf">_validate_list_length</span><span class="p">(</span>
<span class="n">attribute</span><span class="p">:</span> <span class="nb">str</span><span class="p">,</span> <span class="n">value</span><span class="p">:</span> <span class="n">Optional</span><span class="p">[</span><span class="n">List</span><span class="p">],</span> <span class="n">expected_length</span><span class="p">:</span> <span class="nb">int</span>
<span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Raise a ValueError if the list does not have the expected length.&quot;&quot;&quot;</span>
<span class="k">if</span> <span class="p">(</span><span class="n">value</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">)</span> <span class="ow">and</span> <span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">value</span><span class="p">)</span> <span class="o">!=</span> <span class="n">expected_length</span><span class="p">):</span>
<span class="k">raise</span> <span class="n">log_error</span><span class="p">(</span>
<span class="ne">ValueError</span><span class="p">,</span>
<span class="sa">f</span><span class="s2">&quot;Expected `</span><span class="si">{</span><span class="n">attribute</span><span class="si">}</span><span class="s2">` to have length </span><span class="si">{</span><span class="n">expected_length</span><span class="si">}</span><span class="s2">, &quot;</span>
<span class="sa">f</span><span class="s2">&quot;but got </span><span class="si">{</span><span class="nb">len</span><span class="p">(</span><span class="n">value</span><span class="p">)</span><span class="si">}</span><span class="s2">.&quot;</span><span class="p">,</span>
<span class="p">)</span>


<div class="viewcode-block" id="ValidPoseTracks"><a class="viewcode-back" href="../../../auto_api/movement.io.validators.ValidPoseTracks.html#movement.io.validators.ValidPoseTracks">[docs]</a><span class="nd">@define</span><span class="p">(</span><span class="n">kw_only</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
<span class="k">class</span> <span class="nc">ValidPoseTracks</span><span class="p">:</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Class for validating pose tracking data imported from a file.</span>
Expand Down Expand Up @@ -683,21 +695,11 @@ <h1>Source code for movement.io.validators</h1><div class="highlight"><pre>

<span class="nd">@individual_names</span><span class="o">.</span><span class="n">validator</span>
<span class="k">def</span> <span class="nf">_validate_individual_names</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">attribute</span><span class="p">,</span> <span class="n">value</span><span class="p">):</span>
<span class="k">if</span> <span class="p">(</span><span class="n">value</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">)</span> <span class="ow">and</span> <span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">value</span><span class="p">)</span> <span class="o">!=</span> <span class="bp">self</span><span class="o">.</span><span class="n">tracks_array</span><span class="o">.</span><span class="n">shape</span><span class="p">[</span><span class="mi">1</span><span class="p">]):</span>
<span class="k">raise</span> <span class="n">log_error</span><span class="p">(</span>
<span class="ne">ValueError</span><span class="p">,</span>
<span class="sa">f</span><span class="s2">&quot;Expected </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">tracks_array</span><span class="o">.</span><span class="n">shape</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span><span class="si">}</span><span class="s2"> `</span><span class="si">{</span><span class="n">attribute</span><span class="si">}</span><span class="s2">`, &quot;</span>
<span class="sa">f</span><span class="s2">&quot;but got </span><span class="si">{</span><span class="nb">len</span><span class="p">(</span><span class="n">value</span><span class="p">)</span><span class="si">}</span><span class="s2">.&quot;</span><span class="p">,</span>
<span class="p">)</span>
<span class="n">_validate_list_length</span><span class="p">(</span><span class="n">attribute</span><span class="p">,</span> <span class="n">value</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">tracks_array</span><span class="o">.</span><span class="n">shape</span><span class="p">[</span><span class="mi">1</span><span class="p">])</span>

<span class="nd">@keypoint_names</span><span class="o">.</span><span class="n">validator</span>
<span class="k">def</span> <span class="nf">_validate_keypoint_names</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">attribute</span><span class="p">,</span> <span class="n">value</span><span class="p">):</span>
<span class="k">if</span> <span class="p">(</span><span class="n">value</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span><span class="p">)</span> <span class="ow">and</span> <span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">value</span><span class="p">)</span> <span class="o">!=</span> <span class="bp">self</span><span class="o">.</span><span class="n">tracks_array</span><span class="o">.</span><span class="n">shape</span><span class="p">[</span><span class="mi">2</span><span class="p">]):</span>
<span class="k">raise</span> <span class="n">log_error</span><span class="p">(</span>
<span class="ne">ValueError</span><span class="p">,</span>
<span class="sa">f</span><span class="s2">&quot;Expected </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">tracks_array</span><span class="o">.</span><span class="n">shape</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span><span class="si">}</span><span class="s2"> `</span><span class="si">{</span><span class="n">attribute</span><span class="si">}</span><span class="s2">`, &quot;</span>
<span class="sa">f</span><span class="s2">&quot;but got </span><span class="si">{</span><span class="nb">len</span><span class="p">(</span><span class="n">value</span><span class="p">)</span><span class="si">}</span><span class="s2">.&quot;</span><span class="p">,</span>
<span class="p">)</span>
<span class="n">_validate_list_length</span><span class="p">(</span><span class="n">attribute</span><span class="p">,</span> <span class="n">value</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">tracks_array</span><span class="o">.</span><span class="n">shape</span><span class="p">[</span><span class="mi">2</span><span class="p">])</span>

<span class="k">def</span> <span class="nf">__attrs_post_init__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Assign default values to optional attributes (if None)&quot;&quot;&quot;</span>
Expand Down
10 changes: 5 additions & 5 deletions _sources/auto_examples/load_and_explore_poses.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ e.g., ``file_path = "/path/to/my/data.h5"``)

.. code-block:: none
0.00B [00:00, ?B/s] 16.4kB [00:00, 108kB/s] 0.00B [00:00, ?B/s] 0.00B [00:00, ?B/s]
0.00B [00:00, ?B/s] 0.00B [00:00, ?B/s] 0.00B [00:00, ?B/s]



Expand Down Expand Up @@ -226,7 +226,7 @@ using ``xarray``'s built-in plotting methods:
.. code-block:: none
<xarray.plot.facetgrid.FacetGrid object at 0x7f5275a23310>
<xarray.plot.facetgrid.FacetGrid object at 0x7f8ac6de3fd0>
Expand Down Expand Up @@ -257,7 +257,7 @@ for all individuals:
.. code-block:: none
<xarray.plot.facetgrid.FacetGrid object at 0x7f527479bdd0>
<xarray.plot.facetgrid.FacetGrid object at 0x7f8ac59e8990>
Expand Down Expand Up @@ -301,14 +301,14 @@ For example, we can use ``matplotlib`` to plot trajectories
.. code-block:: none
<matplotlib.colorbar.Colorbar object at 0x7f5272384650>
<matplotlib.colorbar.Colorbar object at 0x7f8ac361c850>
.. rst-class:: sphx-glr-timing

**Total running time of the script:** (0 minutes 2.845 seconds)
**Total running time of the script:** (0 minutes 1.912 seconds)


.. _sphx_glr_download_auto_examples_load_and_explore_poses.py:
Expand Down
4 changes: 2 additions & 2 deletions _sources/auto_examples/sg_execution_times.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

Computation times
=================
**00:02.845** total execution time for **auto_examples** files:
**00:01.912** total execution time for **auto_examples** files:

+-----------------------------------------------------------------------------------------+-----------+--------+
| :ref:`sphx_glr_auto_examples_load_and_explore_poses.py` (``load_and_explore_poses.py``) | 00:02.845 | 0.0 MB |
| :ref:`sphx_glr_auto_examples_load_and_explore_poses.py` (``load_and_explore_poses.py``) | 00:01.912 | 0.0 MB |
+-----------------------------------------------------------------------------------------+-----------+--------+
9 changes: 4 additions & 5 deletions auto_examples/load_and_explore_poses.html
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,6 @@ <h2>Fetch an example dataset<a class="headerlink" href="#fetch-an-example-datase
</pre></div>
</div>
<div class="sphx-glr-script-out highlight-none notranslate"><div class="highlight"><pre><span></span>0.00B [00:00, ?B/s]
16.4kB [00:00, 108kB/s]
0.00B [00:00, ?B/s]
0.00B [00:00, ?B/s]
</pre></div>
Expand Down Expand Up @@ -499,7 +498,7 @@ <h2>Select and plot data with xarray<a class="headerlink" href="#select-and-plot
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">da</span><span class="o">.</span><span class="n">plot</span><span class="o">.</span><span class="n">line</span><span class="p">(</span><span class="n">x</span><span class="o">=</span><span class="s2">&quot;time&quot;</span><span class="p">,</span> <span class="n">row</span><span class="o">=</span><span class="s2">&quot;space&quot;</span><span class="p">,</span> <span class="n">aspect</span><span class="o">=</span><span class="mi">2</span><span class="p">,</span> <span class="n">size</span><span class="o">=</span><span class="mf">2.5</span><span class="p">)</span>
</pre></div>
</div>
<img src="../_images/sphx_glr_load_and_explore_poses_001.png" srcset="../_images/sphx_glr_load_and_explore_poses_001.png" alt="space = x, space = y" class = "sphx-glr-single-img"/><div class="sphx-glr-script-out highlight-none notranslate"><div class="highlight"><pre><span></span>&lt;xarray.plot.facetgrid.FacetGrid object at 0x7f5275a23310&gt;
<img src="../_images/sphx_glr_load_and_explore_poses_001.png" srcset="../_images/sphx_glr_load_and_explore_poses_001.png" alt="space = x, space = y" class = "sphx-glr-single-img"/><div class="sphx-glr-script-out highlight-none notranslate"><div class="highlight"><pre><span></span>&lt;xarray.plot.facetgrid.FacetGrid object at 0x7f8ac6de3fd0&gt;
</pre></div>
</div>
<p>Similarly we could plot the same keypoint’s x, y coordinates
Expand All @@ -508,7 +507,7 @@ <h2>Select and plot data with xarray<a class="headerlink" href="#select-and-plot
<span class="n">da</span><span class="o">.</span><span class="n">plot</span><span class="o">.</span><span class="n">line</span><span class="p">(</span><span class="n">x</span><span class="o">=</span><span class="s2">&quot;time&quot;</span><span class="p">,</span> <span class="n">row</span><span class="o">=</span><span class="s2">&quot;individuals&quot;</span><span class="p">,</span> <span class="n">aspect</span><span class="o">=</span><span class="mi">2</span><span class="p">,</span> <span class="n">size</span><span class="o">=</span><span class="mf">2.5</span><span class="p">)</span>
</pre></div>
</div>
<img src="../_images/sphx_glr_load_and_explore_poses_002.png" srcset="../_images/sphx_glr_load_and_explore_poses_002.png" alt="individuals = AEON3B_NTP, individuals = AEON3B_TP1, individuals = AEON3B_TP2" class = "sphx-glr-single-img"/><div class="sphx-glr-script-out highlight-none notranslate"><div class="highlight"><pre><span></span>&lt;xarray.plot.facetgrid.FacetGrid object at 0x7f527479bdd0&gt;
<img src="../_images/sphx_glr_load_and_explore_poses_002.png" srcset="../_images/sphx_glr_load_and_explore_poses_002.png" alt="individuals = AEON3B_NTP, individuals = AEON3B_TP1, individuals = AEON3B_TP2" class = "sphx-glr-single-img"/><div class="sphx-glr-script-out highlight-none notranslate"><div class="highlight"><pre><span></span>&lt;xarray.plot.facetgrid.FacetGrid object at 0x7f8ac59e8990&gt;
</pre></div>
</div>
</section>
Expand All @@ -532,10 +531,10 @@ <h2>Trajectory plots<a class="headerlink" href="#trajectory-plots" title="Permal
<span class="n">plt</span><span class="o">.</span><span class="n">colorbar</span><span class="p">(</span><span class="n">label</span><span class="o">=</span><span class="s2">&quot;time (sec)&quot;</span><span class="p">)</span>
</pre></div>
</div>
<img src="../_images/sphx_glr_load_and_explore_poses_003.png" srcset="../_images/sphx_glr_load_and_explore_poses_003.png" alt="Trajectory of AEON3B_TP1" class = "sphx-glr-single-img"/><div class="sphx-glr-script-out highlight-none notranslate"><div class="highlight"><pre><span></span>&lt;matplotlib.colorbar.Colorbar object at 0x7f5272384650&gt;
<img src="../_images/sphx_glr_load_and_explore_poses_003.png" srcset="../_images/sphx_glr_load_and_explore_poses_003.png" alt="Trajectory of AEON3B_TP1" class = "sphx-glr-single-img"/><div class="sphx-glr-script-out highlight-none notranslate"><div class="highlight"><pre><span></span>&lt;matplotlib.colorbar.Colorbar object at 0x7f8ac361c850&gt;
</pre></div>
</div>
<p class="sphx-glr-timing"><strong>Total running time of the script:</strong> (0 minutes 2.845 seconds)</p>
<p class="sphx-glr-timing"><strong>Total running time of the script:</strong> (0 minutes 1.912 seconds)</p>
<div class="sphx-glr-footer sphx-glr-footer-example docutils container" id="sphx-glr-download-auto-examples-load-and-explore-poses-py">
<div class="sphx-glr-download sphx-glr-download-python docutils container">
<p><a class="reference download internal" download="" href="../_downloads/98a74f70c3a8280d37188d5370248393/load_and_explore_poses.py"><code class="xref download docutils literal notranslate"><span class="pre">Download</span> <span class="pre">Python</span> <span class="pre">source</span> <span class="pre">code:</span> <span class="pre">load_and_explore_poses.py</span></code></a></p>
Expand Down
4 changes: 2 additions & 2 deletions auto_examples/sg_execution_times.html
Original file line number Diff line number Diff line change
Expand Up @@ -381,11 +381,11 @@

<section id="computation-times">
<span id="sphx-glr-auto-examples-sg-execution-times"></span><h1>Computation times<a class="headerlink" href="#computation-times" title="Permalink to this heading">#</a></h1>
<p><strong>00:02.845</strong> total execution time for <strong>auto_examples</strong> files:</p>
<p><strong>00:01.912</strong> total execution time for <strong>auto_examples</strong> files:</p>
<table class="table">
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="load_and_explore_poses.html#sphx-glr-auto-examples-load-and-explore-poses-py"><span class="std std-ref">Load and explore pose tracks</span></a> (<code class="docutils literal notranslate"><span class="pre">load_and_explore_poses.py</span></code>)</p></td>
<td><p>00:02.845</p></td>
<td><p>00:01.912</p></td>
<td><p>0.0 MB</p></td>
</tr>
</tbody>
Expand Down
2 changes: 1 addition & 1 deletion searchindex.js

Large diffs are not rendered by default.

0 comments on commit 7c17f14

Please sign in to comment.