Skip to content

Commit

Permalink
Updated structure
Browse files Browse the repository at this point in the history
  • Loading branch information
Federico Berlfein committed Nov 8, 2024
1 parent 6454870 commit 7e9b74b
Show file tree
Hide file tree
Showing 65 changed files with 6,813 additions and 837 deletions.
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
=========================
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
[...]
Binary file modified docs/_build/doctrees/environment.pickle
Binary file not shown.
Binary file modified docs/_build/doctrees/euclidlike.doctree
Binary file not shown.
Binary file modified 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 modified docs/_build/doctrees/index.doctree
Binary file not shown.
Binary file added docs/_build/doctrees/install.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/modules.doctree
Binary file not shown.
Binary file added docs/_build/doctrees/overview.doctree
Binary file not shown.
Binary file modified docs/_build/doctrees/scripts.doctree
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/_build/html/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +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: cec21682d6cc0df78936fbd198ac0c57
config: 11d168bc3ba21763cf541d100b9a19c3
tags: 645f666f9bcd5a90fca523b33c5a78b7
15 changes: 10 additions & 5 deletions docs/_build/html/_modules/euclidlike/backgrounds.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ <h1>Source code for euclidlike.backgrounds</h1><div class="highlight"><pre>
<span class="kn">import</span> <span class="nn">galsim</span>

<div class="viewcode-block" id="getSkyLevel">
<a class="viewcode-back" href="../../euclidlike.html#euclidlike.backgrounds.getSkyLevel">[docs]</a>
<a class="viewcode-back" href="../../euclidlike.html#euclidlike.getSkyLevel">[docs]</a>
<span class="k">def</span> <span class="nf">getSkyLevel</span><span class="p">(</span><span class="n">bandpass</span><span class="p">,</span> <span class="n">world_pos</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">exptime</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">epoch</span><span class="o">=</span><span class="mi">2025</span><span class="p">,</span> <span class="n">date</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"> Get the expected sky level for a Euclid observation due to zodiacal light for this bandpass</span>
Expand Down Expand Up @@ -121,8 +121,6 @@ <h1>Source code for euclidlike.backgrounds</h1><div class="highlight"><pre>
<span class="k">return</span> <span class="n">sky_val</span> </div>


<div class="viewcode-block" id="getZodiBackground">
<a class="viewcode-back" href="../../euclidlike.html#euclidlike.backgrounds.getZodiBackground">[docs]</a>
<span class="k">def</span> <span class="nf">getZodiBackground</span><span class="p">(</span><span class="n">ecl_lat</span><span class="p">,</span> <span class="n">ecl_dlon</span><span class="p">,</span> <span class="n">lambda_min</span><span class="p">,</span> <span class="n">lambda_max</span><span class="p">,</span> <span class="n">Tlambda</span><span class="p">,</span> <span class="n">T</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> This helper routine is used with permission from Chris Hirata&#39;s Exposure Time Calculator and enables the</span>
Expand Down Expand Up @@ -258,8 +256,7 @@ <h1>Source code for euclidlike.backgrounds</h1><div class="highlight"><pre>
<span class="mf">5.03411747e10</span><span class="o">*</span><span class="n">lambda_</span><span class="o">*</span> <span class="n">np</span><span class="o">.</span><span class="n">interp</span><span class="p">(</span><span class="n">lambda_</span><span class="p">,</span><span class="n">Tlambda</span><span class="p">,</span><span class="n">T</span><span class="p">)</span>

<span class="c1"># We now have the zodi level in photons/m^2/sr/sec. Convert to photons/m^2/arcsec^2/sec.</span>
<span class="k">return</span> <span class="p">(</span><span class="n">zodi_tot</span> <span class="o">/</span> <span class="mf">4.2545170296152206e10</span><span class="p">)</span></div>

<span class="k">return</span> <span class="p">(</span><span class="n">zodi_tot</span> <span class="o">/</span> <span class="mf">4.2545170296152206e10</span><span class="p">)</span>

</pre></div>

Expand Down Expand Up @@ -288,6 +285,14 @@ <h1 class="logo"><a href="../../index.html">GalSim-Euclid-Like</a></h1>
</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>
Expand Down
10 changes: 9 additions & 1 deletion docs/_build/html/_modules/euclidlike/bandpass.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ <h1>Source code for euclidlike.bandpass</h1><div class="highlight"><pre>
<span class="kn">from</span> <span class="nn">.</span> <span class="kn">import</span> <span class="n">vis_red_limit</span><span class="p">,</span> <span class="n">vis_blue_limit</span>

<div class="viewcode-block" id="getBandpasses">
<a class="viewcode-back" href="../../euclidlike.html#euclidlike.bandpass.getBandpasses">[docs]</a>
<a class="viewcode-back" href="../../euclidlike.html#euclidlike.getBandpasses">[docs]</a>
<span class="k">def</span> <span class="nf">getBandpasses</span><span class="p">(</span><span class="n">AB_zeropoint</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span> <span class="n">default_thin_trunc</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span> <span class="n">full_bandpass</span><span class="o">=</span><span class="kc">False</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;</span>
<span class="sd"> Function to get the bandpass information for the Euclid VIS band and the three Euclid NISP passbands.</span>
Expand Down Expand Up @@ -185,6 +185,14 @@ <h1 class="logo"><a href="../../index.html">GalSim-Euclid-Like</a></h1>
</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>
Expand Down
12 changes: 10 additions & 2 deletions docs/_build/html/_modules/euclidlike/euclidlike_psf.html
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ <h1>Source code for euclidlike.euclidlike_psf</h1><div class="highlight"><pre>
<span class="n">_get_quadrant_psf</span> <span class="o">=</span> <span class="n">LRU_Cache</span><span class="p">(</span><span class="n">__get_quadrant_psf</span><span class="p">)</span>

<div class="viewcode-block" id="getPSF">
<a class="viewcode-back" href="../../euclidlike.html#euclidlike.euclidlike_psf.getPSF">[docs]</a>
<a class="viewcode-back" href="../../euclidlike.html#euclidlike.getPSF">[docs]</a>
<span class="k">def</span> <span class="nf">getPSF</span><span class="p">(</span>
<span class="n">ccd</span><span class="p">,</span> <span class="n">bandpass</span><span class="p">,</span>
<span class="n">ccd_pos</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">wcs</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
Expand Down Expand Up @@ -231,7 +231,7 @@ <h1>Source code for euclidlike.euclidlike_psf</h1><div class="highlight"><pre>


<div class="viewcode-block" id="getBrightPSF">
<a class="viewcode-back" href="../../euclidlike.html#euclidlike.euclidlike_psf.getBrightPSF">[docs]</a>
<a class="viewcode-back" href="../../euclidlike.html#euclidlike.getBrightPSF">[docs]</a>
<span class="k">def</span> <span class="nf">getBrightPSF</span><span class="p">(</span>
<span class="n">ccd</span><span class="p">,</span>
<span class="n">bandpass</span><span class="p">,</span>
Expand Down Expand Up @@ -433,6 +433,14 @@ <h1 class="logo"><a href="../../index.html">GalSim-Euclid-Like</a></h1>
</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>
Expand Down
Loading

0 comments on commit 7e9b74b

Please sign in to comment.