-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deploying to gh-pages from @ 744a8fc 🚀
- Loading branch information
1 parent
f3b6267
commit ac2fddd
Showing
111 changed files
with
2,843 additions
and
1,890 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Large diffs are not rendered by default.
Oops, something went wrong.
565 changes: 336 additions & 229 deletions
565
_collections/notebooks/01-Creating_MOCs_from_shapes.html
Large diffs are not rendered by default.
Oops, something went wrong.
231 changes: 186 additions & 45 deletions
231
_collections/notebooks/01-Creating_MOCs_from_shapes.ipynb
Large diffs are not rendered by default.
Oops, something went wrong.
138 changes: 69 additions & 69 deletions
138
_collections/notebooks/02-Creating_MOCs_from_astropy_regions.html
Large diffs are not rendered by default.
Oops, something went wrong.
104 changes: 52 additions & 52 deletions
104
_collections/notebooks/FITS-image-pixels-intersecting-MOC.html
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 — MOCPy 0.16.2 documentation</title> | ||
<title>First steps with Frequency MOCs — 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> | ||
|
@@ -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 & 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'/> | ||
|
||
|
@@ -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 » | ||
</a> | ||
</li> | ||
|
@@ -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> | ||
» | ||
</li> | ||
<li><a href="../../examples/user_documentation.html" accesskey="U">User documentation</a> »</li> | ||
|
@@ -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> | ||
|
@@ -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("../resources/FMOC/P2012180.fits") | ||
<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">"../resources/FMOC/P2012180.fits"</span><span class="p">)</span> | ||
</pre></div> | ||
</div> | ||
</div> | ||
|
@@ -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="purple") | ||
# this method plots the frequency ranges in log scale by default | ||
# but we can change it to linear if needed | ||
ax.set(xscale="linear") | ||
# and any customization on the ax of fig objects will work too | ||
ax.spines[["left", "top", "right"]].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">"purple"</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">"linear"</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">"left"</span><span class="p">,</span> <span class="s2">"top"</span><span class="p">,</span> <span class="s2">"right"</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> | ||
|
@@ -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="g", length_unit="km") | ||
<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">"g"</span><span class="p">,</span> <span class="n">length_unit</span><span class="o">=</span><span class="s2">"km"</span><span class="p">)</span> | ||
</pre></div> | ||
</div> | ||
</div> | ||
|
@@ -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"we first create an initial FMOC at order {fmoc.max_order}" | ||
" and then generate the dictionnary", | ||
) | ||
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">"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">"</span> | ||
<span class="s2">" and then generate the dictionnary"</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> | ||
|
@@ -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"At order {order}, this F-MOC has {len(fmocs[order].to_hz_ranges())} " | ||
"non overlapping spectral intervals", | ||
) | ||
<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">"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"> "</span> | ||
<span class="s2">"non overlapping spectral intervals"</span><span class="p">,</span> | ||
<span class="p">)</span> | ||
</pre></div> | ||
</div> | ||
</div> | ||
|
@@ -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"At order {order}, the spectrum covers {round(fmocs[order].to_hz_ranges()[0][0])} Hz" | ||
" to {round(fmocs[order].to_hz_ranges()[-1][1])} Hz", | ||
) | ||
<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">"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"</span> | ||
<span class="s2">" to {round(fmocs[order].to_hz_ranges()[-1][1])} Hz"</span><span class="p">,</span> | ||
<span class="p">)</span> | ||
</pre></div> | ||
</div> | ||
</div> | ||
|
@@ -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> | ||
© Copyright 2024, Matthieu Baumann <[email protected]> Thomas Boch <[email protected]> Manon Marchand <[email protected]> F.-X. Pineau <[email protected]>.<br/> | ||
Last built 26 Jul 2024. <br/> | ||
Last built 17 Oct 2024. <br/> | ||
</p> | ||
</footer> | ||
</body> | ||
|
Oops, something went wrong.