Skip to content

Commit

Permalink
deploy: 2f0ead5
Browse files Browse the repository at this point in the history
  • Loading branch information
teald committed Jan 2, 2024
0 parents commit fc88f7b
Show file tree
Hide file tree
Showing 134 changed files with 22,388 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .buildinfo
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: b922d7da3a1aaca6704d4e9ce9e416ce
tags: 645f666f9bcd5a90fca523b33c5a78b7
Binary file added .doctrees/api/astrodata.AstroData.doctree
Binary file not shown.
Binary file added .doctrees/api/astrodata.AstroDataError.doctree
Binary file not shown.
Binary file added .doctrees/api/astrodata.AstroDataMixin.doctree
Binary file not shown.
Binary file added .doctrees/api/astrodata.NDAstroData.doctree
Binary file not shown.
Binary file added .doctrees/api/astrodata.Section.doctree
Binary file not shown.
Binary file added .doctrees/api/astrodata.TagSet.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added .doctrees/api/astrodata.astro_data_tag.doctree
Binary file not shown.
Binary file added .doctrees/api/astrodata.create.doctree
Binary file not shown.
Binary file added .doctrees/api/astrodata.from_file.doctree
Binary file not shown.
Binary file added .doctrees/api/astrodata.open.doctree
Binary file not shown.
Binary file added .doctrees/api/astrodata.returns_list.doctree
Binary file not shown.
Binary file added .doctrees/api/astrodata.version.doctree
Binary file not shown.
Binary file added .doctrees/api_short.doctree
Binary file not shown.
Binary file added .doctrees/environment.pickle
Binary file not shown.
Binary file added .doctrees/index.doctree
Binary file not shown.
Binary file added .doctrees/manuals/appendix_descriptors.doctree
Binary file not shown.
Binary file added .doctrees/manuals/cheatsheet.doctree
Binary file not shown.
Binary file added .doctrees/manuals/full_api.doctree
Binary file not shown.
Binary file added .doctrees/manuals/index.doctree
Binary file not shown.
Binary file added .doctrees/manuals/progmanual/adclass.doctree
Binary file not shown.
Binary file added .doctrees/manuals/progmanual/containers.doctree
Binary file not shown.
Binary file added .doctrees/manuals/progmanual/descriptors.doctree
Binary file not shown.
Binary file added .doctrees/manuals/progmanual/design.doctree
Binary file not shown.
Binary file added .doctrees/manuals/progmanual/index.doctree
Binary file not shown.
Binary file added .doctrees/manuals/progmanual/intro.doctree
Binary file not shown.
Binary file added .doctrees/manuals/progmanual/tags.doctree
Binary file not shown.
Binary file added .doctrees/manuals/usermanual/data.doctree
Binary file not shown.
Binary file added .doctrees/manuals/usermanual/headers.doctree
Binary file not shown.
Binary file added .doctrees/manuals/usermanual/index.doctree
Binary file not shown.
Binary file added .doctrees/manuals/usermanual/intro.doctree
Binary file not shown.
Binary file added .doctrees/manuals/usermanual/iomef.doctree
Binary file not shown.
Binary file added .doctrees/manuals/usermanual/structure.doctree
Binary file not shown.
Binary file added .doctrees/manuals/usermanual/tables.doctree
Binary file not shown.
Binary file added .doctrees/manuals/usermanual/tags.doctree
Binary file not shown.
Empty file added .nojekyll
Empty file.
198 changes: 198 additions & 0 deletions _modules/astrodata.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,198 @@
<!DOCTYPE html>

<html lang="en" data-content_root="../">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>astrodata &#8212; astrodata 3.2.0 documentation</title>
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=4f649999" />
<link rel="stylesheet" type="text/css" href="../_static/alabaster.css?v=039e1c02" />
<link rel="stylesheet" type="text/css" href="../_static/graphviz.css?v=eafc0fe6" />
<script src="../_static/documentation_options.js?v=4f6ddb47"></script>
<script src="../_static/doctools.js?v=888ff710"></script>
<script src="../_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />

<link rel="stylesheet" href="../_static/custom.css" type="text/css" />


<meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />

</head><body>


<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">


<div class="body" role="main">

<h1>Source code for astrodata</h1><div class="highlight"><pre>
<span></span><span class="sd">&quot;&quot;&quot;This package adds an abstraction layer to astronomical data by parsing the</span>
<span class="sd">information contained in the headers as attributes. To do so, one must subclass</span>
<span class="sd">:class:`astrodata.AstroData` and add parse methods accordingly to the</span>
<span class="sd">:class:`~astrodata.TagSet` received.</span>

<span class="sd">&quot;&quot;&quot;</span>
<span class="kn">from</span> <span class="nn">.core</span> <span class="kn">import</span> <span class="n">AstroData</span>
<span class="kn">from</span> <span class="nn">.factory</span> <span class="kn">import</span> <span class="n">AstroDataFactory</span><span class="p">,</span> <span class="n">AstroDataError</span>
<span class="kn">from</span> <span class="nn">.fits</span> <span class="kn">import</span> <span class="n">add_header_to_table</span>
<span class="kn">from</span> <span class="nn">.nddata</span> <span class="kn">import</span> <span class="n">NDAstroData</span><span class="p">,</span> <span class="n">AstroDataMixin</span>
<span class="kn">from</span> <span class="nn">.utils</span> <span class="kn">import</span> <span class="p">(</span>
<span class="n">Section</span><span class="p">,</span>
<span class="n">TagSet</span><span class="p">,</span>
<span class="n">astro_data_descriptor</span><span class="p">,</span>
<span class="n">astro_data_tag</span><span class="p">,</span>
<span class="n">returns_list</span><span class="p">,</span>
<span class="n">deprecated</span><span class="p">,</span>
<span class="p">)</span>
<span class="kn">from</span> <span class="nn">._version</span> <span class="kn">import</span> <span class="n">version</span>

<span class="n">__all__</span> <span class="o">=</span> <span class="p">[</span>
<span class="s2">&quot;AstroData&quot;</span><span class="p">,</span>
<span class="s2">&quot;AstroDataError&quot;</span><span class="p">,</span>
<span class="s2">&quot;AstroDataMixin&quot;</span><span class="p">,</span>
<span class="s2">&quot;NDAstroData&quot;</span><span class="p">,</span>
<span class="s2">&quot;Section&quot;</span><span class="p">,</span>
<span class="s2">&quot;TagSet&quot;</span><span class="p">,</span>
<span class="s2">&quot;__version__&quot;</span><span class="p">,</span>
<span class="s2">&quot;add_header_to_table&quot;</span><span class="p">,</span>
<span class="s2">&quot;astro_data_descriptor&quot;</span><span class="p">,</span>
<span class="s2">&quot;astro_data_tag&quot;</span><span class="p">,</span>
<span class="s2">&quot;from_file&quot;</span><span class="p">,</span>
<span class="s2">&quot;create&quot;</span><span class="p">,</span>
<span class="s2">&quot;returns_list&quot;</span><span class="p">,</span>
<span class="s2">&quot;version&quot;</span><span class="p">,</span>
<span class="c1"># Below this are deprecated</span>
<span class="s2">&quot;open&quot;</span><span class="p">,</span>
<span class="p">]</span>

<span class="c1"># Make sure __all__does not have duplicates</span>
<span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">__all__</span><span class="p">)</span> <span class="o">!=</span> <span class="nb">len</span><span class="p">(</span><span class="nb">set</span><span class="p">(</span><span class="n">__all__</span><span class="p">)):</span>
<span class="n">duplicates</span> <span class="o">=</span> <span class="p">[</span><span class="n">x</span> <span class="k">for</span> <span class="n">i</span><span class="p">,</span> <span class="n">x</span> <span class="ow">in</span> <span class="nb">enumerate</span><span class="p">(</span><span class="n">__all__</span><span class="p">)</span> <span class="k">if</span> <span class="n">x</span> <span class="ow">in</span> <span class="n">__all__</span><span class="p">[:</span><span class="n">i</span><span class="p">]]</span>
<span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;Duplicate entries in __all__: </span><span class="si">{</span><span class="s1">&#39;, &#39;</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">duplicates</span><span class="p">)</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">)</span>

<span class="n">__version__</span> <span class="o">=</span> <span class="n">version</span><span class="p">()</span>

<span class="c1"># TODO: This is pretty unacceptable, this makes it impossible to access the</span>
<span class="c1"># factory classes, errors, and methods through any normal means. Which means</span>
<span class="c1"># they are very difficult to write tests for, or to have users work on</span>
<span class="c1"># themselves.</span>
<span class="n">factory</span> <span class="o">=</span> <span class="n">AstroDataFactory</span><span class="p">()</span>
<span class="c1"># Let&#39;s make sure that there&#39;s at least one class that matches the data</span>
<span class="c1"># (if we&#39;re dealing with a FITS file)</span>
<span class="n">factory</span><span class="o">.</span><span class="n">add_class</span><span class="p">(</span><span class="n">AstroData</span><span class="p">)</span>


<div class="viewcode-block" id="from_file">
<a class="viewcode-back" href="../api/astrodata.from_file.html#astrodata.from_file">[docs]</a>
<span class="k">def</span> <span class="nf">from_file</span><span class="p">(</span><span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Return an |AstroData| object from a file.</span>

<span class="sd"> For implementation details, see</span>
<span class="sd"> :meth:`~astrodata.AstroDataFactory.get_astro_data`.</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">return</span> <span class="n">factory</span><span class="o">.</span><span class="n">get_astro_data</span><span class="p">(</span><span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span></div>



<div class="viewcode-block" id="create">
<a class="viewcode-back" href="../api/astrodata.create.html#astrodata.create">[docs]</a>
<span class="k">def</span> <span class="nf">create</span><span class="p">(</span><span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Return an |AstroData| object from data.</span>

<span class="sd"> For implementation details, see</span>
<span class="sd"> :meth:`~astrodata.AstroDataFactory.create_from_scratch`</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">return</span> <span class="n">factory</span><span class="o">.</span><span class="n">create_from_scratch</span><span class="p">(</span><span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span></div>



<span class="c1"># TODO: Need to replace this with a name that doesn&#39;t override the builtin.</span>
<span class="c1"># This makes it so that the following will cause unexpected behavior:</span>
<span class="c1"># from astrodata import *</span>
<span class="c1"># file_stream = open(&quot;some_file.fits&quot;)</span>
<span class="c1"># Without raising a warning or error.</span>
<div class="viewcode-block" id="open">
<a class="viewcode-back" href="../api/astrodata.open.html#astrodata.open">[docs]</a>
<span class="nd">@deprecated</span><span class="p">(</span>
<span class="s2">&quot;Use &#39;astrodata.from_file&#39;. astrodata.open is deprecated, &quot;</span>
<span class="s2">&quot;and will be removed in a future version.&quot;</span>
<span class="p">)</span>
<span class="k">def</span> <span class="nf">open</span><span class="p">(</span><span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span> <span class="c1"># pylint: disable=redefined-builtin</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Return an |AstroData| object from a file (deprecated, use</span>
<span class="sd"> :func:`~astrodata.from_file`).</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">return</span> <span class="n">from_file</span><span class="p">(</span><span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span></div>

</pre></div>

</div>

</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h1 class="logo"><a href="../index.html">astrodata</a></h1>








<h3>Navigation</h3>
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../manuals/index.html">Astrodata Manual</a></li>
<li class="toctree-l1"><a class="reference internal" href="../api_short.html">Common API for Users</a></li>
</ul>

<div class="relations">
<h3>Related Topics</h3>
<ul>
<li><a href="../index.html">Documentation overview</a><ul>
<li><a href="index.html">Module code</a><ul>
</ul></li>
</ul></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>








</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer">
&copy;2023, .

|
Powered by <a href="http://sphinx-doc.org/">Sphinx 7.2.6</a>
&amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.13</a>

</div>




</body>
</html>
137 changes: 137 additions & 0 deletions _modules/astrodata/_version.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
<!DOCTYPE html>

<html lang="en" data-content_root="../../">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>astrodata._version &#8212; astrodata 3.2.0 documentation</title>
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=4f649999" />
<link rel="stylesheet" type="text/css" href="../../_static/alabaster.css?v=039e1c02" />
<link rel="stylesheet" type="text/css" href="../../_static/graphviz.css?v=eafc0fe6" />
<script src="../../_static/documentation_options.js?v=4f6ddb47"></script>
<script src="../../_static/doctools.js?v=888ff710"></script>
<script src="../../_static/sphinx_highlight.js?v=dc90522c"></script>
<link rel="index" title="Index" href="../../genindex.html" />
<link rel="search" title="Search" href="../../search.html" />

<link rel="stylesheet" href="../../_static/custom.css" type="text/css" />


<meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />

</head><body>


<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">


<div class="body" role="main">

<h1>Source code for astrodata._version</h1><div class="highlight"><pre>
<span></span><span class="ch">#!/usr/bin/env python</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd">Holds the DRAGONS version to be propagated throught all the DRAGONS package</span>
<span class="sd">and to be used in the documentation.</span>
<span class="sd">&quot;&quot;&quot;</span>

<span class="c1"># --- Setup Version Here ---</span>
<span class="n">API</span> <span class="o">=</span> <span class="mi">3</span>
<span class="n">FEATURE</span> <span class="o">=</span> <span class="mi">2</span>
<span class="n">BUG</span> <span class="o">=</span> <span class="mi">0</span>
<span class="n">TAG</span> <span class="o">=</span> <span class="s2">&quot;&quot;</span>


<div class="viewcode-block" id="version">
<a class="viewcode-back" href="../../api/astrodata.version.html#astrodata.version">[docs]</a>
<span class="k">def</span> <span class="nf">version</span><span class="p">(</span><span class="n">short</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">tag</span><span class="o">=</span><span class="n">TAG</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Returns DRAGONS&#39;s version based on the api,</span>
<span class="sd"> feature and bug numbers.</span>

<span class="sd"> Returns</span>
<span class="sd"> -------</span>
<span class="sd"> str : formatted version</span>
<span class="sd"> &quot;&quot;&quot;</span>

<span class="k">if</span> <span class="n">short</span><span class="p">:</span>
<span class="n">_version</span> <span class="o">=</span> <span class="s2">&quot;</span><span class="si">{:d}</span><span class="s2">.</span><span class="si">{:d}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">API</span><span class="p">,</span> <span class="n">FEATURE</span><span class="p">)</span>

<span class="k">else</span><span class="p">:</span>
<span class="n">_tag</span> <span class="o">=</span> <span class="s2">&quot;_</span><span class="si">{:s}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">tag</span><span class="p">)</span> <span class="k">if</span> <span class="n">tag</span> <span class="k">else</span> <span class="s2">&quot;&quot;</span>
<span class="n">_version</span> <span class="o">=</span> <span class="s2">&quot;</span><span class="si">{:d}</span><span class="s2">.</span><span class="si">{:d}</span><span class="s2">.</span><span class="si">{:d}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">API</span><span class="p">,</span> <span class="n">FEATURE</span><span class="p">,</span> <span class="n">BUG</span><span class="p">)</span> <span class="o">+</span> <span class="n">_tag</span>

<span class="k">return</span> <span class="n">_version</span></div>

</pre></div>

</div>

</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h1 class="logo"><a href="../../index.html">astrodata</a></h1>








<h3>Navigation</h3>
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../manuals/index.html">Astrodata Manual</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../api_short.html">Common API for Users</a></li>
</ul>

<div class="relations">
<h3>Related Topics</h3>
<ul>
<li><a href="../../index.html">Documentation overview</a><ul>
<li><a href="../index.html">Module code</a><ul>
<li><a href="../astrodata.html">astrodata</a><ul>
</ul></li>
</ul></li>
</ul></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>document.getElementById('searchbox').style.display = "block"</script>








</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer">
&copy;2023, .

|
Powered by <a href="http://sphinx-doc.org/">Sphinx 7.2.6</a>
&amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.13</a>

</div>




</body>
</html>
Loading

0 comments on commit fc88f7b

Please sign in to comment.