Skip to content

Commit b4bfcc6

Browse files
committed
deploy: cf160d7
1 parent e55b0a4 commit b4bfcc6

File tree

63 files changed

+481
-340
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+481
-340
lines changed

tutorials/1_Coordinates-Intro.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
<link rel="stylesheet" type="text/css" href="_static/styles/sphinx-book-theme.css?v=eba8b062" />
3333
<link rel="stylesheet" type="text/css" href="_static/togglebutton.css?v=13237357" />
3434
<link rel="stylesheet" type="text/css" href="_static/copybutton.css?v=76b2166b" />
35-
<link rel="stylesheet" type="text/css" href="_static/mystnb.4510f1fc1dee50b3e5859aac5469c37c29e427902b24a333a5f9fcb2f0b3ac41.css" />
35+
<link rel="stylesheet" type="text/css" href="_static/mystnb.8ecb98da25f57f5357bf6f572d296f466b2cfe2517ffebfabe82451661e28f02.css" />
3636
<link rel="stylesheet" type="text/css" href="_static/sphinx-thebe.css?v=4fa983c6" />
3737
<link rel="stylesheet" type="text/css" href="_static/sphinx-design.min.css?v=95c83b7e" />
3838

tutorials/1_SpectroscopicTraceTutorial.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
<link rel="stylesheet" type="text/css" href="_static/styles/sphinx-book-theme.css?v=eba8b062" />
3333
<link rel="stylesheet" type="text/css" href="_static/togglebutton.css?v=13237357" />
3434
<link rel="stylesheet" type="text/css" href="_static/copybutton.css?v=76b2166b" />
35-
<link rel="stylesheet" type="text/css" href="_static/mystnb.4510f1fc1dee50b3e5859aac5469c37c29e427902b24a333a5f9fcb2f0b3ac41.css" />
35+
<link rel="stylesheet" type="text/css" href="_static/mystnb.8ecb98da25f57f5357bf6f572d296f466b2cfe2517ffebfabe82451661e28f02.css" />
3636
<link rel="stylesheet" type="text/css" href="_static/sphinx-thebe.css?v=4fa983c6" />
3737
<link rel="stylesheet" type="text/css" href="_static/sphinx-design.min.css?v=95c83b7e" />
3838

tutorials/1_models-quick-fit.html

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
<link rel="stylesheet" type="text/css" href="_static/styles/sphinx-book-theme.css?v=eba8b062" />
3333
<link rel="stylesheet" type="text/css" href="_static/togglebutton.css?v=13237357" />
3434
<link rel="stylesheet" type="text/css" href="_static/copybutton.css?v=76b2166b" />
35-
<link rel="stylesheet" type="text/css" href="_static/mystnb.4510f1fc1dee50b3e5859aac5469c37c29e427902b24a333a5f9fcb2f0b3ac41.css" />
35+
<link rel="stylesheet" type="text/css" href="_static/mystnb.8ecb98da25f57f5357bf6f572d296f466b2cfe2517ffebfabe82451661e28f02.css" />
3636
<link rel="stylesheet" type="text/css" href="_static/sphinx-thebe.css?v=4fa983c6" />
3737
<link rel="stylesheet" type="text/css" href="_static/sphinx-design.min.css?v=95c83b7e" />
3838

@@ -688,7 +688,7 @@ <h2>2) Fit a Polynomial model: Choose fitter wisely<a class="headerlink" href="#
688688
<div class="output text_plain highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>Text(0, 0.5, &#39;$y_1$&#39;)
689689
</pre></div>
690690
</div>
691-
<img alt="_images/2599989f34957c875699451791904b2274c11a2e2bc68012705be41fe1a092b1.png" src="_images/2599989f34957c875699451791904b2274c11a2e2bc68012705be41fe1a092b1.png" />
691+
<img alt="_images/b4f70af05ab458663198b99b283ab300f404a3f750d81c6ee5b27af976166d69.png" src="_images/b4f70af05ab458663198b99b283ab300f404a3f750d81c6ee5b27af976166d69.png" />
692692
</div>
693693
</div>
694694
<p>To fit this data let’s remember the three steps: model, fitter and perform fit.</p>
@@ -714,9 +714,9 @@ <h2>2) Fit a Polynomial model: Choose fitter wisely<a class="headerlink" href="#
714714
Model set size: 1
715715
Degree: 3
716716
Parameters:
717-
c0 c1 c2 c3
718-
------------------ ----------------- ----------------- -----------------
719-
-9.539737981721931 13.13686821526471 -6.59469741384606 1.106942942692932
717+
c0 c1 c2 c3
718+
------------------ ----------------- ------------------ -----------------
719+
-9.668136251625402 14.03220663093066 -7.289899991878394 1.212745764310212
720720
</pre></div>
721721
</div>
722722
</div>
@@ -749,9 +749,9 @@ <h2>2) Fit a Polynomial model: Choose fitter wisely<a class="headerlink" href="#
749749
Model set size: 1
750750
Degree: 3
751751
Parameters:
752-
c0 c1 c2 c3
753-
------------------- ------------------- ------------------- -------------------
754-
0.05827388205687127 -0.9985633709289792 -0.5044587963099965 0.30779273029154025
752+
c0 c1 c2 c3
753+
------------------ ------------------ ------------------ -------------------
754+
-4.592161807253001 0.8230832129433163 1.5118840076844262 -0.3284136675421997
755755
</pre></div>
756756
</div>
757757
</div>
@@ -786,7 +786,7 @@ <h3>Compare results<a class="headerlink" href="#compare-results" title="Link to
786786
</div>
787787
</div>
788788
<div class="cell_output docutils container">
789-
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>Reduced Chi Squared with LinearLSQFitter: 1.8508835268899093
789+
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>Reduced Chi Squared with LinearLSQFitter: 2.084341633372965
790790
</pre></div>
791791
</div>
792792
</div>
@@ -799,7 +799,7 @@ <h3>Compare results<a class="headerlink" href="#compare-results" title="Link to
799799
</div>
800800
</div>
801801
<div class="cell_output docutils container">
802-
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>Reduced Chi Squared with SimplexLSQFitter: 5.074823984271411
802+
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>Reduced Chi Squared with SimplexLSQFitter: 4.372272992498278
803803
</pre></div>
804804
</div>
805805
</div>
@@ -818,10 +818,10 @@ <h3>Compare results<a class="headerlink" href="#compare-results" title="Link to
818818
</div>
819819
</div>
820820
<div class="cell_output docutils container">
821-
<div class="output text_plain highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>&lt;matplotlib.legend.Legend at 0x7f5ef5539850&gt;
821+
<div class="output text_plain highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>&lt;matplotlib.legend.Legend at 0x7fca82f6f410&gt;
822822
</pre></div>
823823
</div>
824-
<img alt="_images/7a6733b3fb0ae20d77bdd6eb3754bced5da6de6dc31264045bde5643e73b2965.png" src="_images/7a6733b3fb0ae20d77bdd6eb3754bced5da6de6dc31264045bde5643e73b2965.png" />
824+
<img alt="_images/4fa00e571b1aeb046ca062820feece7b1df2a4c741f1ddf50746be5678d9cdf5.png" src="_images/4fa00e571b1aeb046ca062820feece7b1df2a4c741f1ddf50746be5678d9cdf5.png" />
825825
</div>
826826
</div>
827827
<p>Results are as espected, the fit performed with the linear fitter is better than the second, non linear one.</p>
@@ -858,7 +858,7 @@ <h2>3) Fit a Gaussian: Let’s compare to scipy<a class="headerlink" href="#fit-
858858
<div class="output text_plain highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>Text(0, 0.5, &#39;$y_2$&#39;)
859859
</pre></div>
860860
</div>
861-
<img alt="_images/6dd81643931b491f78dfdc497c02ba5cd2a724d940ed81ad662329bd6911b94a.png" src="_images/6dd81643931b491f78dfdc497c02ba5cd2a724d940ed81ad662329bd6911b94a.png" />
861+
<img alt="_images/4f7488a34b1dc027fff59fa3845002acd6f7c59f8c8ef4c7574b224908a7b09e.png" src="_images/4f7488a34b1dc027fff59fa3845002acd6f7c59f8c8ef4c7574b224908a7b09e.png" />
862862
</div>
863863
</div>
864864
<p>Let’s do our three steps to make the fit we want. For this fit we’re going to use a non-linear fitter, <code class="docutils literal notranslate"><span class="pre">LevMarLSQFitter</span></code>, because the model we need (<code class="docutils literal notranslate"><span class="pre">Gaussian1D</span></code>) is non-linear in the parameters.</p>
@@ -883,9 +883,9 @@ <h2>3) Fit a Gaussian: Let’s compare to scipy<a class="headerlink" href="#fit-
883883
Outputs: (&#39;y&#39;,)
884884
Model set size: 1
885885
Parameters:
886-
amplitude mean stddev
887-
----------------- -------------------- -----------------
888-
9.995883804181737 -0.34004726579476496 10.17125839102595
886+
amplitude mean stddev
887+
------------------ ------------------- -----------------
888+
10.235328787744615 0.23164656349026355 9.832832128745881
889889
</pre></div>
890890
</div>
891891
</div>
@@ -911,7 +911,7 @@ <h2>3) Fit a Gaussian: Let’s compare to scipy<a class="headerlink" href="#fit-
911911
</div>
912912
</div>
913913
<div class="cell_output docutils container">
914-
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>[0.05048654 0.06965048 0.06992814]
914+
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>[0.0521983 0.06420656 0.06435817]
915915
</pre></div>
916916
</div>
917917
</div>
@@ -932,9 +932,9 @@ <h2>3) Fit a Gaussian: Let’s compare to scipy<a class="headerlink" href="#fit-
932932
</div>
933933
</div>
934934
<div class="cell_output docutils container">
935-
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>Amplitude: 9.995883804181737 +\- 0.22469208943894217
936-
Mean: -0.34004726579476496 +\- 0.26391377689507484
937-
Standard Deviation: 10.17125839102595 +\- 0.2644392980327242
935+
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>Amplitude: 10.235328787744615 +\- 0.22846946304960972
936+
Mean: 0.23164656349026355 +\- 0.25339013356683604
937+
Standard Deviation: 9.832832128745881 +\- 0.2536891112660841
938938
</pre></div>
939939
</div>
940940
<div class="output stderr highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>&lt;&gt;:2: SyntaxWarning: invalid escape sequence &#39;\-&#39;
@@ -978,7 +978,7 @@ <h2>3) Fit a Gaussian: Let’s compare to scipy<a class="headerlink" href="#fit-
978978
</div>
979979
</div>
980980
<div class="cell_output docutils container">
981-
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>[ 9.9958822 -0.34004602 10.17126165]
981+
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>[10.23532163 0.23165083 9.83284589]
982982
</pre></div>
983983
</div>
984984
</div>
@@ -992,9 +992,9 @@ <h2>3) Fit a Gaussian: Let’s compare to scipy<a class="headerlink" href="#fit-
992992
</div>
993993
</div>
994994
<div class="cell_output docutils container">
995-
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>Amplitude: 9.995882201165184 +\- 0.2183918959101891
996-
Mean: -0.34004601987526745 +\- 0.256517214073858
997-
Standard Deviation: 10.17126165173596 +\- 0.25702807522378746
995+
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>Amplitude: 10.23532162634643 +\- 0.24313864635084012
996+
Mean: 0.2316508293350977 +\- 0.2696498837860531
997+
Standard Deviation: 9.83284589476339 +\- 0.2699679723605533
998998
</pre></div>
999999
</div>
10001000
<div class="output stderr highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>&lt;&gt;:1: SyntaxWarning: invalid escape sequence &#39;\-&#39;
@@ -1023,7 +1023,7 @@ <h3>Compare results<a class="headerlink" href="#id1" title="Link to this heading
10231023
</div>
10241024
</div>
10251025
<div class="cell_output docutils container">
1026-
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>Reduced Chi Squared using astropy.modeling: 0.944715147396767
1026+
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>Reduced Chi Squared using astropy.modeling: 1.1325088996540487
10271027
</pre></div>
10281028
</div>
10291029
</div>
@@ -1036,7 +1036,7 @@ <h3>Compare results<a class="headerlink" href="#id1" title="Link to this heading
10361036
</div>
10371037
</div>
10381038
<div class="cell_output docutils container">
1039-
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>Reduced Chi Squared using scipy: 0.9447151474018781
1039+
<div class="output stream highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>Reduced Chi Squared using scipy: 1.132508899644351
10401040
</pre></div>
10411041
</div>
10421042
</div>
@@ -1054,10 +1054,10 @@ <h3>Compare results<a class="headerlink" href="#id1" title="Link to this heading
10541054
</div>
10551055
</div>
10561056
<div class="cell_output docutils container">
1057-
<div class="output text_plain highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>&lt;matplotlib.legend.Legend at 0x7f5ef4f971d0&gt;
1057+
<div class="output text_plain highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>&lt;matplotlib.legend.Legend at 0x7fca82c6b9b0&gt;
10581058
</pre></div>
10591059
</div>
1060-
<img alt="_images/cde6f3c949fb75493dbcea1b87215794d4ac7fffa2fdea3f36b30e5948d61e9f.png" src="_images/cde6f3c949fb75493dbcea1b87215794d4ac7fffa2fdea3f36b30e5948d61e9f.png" />
1060+
<img alt="_images/8e9dfa05efb78812ea50ca6f038c543caac50b75c9c4478a5b816d6ca1521238.png" src="_images/8e9dfa05efb78812ea50ca6f038c543caac50b75c9c4478a5b816d6ca1521238.png" />
10611061
</div>
10621062
</div>
10631063
<p><strong>Conclusion:</strong> Choose the method most convenient for every case you need to fit. We recomend <code class="docutils literal notranslate"><span class="pre">astropy.modeling</span></code> because is easier to write the name of the function you want to fit than to remember the expression every time we want to use it. Also, <code class="docutils literal notranslate"><span class="pre">astropy.modeling</span></code> becomes useful with more complicated models like <a class="reference external" href="http://docs.astropy.org/en/stable/modeling/#compound-models">two gaussians</a> plus a <a class="reference external" href="http://docs.astropy.org/en/stable/modeling/#blackbody-radiation">black body</a>, but that is another tutorial.</p>
@@ -1109,7 +1109,7 @@ <h2>4) Exercise: Your turn to choose<a class="headerlink" href="#exercise-your-t
11091109
<div class="output text_plain highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>Text(0, 0.5, &#39;$y_3$&#39;)
11101110
</pre></div>
11111111
</div>
1112-
<img alt="_images/8aa54b9792fc13374e1ac574202e4a6427d221b9f0edd309906c5774fa208870.png" src="_images/8aa54b9792fc13374e1ac574202e4a6427d221b9f0edd309906c5774fa208870.png" />
1112+
<img alt="_images/f68a1e769899e280a1f505a1b0eb011295eabe052a7863570e8b70ce66074bab.png" src="_images/f68a1e769899e280a1f505a1b0eb011295eabe052a7863570e8b70ce66074bab.png" />
11131113
</div>
11141114
</div>
11151115
</section>

tutorials/2_Coordinates-Transforms.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
<link rel="stylesheet" type="text/css" href="_static/styles/sphinx-book-theme.css?v=eba8b062" />
3333
<link rel="stylesheet" type="text/css" href="_static/togglebutton.css?v=13237357" />
3434
<link rel="stylesheet" type="text/css" href="_static/copybutton.css?v=76b2166b" />
35-
<link rel="stylesheet" type="text/css" href="_static/mystnb.4510f1fc1dee50b3e5859aac5469c37c29e427902b24a333a5f9fcb2f0b3ac41.css" />
35+
<link rel="stylesheet" type="text/css" href="_static/mystnb.8ecb98da25f57f5357bf6f572d296f466b2cfe2517ffebfabe82451661e28f02.css" />
3636
<link rel="stylesheet" type="text/css" href="_static/sphinx-thebe.css?v=4fa983c6" />
3737
<link rel="stylesheet" type="text/css" href="_static/sphinx-design.min.css?v=95c83b7e" />
3838

tutorials/2_WavelengthCalibration.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
<link rel="stylesheet" type="text/css" href="_static/styles/sphinx-book-theme.css?v=eba8b062" />
3333
<link rel="stylesheet" type="text/css" href="_static/togglebutton.css?v=13237357" />
3434
<link rel="stylesheet" type="text/css" href="_static/copybutton.css?v=76b2166b" />
35-
<link rel="stylesheet" type="text/css" href="_static/mystnb.4510f1fc1dee50b3e5859aac5469c37c29e427902b24a333a5f9fcb2f0b3ac41.css" />
35+
<link rel="stylesheet" type="text/css" href="_static/mystnb.8ecb98da25f57f5357bf6f572d296f466b2cfe2517ffebfabe82451661e28f02.css" />
3636
<link rel="stylesheet" type="text/css" href="_static/sphinx-thebe.css?v=4fa983c6" />
3737
<link rel="stylesheet" type="text/css" href="_static/sphinx-design.min.css?v=95c83b7e" />
3838

@@ -856,7 +856,7 @@ <h2>Improving on our guesses<a class="headerlink" href="#improving-on-our-guesse
856856
<div class="cell_output docutils container">
857857
<div class="output stderr highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>&lt;&gt;:3: SyntaxWarning: invalid escape sequence &#39;\l&#39;
858858
&lt;&gt;:3: SyntaxWarning: invalid escape sequence &#39;\l&#39;
859-
/tmp/ipykernel_3560/1543648565.py:3: SyntaxWarning: invalid escape sequence &#39;\l&#39;
859+
/tmp/ipykernel_3581/1543648565.py:3: SyntaxWarning: invalid escape sequence &#39;\l&#39;
860860
plt.ylabel(&quot;$\lambda(x)$&quot;)
861861
</pre></div>
862862
</div>
@@ -924,7 +924,7 @@ <h2>Improving on our guesses<a class="headerlink" href="#improving-on-our-guesse
924924
<div class="cell_output docutils container">
925925
<div class="output stderr highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>&lt;&gt;:5: SyntaxWarning: invalid escape sequence &#39;\l&#39;
926926
&lt;&gt;:5: SyntaxWarning: invalid escape sequence &#39;\l&#39;
927-
/tmp/ipykernel_3560/3761740803.py:5: SyntaxWarning: invalid escape sequence &#39;\l&#39;
927+
/tmp/ipykernel_3581/3761740803.py:5: SyntaxWarning: invalid escape sequence &#39;\l&#39;
928928
plt.xlabel(&quot;$\lambda$ [nm]&quot;);
929929
</pre></div>
930930
</div>
@@ -968,7 +968,7 @@ <h2>Improving on our guesses<a class="headerlink" href="#improving-on-our-guesse
968968
<div class="cell_output docutils container">
969969
<div class="output stderr highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>&lt;&gt;:3: SyntaxWarning: invalid escape sequence &#39;\l&#39;
970970
&lt;&gt;:3: SyntaxWarning: invalid escape sequence &#39;\l&#39;
971-
/tmp/ipykernel_3560/2204884587.py:3: SyntaxWarning: invalid escape sequence &#39;\l&#39;
971+
/tmp/ipykernel_3581/2204884587.py:3: SyntaxWarning: invalid escape sequence &#39;\l&#39;
972972
plt.xlabel(&quot;$\lambda$ [nm]&quot;)
973973
</pre></div>
974974
</div>
@@ -988,7 +988,7 @@ <h2>Improving on our guesses<a class="headerlink" href="#improving-on-our-guesse
988988
<div class="cell_output docutils container">
989989
<div class="output stderr highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>&lt;&gt;:3: SyntaxWarning: invalid escape sequence &#39;\l&#39;
990990
&lt;&gt;:3: SyntaxWarning: invalid escape sequence &#39;\l&#39;
991-
/tmp/ipykernel_3560/12811141.py:3: SyntaxWarning: invalid escape sequence &#39;\l&#39;
991+
/tmp/ipykernel_3581/12811141.py:3: SyntaxWarning: invalid escape sequence &#39;\l&#39;
992992
plt.xlabel(&quot;$\lambda$ [nm]&quot;)
993993
</pre></div>
994994
</div>

0 commit comments

Comments
 (0)