You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -786,7 +786,7 @@ <h3>Compare results<a class="headerlink" href="#compare-results" title="Link to
786
786
</div>
787
787
</div>
788
788
<divclass="cell_output docutils container">
789
-
<divclass="output stream highlight-myst-ansi notranslate"><divclass="highlight"><pre><span></span>Reduced Chi Squared with LinearLSQFitter: 1.8508835268899093
789
+
<divclass="output stream highlight-myst-ansi notranslate"><divclass="highlight"><pre><span></span>Reduced Chi Squared with LinearLSQFitter: 2.084341633372965
790
790
</pre></div>
791
791
</div>
792
792
</div>
@@ -799,7 +799,7 @@ <h3>Compare results<a class="headerlink" href="#compare-results" title="Link to
799
799
</div>
800
800
</div>
801
801
<divclass="cell_output docutils container">
802
-
<divclass="output stream highlight-myst-ansi notranslate"><divclass="highlight"><pre><span></span>Reduced Chi Squared with SimplexLSQFitter: 5.074823984271411
802
+
<divclass="output stream highlight-myst-ansi notranslate"><divclass="highlight"><pre><span></span>Reduced Chi Squared with SimplexLSQFitter: 4.372272992498278
803
803
</pre></div>
804
804
</div>
805
805
</div>
@@ -818,10 +818,10 @@ <h3>Compare results<a class="headerlink" href="#compare-results" title="Link to
818
818
</div>
819
819
</div>
820
820
<divclass="cell_output docutils container">
821
-
<divclass="output text_plain highlight-myst-ansi notranslate"><divclass="highlight"><pre><span></span><matplotlib.legend.Legend at 0x7f5ef5539850>
821
+
<divclass="output text_plain highlight-myst-ansi notranslate"><divclass="highlight"><pre><span></span><matplotlib.legend.Legend at 0x7fca82f6f410>
<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, <codeclass="docutils literal notranslate"><spanclass="pre">LevMarLSQFitter</span></code>, because the model we need (<codeclass="docutils literal notranslate"><spanclass="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-
@@ -1023,7 +1023,7 @@ <h3>Compare results<a class="headerlink" href="#id1" title="Link to this heading
1023
1023
</div>
1024
1024
</div>
1025
1025
<divclass="cell_output docutils container">
1026
-
<divclass="output stream highlight-myst-ansi notranslate"><divclass="highlight"><pre><span></span>Reduced Chi Squared using astropy.modeling: 0.944715147396767
1026
+
<divclass="output stream highlight-myst-ansi notranslate"><divclass="highlight"><pre><span></span>Reduced Chi Squared using astropy.modeling: 1.1325088996540487
1027
1027
</pre></div>
1028
1028
</div>
1029
1029
</div>
@@ -1036,7 +1036,7 @@ <h3>Compare results<a class="headerlink" href="#id1" title="Link to this heading
1036
1036
</div>
1037
1037
</div>
1038
1038
<divclass="cell_output docutils container">
1039
-
<divclass="output stream highlight-myst-ansi notranslate"><divclass="highlight"><pre><span></span>Reduced Chi Squared using scipy: 0.9447151474018781
1039
+
<divclass="output stream highlight-myst-ansi notranslate"><divclass="highlight"><pre><span></span>Reduced Chi Squared using scipy: 1.132508899644351
1040
1040
</pre></div>
1041
1041
</div>
1042
1042
</div>
@@ -1054,10 +1054,10 @@ <h3>Compare results<a class="headerlink" href="#id1" title="Link to this heading
1054
1054
</div>
1055
1055
</div>
1056
1056
<divclass="cell_output docutils container">
1057
-
<divclass="output text_plain highlight-myst-ansi notranslate"><divclass="highlight"><pre><span></span><matplotlib.legend.Legend at 0x7f5ef4f971d0>
1057
+
<divclass="output text_plain highlight-myst-ansi notranslate"><divclass="highlight"><pre><span></span><matplotlib.legend.Legend at 0x7fca82c6b9b0>
<p><strong>Conclusion:</strong> Choose the method most convenient for every case you need to fit. We recomend <codeclass="docutils literal notranslate"><spanclass="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, <codeclass="docutils literal notranslate"><spanclass="pre">astropy.modeling</span></code> becomes useful with more complicated models like <aclass="reference external" href="http://docs.astropy.org/en/stable/modeling/#compound-models">two gaussians</a> plus a <aclass="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
0 commit comments