Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sphinx documentation #94

Merged
merged 13 commits into from
Dec 4, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ instance/
.scrapy

# Sphinx documentation
docs/_build/
#docs/_build/

# PyBuilder
.pybuilder/
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Changes from v0.0.0 to v0.0.1
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a comment to you specifically.
We should discuss this at some point. But I think it would be more appropriate to use v0.1.0 or even v1.0.0.
We should chat about that as a group.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change 0.9.0

=========================
Made repo public.
41 changes: 0 additions & 41 deletions config/README.md

This file was deleted.

49 changes: 49 additions & 0 deletions config/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
Config imsim
============

``was.yaml``: *euclidlike_imsim example* config file.
You will want to update the following entries:

- ``input.obseq_data.file_name``: path to the observing sequence. Link to ``euclidlike/data/euclid_obseq.fits``
- ``input.sky_catalog.file_name``: path to the skyCatalog to use
- ``output.dir``: path to the output directory for the simulated images
- ``output.truth.dir``: path to the output directory for the true catalogs

To run the code:

.. code-block:: bash

galsim was.yaml

You might want to specify some config entries on the command line, like:

.. code-block:: bash

galsim was.yaml input.obseq_data.visit=33690 image.CCD=1


Config SLURM
============

``slurm_runner.sh`` contains the SLURM configuration to run "large scale" simulations.
You will want to update the following lines:

- ``#!/bin/zsh``: depending on the shell you are using, you might want to change it to: ``#!/bin/bash``
- ``#SBATCH --output=/path/to/slurm-%A-%a.out``: SLURM stdout file
- ``#SBATCH --error=/path/to/slurm-%A-%a.err``: SLURM stderr file
- ``source activate [env_name]``: conda environment to use
- ``file_list='/path/to/run_list.txt'``: file containing the pointings to simulate (see note below)

The ``run_list.txt`` is a 2-column file with the pointing and the ``CCD_ID`` to simulate. It should look like:

.. code-block:: text

33688 0
33688 1
33688 2
[...]
33688 35
33689 0
33689 1
[...]

20 changes: 20 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = .
BUILDDIR = _build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
Binary file added docs/_build/doctrees/environment.pickle
Binary file not shown.
Binary file added docs/_build/doctrees/euclidlike.doctree
Binary file not shown.
Binary file added docs/_build/doctrees/euclidlike_imsim.doctree
Binary file not shown.
Binary file added docs/_build/doctrees/examples.doctree
Binary file not shown.
Binary file added docs/_build/doctrees/history.doctree
Binary file not shown.
Binary file added docs/_build/doctrees/index.doctree
Binary file not shown.
Binary file added docs/_build/doctrees/install.doctree
Binary file not shown.
Binary file added docs/_build/doctrees/modules.doctree
Binary file not shown.
Binary file added docs/_build/doctrees/overview.doctree
Binary file not shown.
Binary file added docs/_build/doctrees/scripts.doctree
Binary file not shown.
4 changes: 4 additions & 0 deletions docs/_build/html/.buildinfo
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Sphinx build info version 1
# This file records the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 11d168bc3ba21763cf541d100b9a19c3
tags: 645f666f9bcd5a90fca523b33c5a78b7
331 changes: 331 additions & 0 deletions docs/_build/html/_modules/euclidlike/backgrounds.html

Large diffs are not rendered by default.

231 changes: 231 additions & 0 deletions docs/_build/html/_modules/euclidlike/bandpass.html

Large diffs are not rendered by default.

479 changes: 479 additions & 0 deletions docs/_build/html/_modules/euclidlike/euclidlike_psf.html

Large diffs are not rendered by default.

737 changes: 737 additions & 0 deletions docs/_build/html/_modules/euclidlike/euclidlike_wcs.html

Large diffs are not rendered by default.

144 changes: 144 additions & 0 deletions docs/_build/html/_modules/euclidlike_imsim/bandpass.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
<!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>euclidlike_imsim.bandpass &#8212; GalSim-Euclid-Like 0.0.1 documentation</title>
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css?v=d1102ebc" />
<link rel="stylesheet" type="text/css" href="../../_static/basic.css?v=686e5160" />
<link rel="stylesheet" type="text/css" href="../../_static/alabaster.css?v=27fed22d" />
<script src="../../_static/documentation_options.js?v=d45e8c67"></script>
<script src="../../_static/doctools.js?v=9bcbadda"></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" />





</head><body>


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


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

<h1>Source code for euclidlike_imsim.bandpass</h1><div class="highlight"><pre>
<span></span><span class="kn">import</span> <span class="nn">euclidlike</span>
<span class="kn">from</span> <span class="nn">galsim.config</span> <span class="kn">import</span> <span class="n">BandpassBuilder</span><span class="p">,</span> <span class="n">RegisterBandpassType</span><span class="p">,</span> <span class="n">GetAllParams</span>


<div class="viewcode-block" id="EuclidlikeBandpassBuilder">
<a class="viewcode-back" href="../../euclidlike_imsim.html#euclidlike_imsim.bandpass.EuclidlikeBandpassBuilder">[docs]</a>
<span class="k">class</span> <span class="nc">EuclidlikeBandpassBuilder</span><span class="p">(</span><span class="n">BandpassBuilder</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;A class for loading a Bandpass from a file</span>

<span class="sd"> FileBandpass expected the following parameter:</span>

<span class="sd"> name (str) The name of the Euclid filter to get. (required)</span>
<span class="sd"> &quot;&quot;&quot;</span>
<div class="viewcode-block" id="EuclidlikeBandpassBuilder.buildBandpass">
<a class="viewcode-back" href="../../euclidlike_imsim.html#euclidlike_imsim.bandpass.EuclidlikeBandpassBuilder.buildBandpass">[docs]</a>
<span class="k">def</span> <span class="nf">buildBandpass</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">config</span><span class="p">,</span> <span class="n">base</span><span class="p">,</span> <span class="n">logger</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Build the Bandpass based on the specifications in the config dict.</span>

<span class="sd"> Parameters:</span>
<span class="sd"> config: The configuration dict for the bandpass type.</span>
<span class="sd"> base: The base configuration dict.</span>
<span class="sd"> logger: If provided, a logger for logging debug statements.</span>

<span class="sd"> Returns:</span>
<span class="sd"> the constructed Bandpass object.</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">req</span> <span class="o">=</span> <span class="p">{</span><span class="s1">&#39;name&#39;</span><span class="p">:</span> <span class="nb">str</span><span class="p">}</span>
<span class="n">kwargs</span><span class="p">,</span> <span class="n">safe</span> <span class="o">=</span> <span class="n">GetAllParams</span><span class="p">(</span><span class="n">config</span><span class="p">,</span> <span class="n">base</span><span class="p">,</span> <span class="n">req</span><span class="o">=</span><span class="n">req</span><span class="p">)</span>

<span class="n">name</span> <span class="o">=</span> <span class="n">kwargs</span><span class="p">[</span><span class="s1">&#39;name&#39;</span><span class="p">]</span>
<span class="c1"># Hard set the limit due to PSF definition</span>
<span class="n">bandpass</span> <span class="o">=</span> <span class="n">euclidlike</span><span class="o">.</span><span class="n">getBandpasses</span><span class="p">()[</span><span class="n">name</span><span class="p">]</span>

<span class="k">return</span> <span class="n">bandpass</span><span class="p">,</span> <span class="n">safe</span></div>
</div>



<span class="n">RegisterBandpassType</span><span class="p">(</span><span class="s1">&#39;EuclidlikeBandpass&#39;</span><span class="p">,</span> <span class="n">EuclidlikeBandpassBuilder</span><span class="p">())</span>
<span class="n">RegisterBandpassType</span><span class="p">(</span><span class="s1">&#39;EuclidlikeBandpassTrimmed&#39;</span><span class="p">,</span> <span class="n">EuclidlikeBandpassBuilder</span><span class="p">())</span>
</pre></div>

</div>

</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="Main">
<div class="sphinxsidebarwrapper">
<h1 class="logo"><a href="../../index.html">GalSim-Euclid-Like</a></h1>









<search id="searchbox" style="display: none" role="search">
<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" placeholder="Search"/>
<input type="submit" value="Go" />
</form>
</div>
</search>
<script>document.getElementById('searchbox').style.display = "block"</script><h3>Navigation</h3>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../overview.html">Overview</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../install.html">Installation</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../euclidlike.html">The Euclid-like Module</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../euclidlike_imsim.html">The Euclid-like ImSim Module</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../examples.html">Examples</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../history.html">Revision History</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>
</div>
<div class="clearer"></div>
</div>
<div class="footer">
&#169;2024, Rachel Mandelbaum, Axel Guinot, Federico Berlfein, Andy Park, Xiangchong Li, Michael Troxel, Tianqing Zhang.

|
Powered by <a href="https://www.sphinx-doc.org/">Sphinx 8.1.3</a>
&amp; <a href="https://alabaster.readthedocs.io">Alabaster 1.0.0</a>

</div>




</body>
</html>
Loading
Loading