Skip to content

Commit

Permalink
Deploy docs
Browse files Browse the repository at this point in the history
  • Loading branch information
javierggt committed Dec 9, 2024
1 parent 619b10e commit b3e453f
Show file tree
Hide file tree
Showing 30 changed files with 1,408 additions and 332 deletions.
163 changes: 140 additions & 23 deletions docs/_modules/chandra_aca/aca_image.html

Large diffs are not rendered by default.

14 changes: 10 additions & 4 deletions docs/_modules/chandra_aca/centroid_resid.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>chandra_aca.centroid_resid &#8212; chandra_aca 4.47.0 documentation</title>
<title>chandra_aca.centroid_resid &#8212; chandra_aca 4.48.0 documentation</title>
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=fa44fd50" />
<link rel="stylesheet" type="text/css" href="../../_static/bootstrap-astropy.css?v=f4f7060c" />

<script src="../../_static/documentation_options.js?v=457a4054"></script>
<script src="../../_static/documentation_options.js?v=f369efd0"></script>
<script src="../../_static/doctools.js?v=888ff710"></script>
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
<script type="text/javascript" src="../../_static/sidebar.js"></script>
Expand Down Expand Up @@ -44,7 +44,7 @@
<h3>Navigation</h3>
<ul>
<li>
<a href="../../index.html">chandra_aca 4.47.0 documentation</a>
<a href="../../index.html">chandra_aca 4.48.0 documentation</a>
&#187;
</li>
<li><a href="../index.html" accesskey="U">Module code</a> &#187;</li>
Expand Down Expand Up @@ -152,6 +152,8 @@ <h1>Source code for chandra_aca.centroid_resid</h1><div class="highlight"><pre>
<a class="viewcode-back" href="../../centroid_resid.html#chandra_aca.centroid_resid.CentroidResiduals.set_centroids">[docs]</a>
<span class="k">def</span> <span class="nf">set_centroids</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">source</span><span class="p">,</span> <span class="n">slot</span><span class="p">,</span> <span class="n">alg</span><span class="o">=</span><span class="mi">8</span><span class="p">,</span> <span class="n">apply_dt</span><span class="o">=</span><span class="kc">True</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Assign centroids.</span>

<span class="sd"> Assign centroids from ``source`` and ``slot`` to the objects centroid attributes</span>
<span class="sd"> (yag, zag, yag_times, zag_times)</span>

Expand Down Expand Up @@ -350,6 +352,8 @@ <h1>Source code for chandra_aca.centroid_resid</h1><div class="highlight"><pre>
<a class="viewcode-back" href="../../centroid_resid.html#chandra_aca.centroid_resid.CentroidResiduals.set_offsets">[docs]</a>
<span class="k">def</span> <span class="nf">set_offsets</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Apply time offsets to centroids.</span>

<span class="sd"> Apply time offsets to centroids based on type and source of centroid, obsid</span>
<span class="sd"> (suggesting 8x8 or 6x6 data), telemetry source (&#39;maude&#39; or &#39;cxc&#39;) and aspect solution</span>
<span class="sd"> source. These time offsets were fit. See fit notebooks at:</span>
Expand All @@ -374,7 +378,7 @@ <h1>Source code for chandra_aca.centroid_resid</h1><div class="highlight"><pre>
<span class="p">)</span>
<span class="k">return</span>
<span class="n">fetch_source</span> <span class="o">=</span> <span class="n">fetch</span><span class="o">.</span><span class="n">data_source</span><span class="o">.</span><span class="n">sources</span><span class="p">()[</span><span class="mi">0</span><span class="p">]</span>
<span class="k">if</span> <span class="n">fetch_source</span> <span class="o">!=</span> <span class="s2">&quot;cxc&quot;</span> <span class="ow">and</span> <span class="n">fetch_source</span> <span class="o">!=</span> <span class="s2">&quot;maude&quot;</span><span class="p">:</span>
<span class="k">if</span> <span class="n">fetch_source</span> <span class="ow">not</span> <span class="ow">in</span> <span class="p">(</span><span class="s2">&quot;cxc&quot;</span><span class="p">,</span> <span class="s2">&quot;maude&quot;</span><span class="p">):</span>
<span class="n">warnings</span><span class="o">.</span><span class="n">warn</span><span class="p">(</span>
<span class="s2">&quot;Only maude and cxc fetch data sources are supported for offsets. &quot;</span>
<span class="s2">&quot;Not applying offsets.&quot;</span>
Expand Down Expand Up @@ -418,6 +422,8 @@ <h1>Source code for chandra_aca.centroid_resid</h1><div class="highlight"><pre>
<a class="viewcode-back" href="../../centroid_resid.html#chandra_aca.centroid_resid.CentroidResiduals.calc_residuals">[docs]</a>
<span class="k">def</span> <span class="nf">calc_residuals</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Calculate star residuals.</span>

<span class="sd"> Calculate residuals based on attitude and ra/dec of star. Note that the sampling and times</span>
<span class="sd"> of yags may be different from zags so these should be done independently.</span>

Expand Down
33 changes: 20 additions & 13 deletions docs/_modules/chandra_aca/dark_model.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>chandra_aca.dark_model &#8212; chandra_aca 4.47.0 documentation</title>
<title>chandra_aca.dark_model &#8212; chandra_aca 4.48.0 documentation</title>
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=fa44fd50" />
<link rel="stylesheet" type="text/css" href="../../_static/bootstrap-astropy.css?v=f4f7060c" />

<script src="../../_static/documentation_options.js?v=457a4054"></script>
<script src="../../_static/documentation_options.js?v=f369efd0"></script>
<script src="../../_static/doctools.js?v=888ff710"></script>
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
<script type="text/javascript" src="../../_static/sidebar.js"></script>
Expand Down Expand Up @@ -44,7 +44,7 @@
<h3>Navigation</h3>
<ul>
<li>
<a href="../../index.html">chandra_aca 4.47.0 documentation</a>
<a href="../../index.html">chandra_aca 4.48.0 documentation</a>
&#187;
</li>
<li><a href="../index.html" accesskey="U">Module code</a> &#187;</li>
Expand Down Expand Up @@ -121,7 +121,10 @@ <h1>Source code for chandra_aca.dark_model</h1><div class="highlight"><pre>
<div class="viewcode-block" id="dark_temp_scale">
<a class="viewcode-back" href="../../dark_model.html#chandra_aca.dark_model.dark_temp_scale">[docs]</a>
<span class="k">def</span> <span class="nf">dark_temp_scale</span><span class="p">(</span><span class="n">t_ccd</span><span class="p">,</span> <span class="n">t_ccd_ref</span><span class="o">=-</span><span class="mf">19.0</span><span class="p">,</span> <span class="n">scale_4c</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Return the multiplicative scale factor to convert a CCD dark map</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Calculate dark current scale factor.</span>

<span class="sd"> Return the multiplicative scale factor to convert a CCD dark map</span>
<span class="sd"> or dark current value from temperature ``t_ccd`` to temperature</span>
<span class="sd"> ``t_ccd_ref``::</span>

Expand Down Expand Up @@ -197,7 +200,9 @@ <h1>Source code for chandra_aca.dark_model</h1><div class="highlight"><pre>
<a class="viewcode-back" href="../../dark_model.html#chandra_aca.dark_model.smooth_broken_pow">[docs]</a>
<span class="k">def</span> <span class="nf">smooth_broken_pow</span><span class="p">(</span><span class="n">pars</span><span class="p">,</span> <span class="n">x</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Smoothed broken power-law. Pars are same as bpl1d (NOT + gaussian sigma):</span>
<span class="sd"> Smoothed broken power-law.</span>

<span class="sd"> Pars are same as bpl1d (NOT + gaussian sigma):</span>
<span class="sd"> 1: gamma1</span>
<span class="sd"> 2: gamma2</span>
<span class="sd"> 3: x_b (break point)</span>
Expand All @@ -219,7 +224,9 @@ <h1>Source code for chandra_aca.dark_model</h1><div class="highlight"><pre>
<a class="viewcode-back" href="../../dark_model.html#chandra_aca.dark_model.smooth_twice_broken_pow">[docs]</a>
<span class="k">def</span> <span class="nf">smooth_twice_broken_pow</span><span class="p">(</span><span class="n">pars</span><span class="p">,</span> <span class="n">x</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Smoothed broken power-law. Pars are same as bpl1d (NOT + gaussian sigma):</span>
<span class="sd"> Smoothed twice-broken power-law.</span>

<span class="sd"> Pars are same as bpl1d (NOT + gaussian sigma):</span>
<span class="sd"> 1: gamma1</span>
<span class="sd"> 2: gamma2</span>
<span class="sd"> 3: gamma3</span>
Expand Down Expand Up @@ -250,6 +257,8 @@ <h1>Source code for chandra_aca.dark_model</h1><div class="highlight"><pre>
<a class="viewcode-back" href="../../dark_model.html#chandra_aca.dark_model.temp_scalefac">[docs]</a>
<span class="k">def</span> <span class="nf">temp_scalefac</span><span class="p">(</span><span class="n">T_ccd</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Calculate scale factor.</span>

<span class="sd"> Return the multiplicative scale factor to convert a CCD dark map from</span>
<span class="sd"> the nominal -19C temperature to the temperature T. Based on best global fit for</span>
<span class="sd"> dark current model in plot_predicted_warmpix.py. Previous value was 0.62 instead</span>
Expand Down Expand Up @@ -335,8 +344,7 @@ <h1>Source code for chandra_aca.dark_model</h1><div class="highlight"><pre>
<a class="viewcode-back" href="../../dark_model.html#chandra_aca.dark_model.get_warm_fracs">[docs]</a>
<span class="k">def</span> <span class="nf">get_warm_fracs</span><span class="p">(</span><span class="n">warm_threshold</span><span class="p">,</span> <span class="n">date</span><span class="o">=</span><span class="s2">&quot;2013:001:12:00:00&quot;</span><span class="p">,</span> <span class="n">T_ccd</span><span class="o">=-</span><span class="mf">19.0</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Calculate fraction of pixels in modeled dark current distribution</span>
<span class="sd"> above warm threshold(s).</span>
<span class="sd"> Calculate fraction of pixels in modeled dark current distribution above warm threshold(s).</span>

<span class="sd"> Parameters</span>
<span class="sd"> ----------</span>
Expand All @@ -356,11 +364,11 @@ <h1>Source code for chandra_aca.dark_model</h1><div class="highlight"><pre>
<span class="n">warm_thresholds</span><span class="p">,</span> <span class="n">is_scalar</span> <span class="o">=</span> <span class="n">as_array</span><span class="p">(</span><span class="n">warm_threshold</span><span class="p">)</span>

<span class="n">warmpixes</span> <span class="o">=</span> <span class="p">[]</span>
<span class="k">for</span> <span class="n">warm_threshold</span> <span class="ow">in</span> <span class="n">warm_thresholds</span><span class="p">:</span>
<span class="k">for</span> <span class="n">warm_thresh</span> <span class="ow">in</span> <span class="n">warm_thresholds</span><span class="p">:</span>
<span class="c1"># First get the full bins to right of warm_threshold</span>
<span class="n">ii</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">searchsorted</span><span class="p">(</span><span class="n">xbins</span><span class="p">,</span> <span class="n">warm_threshold</span><span class="p">)</span>
<span class="n">ii</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">searchsorted</span><span class="p">(</span><span class="n">xbins</span><span class="p">,</span> <span class="n">warm_thresh</span><span class="p">)</span>
<span class="n">warmpix</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">sum</span><span class="p">(</span><span class="n">y</span><span class="p">[</span><span class="n">ii</span><span class="p">:])</span>
<span class="n">lx</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">log</span><span class="p">(</span><span class="n">warm_threshold</span><span class="p">)</span>
<span class="n">lx</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">log</span><span class="p">(</span><span class="n">warm_thresh</span><span class="p">)</span>
<span class="n">lx0</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">log</span><span class="p">(</span><span class="n">xbins</span><span class="p">[</span><span class="n">ii</span> <span class="o">-</span> <span class="mi">1</span><span class="p">])</span>
<span class="n">lx1</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">log</span><span class="p">(</span><span class="n">xbins</span><span class="p">[</span><span class="n">ii</span><span class="p">])</span>
<span class="n">ly0</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">log</span><span class="p">(</span><span class="n">y</span><span class="p">[</span><span class="n">ii</span> <span class="o">-</span> <span class="mi">1</span><span class="p">])</span>
Expand All @@ -383,8 +391,7 @@ <h1>Source code for chandra_aca.dark_model</h1><div class="highlight"><pre>
<a class="viewcode-back" href="../../dark_model.html#chandra_aca.dark_model.synthetic_dark_image">[docs]</a>
<span class="k">def</span> <span class="nf">synthetic_dark_image</span><span class="p">(</span><span class="n">date</span><span class="p">,</span> <span class="n">t_ccd_ref</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Generate a synthetic dark current image corresponding to the specified</span>
<span class="sd"> ``date`` and ``t_ccd``.</span>
<span class="sd"> Generate a synthetic dark current image corresponding to the specified ``date`` and ``t_ccd``.</span>

<span class="sd"> Parameters</span>
<span class="sd"> ----------</span>
Expand Down
Loading

0 comments on commit b3e453f

Please sign in to comment.