Skip to content

Commit

Permalink
Deploying to gh-pages from @ 744a8fc 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
ManonMarchand committed Oct 17, 2024
1 parent f3b6267 commit ac2fddd
Show file tree
Hide file tree
Showing 111 changed files with 2,843 additions and 1,890 deletions.
4 changes: 2 additions & 2 deletions .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: c2890eadd3f6df9eefeba2536d630529
# This file records the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 7bf1cc2146bfcf907aa130f64618d5fe
tags: 645f666f9bcd5a90fca523b33c5a78b7
300 changes: 150 additions & 150 deletions _collections/notebooks/00-MOCpy_introduction.html

Large diffs are not rendered by default.

565 changes: 336 additions & 229 deletions _collections/notebooks/01-Creating_MOCs_from_shapes.html

Large diffs are not rendered by default.

231 changes: 186 additions & 45 deletions _collections/notebooks/01-Creating_MOCs_from_shapes.ipynb

Large diffs are not rendered by default.

138 changes: 69 additions & 69 deletions _collections/notebooks/02-Creating_MOCs_from_astropy_regions.html

Large diffs are not rendered by default.

104 changes: 52 additions & 52 deletions _collections/notebooks/FITS-image-pixels-intersecting-MOC.html

Large diffs are not rendered by default.

72 changes: 36 additions & 36 deletions _collections/notebooks/First_Steps_with_FMOCs.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />

<title>First steps with Frequency MOCs &#8212; MOCPy 0.16.2 documentation</title>
<title>First steps with Frequency MOCs &#8212; MOCPy 0.17.0 documentation</title>
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=fa44fd50" />
<link rel="stylesheet" type="text/css" href="../../_static/mocpy.css?v=b2680190" />
<link rel="stylesheet" type="text/css" href="../../_static/plot_directive.css" />
<link rel="stylesheet" type="text/css" href="../../_static/copybutton.css?v=76b2166b" />
<link rel="stylesheet" type="text/css" href="../../_static/sg_gallery.css?v=d2d258e8" />
<link rel="stylesheet" type="text/css" href="../../_static/nbsphinx-code-cells.css" />
<link rel="stylesheet" type="text/css" href="../../_static/nbsphinx-code-cells.css?v=2aa19091" />

<script src="../../_static/documentation_options.js?v=ee6890a7"></script>
<script src="../../_static/doctools.js?v=9a2dae69"></script>
<script src="../../_static/documentation_options.js?v=0c3dd48d"></script>
<script src="../../_static/doctools.js?v=9bcbadda"></script>
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="../../_static/clipboard.min.js?v=a7894cd8"></script>
<script src="../../_static/copybutton.js?v=f281be69"></script>
Expand All @@ -26,7 +26,7 @@
<link rel="icon" href="../../_static/MOCpy-icon.svg"/>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />
<link rel="next" title="Detailed list of all methods" href="../../api.html" />
<link rel="next" title="API: Detailed list of all methods" href="../../api.html" />
<link rel="prev" title="# Space &amp; Time coverages" href="Space%20%26%20Time%20coverages.html" />
<link href='https://fonts.googleapis.com/css?family=Source+Sans+Pro:200,600' rel='stylesheet' type='text/css'/>

Expand Down Expand Up @@ -55,7 +55,7 @@
<h3>Navigation</h3>
<ul>
<li class="right">
<a href="../../api.html" title="Detailed list of all methods">
<a href="../../api.html" title="API: Detailed list of all methods">
next &raquo;
</a>
</li>
Expand All @@ -66,7 +66,7 @@ <h3>Navigation</h3>
|
</li>
<li>
<a href="../../index.html">MOCPy 0.16.2 documentation</a>
<a href="../../index.html">MOCPy 0.17.0 documentation</a>
&#187;
</li>
<li><a href="../../examples/user_documentation.html" accesskey="U">User documentation</a> &#187;</li>
Expand All @@ -87,9 +87,9 @@ <h1>First steps with Frequency MOCs<a class="headerlink" href="#First-steps-with
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[1]:
</pre></div>
</div>
<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre><span></span>import matplotlib.pyplot as plt
import numpy as np
from mocpy import FrequencyMOC
<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">matplotlib.pyplot</span> <span class="k">as</span> <span class="nn">plt</span>
<span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span>
<span class="kn">from</span> <span class="nn">mocpy</span> <span class="kn">import</span> <span class="n">FrequencyMOC</span>
</pre></div>
</div>
</div>
Expand All @@ -99,7 +99,7 @@ <h1>First steps with Frequency MOCs<a class="headerlink" href="#First-steps-with
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[2]:
</pre></div>
</div>
<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre><span></span>fmoc = FrequencyMOC.from_fits(&quot;../resources/FMOC/P2012180.fits&quot;)
<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre><span></span><span class="n">fmoc</span> <span class="o">=</span> <span class="n">FrequencyMOC</span><span class="o">.</span><span class="n">from_fits</span><span class="p">(</span><span class="s2">&quot;../resources/FMOC/P2012180.fits&quot;</span><span class="p">)</span>
</pre></div>
</div>
</div>
Expand All @@ -108,13 +108,13 @@ <h1>First steps with Frequency MOCs<a class="headerlink" href="#First-steps-with
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[3]:
</pre></div>
</div>
<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre><span></span>fig, ax = plt.subplots(figsize=(15, 1))
fmoc.plot_frequencies(ax, color=&quot;purple&quot;)
# this method plots the frequency ranges in log scale by default
# but we can change it to linear if needed
ax.set(xscale=&quot;linear&quot;)
# and any customization on the ax of fig objects will work too
ax.spines[[&quot;left&quot;, &quot;top&quot;, &quot;right&quot;]].set_visible(False)
<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre><span></span><span class="n">fig</span><span class="p">,</span> <span class="n">ax</span> <span class="o">=</span> <span class="n">plt</span><span class="o">.</span><span class="n">subplots</span><span class="p">(</span><span class="n">figsize</span><span class="o">=</span><span class="p">(</span><span class="mi">15</span><span class="p">,</span> <span class="mi">1</span><span class="p">))</span>
<span class="n">fmoc</span><span class="o">.</span><span class="n">plot_frequencies</span><span class="p">(</span><span class="n">ax</span><span class="p">,</span> <span class="n">color</span><span class="o">=</span><span class="s2">&quot;purple&quot;</span><span class="p">)</span>
<span class="c1"># this method plots the frequency ranges in log scale by default</span>
<span class="c1"># but we can change it to linear if needed</span>
<span class="n">ax</span><span class="o">.</span><span class="n">set</span><span class="p">(</span><span class="n">xscale</span><span class="o">=</span><span class="s2">&quot;linear&quot;</span><span class="p">)</span>
<span class="c1"># and any customization on the ax of fig objects will work too</span>
<span class="n">ax</span><span class="o">.</span><span class="n">spines</span><span class="p">[[</span><span class="s2">&quot;left&quot;</span><span class="p">,</span> <span class="s2">&quot;top&quot;</span><span class="p">,</span> <span class="s2">&quot;right&quot;</span><span class="p">]]</span><span class="o">.</span><span class="n">set_visible</span><span class="p">(</span><span class="kc">False</span><span class="p">)</span>
</pre></div>
</div>
</div>
Expand All @@ -129,8 +129,8 @@ <h1>First steps with Frequency MOCs<a class="headerlink" href="#First-steps-with
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[4]:
</pre></div>
</div>
<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre><span></span>fig, ax = plt.subplots(figsize=(15, 1))
fmoc.plot_wavelengths(ax, color=&quot;g&quot;, length_unit=&quot;km&quot;)
<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre><span></span><span class="n">fig</span><span class="p">,</span> <span class="n">ax</span> <span class="o">=</span> <span class="n">plt</span><span class="o">.</span><span class="n">subplots</span><span class="p">(</span><span class="n">figsize</span><span class="o">=</span><span class="p">(</span><span class="mi">15</span><span class="p">,</span> <span class="mi">1</span><span class="p">))</span>
<span class="n">fmoc</span><span class="o">.</span><span class="n">plot_wavelengths</span><span class="p">(</span><span class="n">ax</span><span class="p">,</span> <span class="n">color</span><span class="o">=</span><span class="s2">&quot;g&quot;</span><span class="p">,</span> <span class="n">length_unit</span><span class="o">=</span><span class="s2">&quot;km&quot;</span><span class="p">)</span>
</pre></div>
</div>
</div>
Expand All @@ -146,11 +146,11 @@ <h1>First steps with Frequency MOCs<a class="headerlink" href="#First-steps-with
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[5]:
</pre></div>
</div>
<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre><span></span>print(
f&quot;we first create an initial FMOC at order {fmoc.max_order}&quot;
&quot; and then generate the dictionnary&quot;,
)
fmocs = {n: fmoc.degrade_to_order(n) for n in np.linspace(50, 10, 5, dtype=int)}
<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre><span></span><span class="nb">print</span><span class="p">(</span>
<span class="sa">f</span><span class="s2">&quot;we first create an initial FMOC at order </span><span class="si">{</span><span class="n">fmoc</span><span class="o">.</span><span class="n">max_order</span><span class="si">}</span><span class="s2">&quot;</span>
<span class="s2">&quot; and then generate the dictionnary&quot;</span><span class="p">,</span>
<span class="p">)</span>
<span class="n">fmocs</span> <span class="o">=</span> <span class="p">{</span><span class="n">n</span><span class="p">:</span> <span class="n">fmoc</span><span class="o">.</span><span class="n">degrade_to_order</span><span class="p">(</span><span class="n">n</span><span class="p">)</span> <span class="k">for</span> <span class="n">n</span> <span class="ow">in</span> <span class="n">np</span><span class="o">.</span><span class="n">linspace</span><span class="p">(</span><span class="mi">50</span><span class="p">,</span> <span class="mi">10</span><span class="p">,</span> <span class="mi">5</span><span class="p">,</span> <span class="n">dtype</span><span class="o">=</span><span class="nb">int</span><span class="p">)}</span>
</pre></div>
</div>
</div>
Expand All @@ -166,11 +166,11 @@ <h1>First steps with Frequency MOCs<a class="headerlink" href="#First-steps-with
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[6]:
</pre></div>
</div>
<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre><span></span>for order in fmocs:
print(
f&quot;At order {order}, this F-MOC has {len(fmocs[order].to_hz_ranges())} &quot;
&quot;non overlapping spectral intervals&quot;,
)
<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre><span></span><span class="k">for</span> <span class="n">order</span> <span class="ow">in</span> <span class="n">fmocs</span><span class="p">:</span>
<span class="nb">print</span><span class="p">(</span>
<span class="sa">f</span><span class="s2">&quot;At order </span><span class="si">{</span><span class="n">order</span><span class="si">}</span><span class="s2">, this F-MOC has </span><span class="si">{</span><span class="nb">len</span><span class="p">(</span><span class="n">fmocs</span><span class="p">[</span><span class="n">order</span><span class="p">]</span><span class="o">.</span><span class="n">to_hz_ranges</span><span class="p">())</span><span class="si">}</span><span class="s2"> &quot;</span>
<span class="s2">&quot;non overlapping spectral intervals&quot;</span><span class="p">,</span>
<span class="p">)</span>
</pre></div>
</div>
</div>
Expand All @@ -190,11 +190,11 @@ <h1>First steps with Frequency MOCs<a class="headerlink" href="#First-steps-with
<div class="prompt highlight-none notranslate"><div class="highlight"><pre><span></span>[7]:
</pre></div>
</div>
<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre><span></span>for order in fmocs:
print(
f&quot;At order {order}, the spectrum covers {round(fmocs[order].to_hz_ranges()[0][0])} Hz&quot;
&quot; to {round(fmocs[order].to_hz_ranges()[-1][1])} Hz&quot;,
)
<div class="input_area highlight-ipython3 notranslate"><div class="highlight"><pre><span></span><span class="k">for</span> <span class="n">order</span> <span class="ow">in</span> <span class="n">fmocs</span><span class="p">:</span>
<span class="nb">print</span><span class="p">(</span>
<span class="sa">f</span><span class="s2">&quot;At order </span><span class="si">{</span><span class="n">order</span><span class="si">}</span><span class="s2">, the spectrum covers </span><span class="si">{</span><span class="nb">round</span><span class="p">(</span><span class="n">fmocs</span><span class="p">[</span><span class="n">order</span><span class="p">]</span><span class="o">.</span><span class="n">to_hz_ranges</span><span class="p">()[</span><span class="mi">0</span><span class="p">][</span><span class="mi">0</span><span class="p">])</span><span class="si">}</span><span class="s2"> Hz&quot;</span>
<span class="s2">&quot; to {round(fmocs[order].to_hz_ranges()[-1][1])} Hz&quot;</span><span class="p">,</span>
<span class="p">)</span>
</pre></div>
</div>
</div>
Expand Down Expand Up @@ -239,7 +239,7 @@ <h1>First steps with Frequency MOCs<a class="headerlink" href="#First-steps-with
<a href="#">Back to Top</a></p>
<p>
&copy; Copyright 2024, Matthieu Baumann &lt;[email protected]&gt; Thomas Boch &lt;[email protected]&gt; Manon Marchand &lt;[email protected]&gt; F.-X. Pineau &lt;[email protected]&gt;.<br/>
Last built 26 Jul 2024. <br/>
Last built 17 Oct 2024. <br/>
</p>
</footer>
</body>
Expand Down
Loading

0 comments on commit ac2fddd

Please sign in to comment.