Skip to content

Commit

Permalink
Deploy docs
Browse files Browse the repository at this point in the history
  • Loading branch information
javierggt committed Oct 30, 2024
1 parent beb53c0 commit 619b10e
Show file tree
Hide file tree
Showing 31 changed files with 1,131 additions and 494 deletions.
Binary file added docs/_images/aca_timing_manual.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
56 changes: 38 additions & 18 deletions docs/_modules/chandra_aca/aca_image.html

Large diffs are not rendered by default.

49 changes: 33 additions & 16 deletions docs/_modules/chandra_aca/centroid_resid.html
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@

<!DOCTYPE html>

<html lang="en">
<html lang="en" data-content_root="../../">
<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.45.1 documentation</title>
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="../../_static/bootstrap-astropy.css" />
<title>chandra_aca.centroid_resid &#8212; chandra_aca 4.47.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 data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js"></script>
<script src="../../_static/doctools.js"></script>
<script src="../../_static/sphinx_highlight.js"></script>
<script src="../../_static/documentation_options.js?v=457a4054"></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>
<script type="text/javascript" src="../../_static/copybutton.js"></script>
<link rel="index" title="Index" href="../../genindex.html" />
Expand Down Expand Up @@ -45,7 +44,7 @@
<h3>Navigation</h3>
<ul>
<li>
<a href="../../index.html">chandra_aca 4.45.1 documentation</a>
<a href="../../index.html">chandra_aca 4.47.0 documentation</a>
&#187;
</li>
<li><a href="../index.html" accesskey="U">Module code</a> &#187;</li>
Expand Down Expand Up @@ -80,7 +79,9 @@ <h1>Source code for chandra_aca.centroid_resid</h1><div class="highlight"><pre>
<span class="n">R2A</span> <span class="o">=</span> <span class="mf">206264.81</span> <span class="c1"># Convert from radians to arcsec</span>


<div class="viewcode-block" id="CentroidResiduals"><a class="viewcode-back" href="../../centroid_resid.html#chandra_aca.centroid_resid.CentroidResiduals">[docs]</a><span class="k">class</span> <span class="nc">CentroidResiduals</span><span class="p">(</span><span class="nb">object</span><span class="p">):</span>
<div class="viewcode-block" id="CentroidResiduals">
<a class="viewcode-back" href="../../centroid_resid.html#chandra_aca.centroid_resid.CentroidResiduals">[docs]</a>
<span class="k">class</span> <span class="nc">CentroidResiduals</span><span class="p">(</span><span class="nb">object</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Class to calculate star centroid residuals.</span>

Expand Down Expand Up @@ -147,7 +148,9 @@ <h1>Source code for chandra_aca.centroid_resid</h1><div class="highlight"><pre>
<span class="bp">self</span><span class="o">.</span><span class="n">start</span> <span class="o">=</span> <span class="n">start</span>
<span class="bp">self</span><span class="o">.</span><span class="n">stop</span> <span class="o">=</span> <span class="n">stop</span>

<div class="viewcode-block" id="CentroidResiduals.set_centroids"><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>
<div class="viewcode-block" id="CentroidResiduals.set_centroids">
<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 from ``source`` and ``slot`` to the objects centroid attributes</span>
<span class="sd"> (yag, zag, yag_times, zag_times)</span>
Expand Down Expand Up @@ -213,7 +216,10 @@ <h1>Source code for chandra_aca.centroid_resid</h1><div class="highlight"><pre>
<span class="k">else</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">centroid_dt</span> <span class="o">=</span> <span class="mi">0</span></div>

<div class="viewcode-block" id="CentroidResiduals.set_atts"><a class="viewcode-back" href="../../centroid_resid.html#chandra_aca.centroid_resid.CentroidResiduals.set_atts">[docs]</a> <span class="k">def</span> <span class="nf">set_atts</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">source</span><span class="p">):</span>

<div class="viewcode-block" id="CentroidResiduals.set_atts">
<a class="viewcode-back" href="../../centroid_resid.html#chandra_aca.centroid_resid.CentroidResiduals.set_atts">[docs]</a>
<span class="k">def</span> <span class="nf">set_atts</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="w"> </span><span class="sd">&quot;&quot;&quot;Get attitude solution quaternions from ``source``.</span>

<span class="sd"> One could also just set atts and att_times attributes directly.</span>
Expand Down Expand Up @@ -254,6 +260,7 @@ <h1>Source code for chandra_aca.centroid_resid</h1><div class="highlight"><pre>
<span class="bp">self</span><span class="o">.</span><span class="n">atts</span> <span class="o">=</span> <span class="n">atts</span><span class="p">[</span><span class="n">ok</span><span class="p">,</span> <span class="p">:]</span> <span class="c1"># (N, 4) numpy array</span>
<span class="bp">self</span><span class="o">.</span><span class="n">att_times</span> <span class="o">=</span> <span class="n">att_times</span><span class="p">[</span><span class="n">ok</span><span class="p">]</span></div>


<span class="k">def</span> <span class="nf">set_atts_from_solfiles</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">asol_files</span><span class="p">,</span> <span class="n">acal_files</span><span class="p">,</span> <span class="n">aqual_files</span><span class="p">,</span> <span class="nb">filter</span><span class="o">=</span><span class="kc">True</span><span class="p">):</span>
<span class="n">atts</span><span class="p">,</span> <span class="n">att_times</span><span class="p">,</span> <span class="n">asol_recs</span> <span class="o">=</span> <span class="n">asp_l1</span><span class="o">.</span><span class="n">get_atts_from_files</span><span class="p">(</span>
<span class="n">asol_files</span><span class="p">,</span> <span class="n">acal_files</span><span class="p">,</span> <span class="n">aqual_files</span><span class="p">,</span> <span class="nb">filter</span><span class="o">=</span><span class="nb">filter</span>
Expand All @@ -264,7 +271,9 @@ <h1>Source code for chandra_aca.centroid_resid</h1><div class="highlight"><pre>
<span class="bp">self</span><span class="o">.</span><span class="n">atts</span> <span class="o">=</span> <span class="n">atts</span>
<span class="bp">self</span><span class="o">.</span><span class="n">att_times</span> <span class="o">=</span> <span class="n">att_times</span>

<div class="viewcode-block" id="CentroidResiduals.set_star"><a class="viewcode-back" href="../../centroid_resid.html#chandra_aca.centroid_resid.CentroidResiduals.set_star">[docs]</a> <span class="k">def</span> <span class="nf">set_star</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">agasc_id</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">slot</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
<div class="viewcode-block" id="CentroidResiduals.set_star">
<a class="viewcode-back" href="../../centroid_resid.html#chandra_aca.centroid_resid.CentroidResiduals.set_star">[docs]</a>
<span class="k">def</span> <span class="nf">set_star</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">agasc_id</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">slot</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"> Set self.ra and dec from either agasc_id *or* slot.</span>

Expand Down Expand Up @@ -296,6 +305,7 @@ <h1>Source code for chandra_aca.centroid_resid</h1><div class="highlight"><pre>
<span class="bp">self</span><span class="o">.</span><span class="n">ra</span> <span class="o">=</span> <span class="n">star</span><span class="p">[</span><span class="s2">&quot;RA_PMCORR&quot;</span><span class="p">]</span>
<span class="bp">self</span><span class="o">.</span><span class="n">dec</span> <span class="o">=</span> <span class="n">star</span><span class="p">[</span><span class="s2">&quot;DEC_PMCORR&quot;</span><span class="p">]</span></div>


<span class="nd">@property</span>
<span class="k">def</span> <span class="nf">yags</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_yags</span>
Expand Down Expand Up @@ -336,7 +346,9 @@ <h1>Source code for chandra_aca.centroid_resid</h1><div class="highlight"><pre>
<span class="k">def</span> <span class="nf">zag_times</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">vals</span><span class="p">):</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_zag_times</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">array</span><span class="p">(</span><span class="n">vals</span><span class="p">)</span>

<div class="viewcode-block" id="CentroidResiduals.set_offsets"><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>
<div class="viewcode-block" id="CentroidResiduals.set_offsets">
<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 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>
Expand Down Expand Up @@ -401,7 +413,10 @@ <h1>Source code for chandra_aca.centroid_resid</h1><div class="highlight"><pre>
<span class="bp">self</span><span class="o">.</span><span class="n">yag_times</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">yag_times</span> <span class="o">+</span> <span class="bp">self</span><span class="o">.</span><span class="n">centroid_dt</span>
<span class="bp">self</span><span class="o">.</span><span class="n">zag_times</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">zag_times</span> <span class="o">+</span> <span class="bp">self</span><span class="o">.</span><span class="n">centroid_dt</span></div>

<div class="viewcode-block" id="CentroidResiduals.calc_residuals"><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>

<div class="viewcode-block" id="CentroidResiduals.calc_residuals">
<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 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 Expand Up @@ -437,6 +452,7 @@ <h1>Source code for chandra_aca.centroid_resid</h1><div class="highlight"><pre>
<span class="bp">self</span><span class="o">.</span><span class="n">dyags</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">yags</span> <span class="o">-</span> <span class="bp">self</span><span class="o">.</span><span class="n">pred_yags</span>
<span class="bp">self</span><span class="o">.</span><span class="n">dzags</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">zags</span> <span class="o">-</span> <span class="bp">self</span><span class="o">.</span><span class="n">pred_zags</span></div>


<span class="nd">@classmethod</span>
<span class="k">def</span> <span class="nf">for_slot</span><span class="p">(</span>
<span class="bp">cls</span><span class="p">,</span>
Expand All @@ -463,6 +479,7 @@ <h1>Source code for chandra_aca.centroid_resid</h1><div class="highlight"><pre>
<span class="n">cr</span><span class="o">.</span><span class="n">set_star</span><span class="p">(</span><span class="n">slot</span><span class="o">=</span><span class="n">slot</span><span class="p">)</span>
<span class="n">cr</span><span class="o">.</span><span class="n">calc_residuals</span><span class="p">()</span> <span class="c1"># instead of get_residuals</span>
<span class="k">return</span> <span class="n">cr</span></div>

</pre></div>

<div class="clearer"></div>
Expand All @@ -487,7 +504,7 @@ <h1>Source code for chandra_aca.centroid_resid</h1><div class="highlight"><pre>
<a href="#">Back to Top</a></p>
<p>
&copy; Copyright 2015, Tom Aldcroft, Jean Connelly.<br/>
Created using <a href="http://www.sphinx-doc.org/en/stable/">Sphinx</a> 6.1.3. &nbsp;
Created using <a href="http://www.sphinx-doc.org/en/stable/">Sphinx</a> 7.2.6. &nbsp;
</p>
</footer>
</body>
Expand Down
Loading

0 comments on commit 619b10e

Please sign in to comment.