<?xml version="1.0" encoding="UTF-8"?>
<rss  xmlns:atom="http://www.w3.org/2005/Atom" 
      xmlns:media="http://search.yahoo.com/mrss/" 
      xmlns:content="http://purl.org/rss/1.0/modules/content/" 
      xmlns:dc="http://purl.org/dc/elements/1.1/" 
      version="2.0">
<channel>
<title>Mike Grudić</title>
<link>https://mikegrudic.github.io/blog/</link>
<atom:link href="https://mikegrudic.github.io/blog/index.xml" rel="self" type="application/rss+xml"/>
<description>Astrophysics, computing, and mountains.</description>
<generator>quarto-1.10.18</generator>
<lastBuildDate>Tue, 06 Oct 2026 04:00:00 GMT</lastBuildDate>
<item>
  <title>Test post</title>
  <link>https://mikegrudic.github.io/blog/posts/2026-10-06-test-post/</link>
  <description><![CDATA[ 





<p>The stellar initial mass function of <span class="citation" data-cites="Kroupa2001">Kroupa (2001)</span> is a broken power law:</p>
<p><span id="eq-kroupa"><img src="https://latex.codecogs.com/png.latex?%0A%5Cfrac%7BdN%7D%7BdM_%5Cstar%7D%20%5Cpropto%20M_%5Cstar%5E%7B-%5Calpha%7D,%20%5Cqquad%0A%5Calpha%20=%20%5Cbegin%7Bcases%7D%0A0.3%20&amp;%20M_%5Cstar%20%3C%200.08%5C,M_%5Codot%20%5C%5C%0A1.3%20&amp;%200.08%5C,M_%5Codot%20%5Cle%20M_%5Cstar%20%3C%200.5%5C,M_%5Codot%20%5C%5C%0A2.3%20&amp;%20M_%5Cstar%20%5Cge%200.5%5C,M_%5Codot%0A%5Cend%7Bcases%7D%0A%5Ctag%7B1%7D"></span></p>
<p>Figure&nbsp;1 plots Equation&nbsp;1 per logarithmic mass interval.</p>
<details class="code-fold">
<summary>Code</summary>
<div class="code-copy-outer-scaffold"><div class="sourceCode cell-code" id="cb1" style="background: #f1f3f5;"><pre class="sourceCode python code-with-copy"><code class="sourceCode python"><span id="cb1-1"><span class="im" style="color: #00769E;
background-color: null;
font-style: inherit;">import</span> numpy <span class="im" style="color: #00769E;
background-color: null;
font-style: inherit;">as</span> np</span>
<span id="cb1-2"><span class="im" style="color: #00769E;
background-color: null;
font-style: inherit;">import</span> matplotlib.pyplot <span class="im" style="color: #00769E;
background-color: null;
font-style: inherit;">as</span> plt</span>
<span id="cb1-3"></span>
<span id="cb1-4">m <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> np.logspace(<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">2</span>, <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">2</span>, <span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">400</span>)</span>
<span id="cb1-5">dNdm <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> np.where(m <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0.08</span>, (m <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">/</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0.08</span>) <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">**</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0.3</span>,</span>
<span id="cb1-6">       np.where(m <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">&lt;</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0.5</span>, (m <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">/</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0.08</span>) <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">**</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">1.3</span>,</span>
<span id="cb1-7">                (<span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0.5</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">/</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0.08</span>) <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">**</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">1.3</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">*</span> (m <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">/</span> <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">0.5</span>) <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">**</span> <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">-</span><span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">2.3</span>))</span>
<span id="cb1-8">dNdlogm <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> m <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">*</span> dNdm</span>
<span id="cb1-9"></span>
<span id="cb1-10"><span class="co" style="color: #5E5E5E;
background-color: null;
font-style: inherit;"># one plot per theme; the light one doubles as the listing thumbnail and preview image</span></span>
<span id="cb1-11"><span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">for</span> fg, bg <span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">in</span> [(<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"black"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"white"</span>), (<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"white"</span>, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"#222"</span>)]:</span>
<span id="cb1-12">    <span class="cf" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">with</span> plt.rc_context({<span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"text.color"</span>: fg, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"axes.edgecolor"</span>: fg, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"axes.labelcolor"</span>: fg,</span>
<span id="cb1-13">                         <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"xtick.color"</span>: fg, <span class="st" style="color: #20794D;
background-color: null;
font-style: inherit;">"ytick.color"</span>: fg}):</span>
<span id="cb1-14">        fig, ax <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span> plt.subplots(figsize<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span>(<span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">5</span>, <span class="fl" style="color: #AD0000;
background-color: null;
font-style: inherit;">3.5</span>), facecolor<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span>bg)</span>
<span id="cb1-15">        ax.set_facecolor(bg)</span>
<span id="cb1-16">        ax.loglog(m, dNdlogm <span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">/</span> dNdlogm.<span class="bu" style="color: null;
background-color: null;
font-style: inherit;">max</span>(), color<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span>fg)</span>
<span id="cb1-17">        ax.<span class="bu" style="color: null;
background-color: null;
font-style: inherit;">set</span>(xlabel<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">r"</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">$</span><span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">M_</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">\s</span><span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">tar</span><span class="ch" style="color: #20794D;
background-color: null;
font-style: inherit;">\,</span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">(</span><span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">M_</span><span class="er" style="color: #AD0000;
background-color: null;
font-style: inherit;">\</span><span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">odot</span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">)</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">$</span><span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">"</span>, ylabel<span class="op" style="color: #5E5E5E;
background-color: null;
font-style: inherit;">=</span><span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">r"</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">$</span><span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">dN/d</span><span class="er" style="color: #AD0000;
background-color: null;
font-style: inherit;">\</span><span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">log M_</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">\s</span><span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">tar</span><span class="dv" style="color: #AD0000;
background-color: null;
font-style: inherit;">$</span><span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;"> </span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">(</span><span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">normalized</span><span class="kw" style="color: #003B4F;
background-color: null;
font-weight: bold;
font-style: inherit;">)</span><span class="vs" style="color: #20794D;
background-color: null;
font-style: inherit;">"</span>)</span>
<span id="cb1-18">        plt.show()</span></code></pre></div></div>
</details>
<div id="fig-imf" class="quarto-float quarto-figure quarto-figure-center anchored">
<figure class="quarto-float quarto-float-fig figure">
<div aria-describedby="fig-imf-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca">
<div id="f303bd48" class="cell" data-renderings="[&quot;light&quot;,&quot;dark&quot;]" data-execution_count="1">
<div class="cell-output cell-output-display light-content">
<div>
<figure class="figure">
<p><img src="https://mikegrudic.github.io/blog/posts/2026-10-06-test-post/index_files/figure-html/cell-2-output-1.png" width="441" height="313" class="figure-img"></p>
</figure>
</div>
</div>
<div class="cell-output cell-output-display dark-content">
<div>
<figure class="figure">
<p><img src="https://mikegrudic.github.io/blog/posts/2026-10-06-test-post/index_files/figure-html/cell-2-output-2.png" width="441" height="313" class="figure-img"></p>
</figure>
</div>
</div>
</div>
</div>
<figcaption class="quarto-float-caption-bottom quarto-float-caption quarto-float-fig" id="fig-imf-caption-0ceaefa1-69ba-4598-a22c-09a6ac19f8ca">
Figure&nbsp;1: The Kroupa IMF.
</figcaption>
</figure>
</div>
<p>STARFORGE simulations <span class="citation" data-cites="Grudic2021">(Grudić et al. 2021)</span> form stars out of a giant molecular cloud and get an IMF of roughly this shape:</p>
<div class="quarto-video ratio ratio-16x9"><iframe data-external="1" src="https://www.youtube.com/embed/Aehqb-vDV_w" title="" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen=""></iframe></div>




<div id="quarto-appendix" class="default"><section class="quarto-appendix-contents" id="quarto-bibliography"><h2 class="anchored quarto-appendix-heading">References</h2><div id="refs" class="references csl-bib-body hanging-indent">
<div id="ref-Grudic2021" class="csl-entry">
Grudić, Michael Y., Dávid Guszejnov, Philip F. Hopkins, Stella S. R. Offner, and Claude-André Faucher-Giguère. 2021. <span>“<span>STARFORGE</span>: Towards a Comprehensive Numerical Model of Star Cluster Formation and Feedback.”</span> <em>MNRAS</em> 506. <a href="https://doi.org/10.1093/mnras/stab1347">https://doi.org/10.1093/mnras/stab1347</a>.
</div>
<div id="ref-Kroupa2001" class="csl-entry">
Kroupa, Pavel. 2001. <span>“On the Variation of the Initial Mass Function.”</span> <em>MNRAS</em> 322: 231–46. <a href="https://doi.org/10.1046/j.1365-8711.2001.04022.x">https://doi.org/10.1046/j.1365-8711.2001.04022.x</a>.
</div>
</div></section></div> ]]></description>
  <category>meta</category>
  <guid>https://mikegrudic.github.io/blog/posts/2026-10-06-test-post/</guid>
  <pubDate>Tue, 06 Oct 2026 04:00:00 GMT</pubDate>
</item>
</channel>
</rss>
