-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsubarrays.html
165 lines (148 loc) · 9.17 KB
/
subarrays.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
<!DOCTYPE html>
<html lang="en" data-content_root="./">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Support for subarrays — liger_iris_pipeline v0.5.dev</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=9d21690f" />
<link rel="stylesheet" type="text/css" href="_static/graphviz.css?v=fd3f3429" />
<link rel="stylesheet" type="text/css" href="_static/plot_directive.css" />
<script src="_static/jquery.js?v=5d32c60e"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script src="_static/documentation_options.js?v=3b3f3827"></script>
<script src="_static/doctools.js?v=9a2dae69"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<script crossorigin="anonymous" integrity="sha256-Ae2Vz/4ePdIu6ZyI/5ZGsYnb+m0JlOmKPjt6XZ9JJkA=" src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js"></script>
<script type="text/javascript" src="_static/sidebar.js"></script>
<script type="text/javascript" src="_static/copybutton.js"></script>
<link rel="icon" href="_static/astropy_logo.ico"/>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="monkeypatch_jwst_datamodels" href="api/liger_iris_pipeline.monkeypatch_jwst_datamodels.html" />
<link rel="prev" title="Algorithms" href="algorithms.html" />
<link href='https://fonts.googleapis.com/css?family=Source+Sans+Pro:200,600' rel='stylesheet' type='text/css'/>
</head><body>
<div class="topbar">
<a class="brand" title="Documentation Home" href="index.html"><span id="logotext1">liger_iris_pipeline</span><span id="logotext2"></span><span id="logotext3">:docs</span></a>
<ul>
<li><a class="homelink" title="Astropy Homepage" href="http://www.astropy.org"></a></li>
<li><a title="General Index" href="genindex.html">Index</a></li>
<li><a title="Module Index" href="py-modindex.html">Modules</a></li>
<li>
<form action="search.html" method="get">
<input type="text" name="q" placeholder="Search" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</li>
</ul>
</div>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right">
<a href="api/liger_iris_pipeline.monkeypatch_jwst_datamodels.html" title="monkeypatch_jwst_datamodels">
next »
</a>
</li>
<li class="right">
<a href="algorithms.html" title="Algorithms">
« previous
</a>
|
</li>
<li>
<a href="index.html">liger_iris_pipeline v0.5.dev</a>
»
</li>
<li>Support for subarrays</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<section id="support-for-subarrays">
<h1>Support for subarrays<a class="headerlink" href="#support-for-subarrays" title="Link to this heading">¶</a></h1>
<p>Support for subarrays is currently only implemented for the imager and it supports
datasets where only a custom subset of the 2D array is observed.</p>
<p>The keywords of <code class="xref py py-class docutils literal notranslate"><span class="pre">IRISImageModel</span></code> which defines the parameters of the
subarray are:</p>
<div class="highlight-python3 notranslate"><div class="highlight"><pre><span></span><span class="n">model</span><span class="o">.</span><span class="n">meta</span><span class="o">.</span><span class="n">subarray</span><span class="o">.</span><span class="n">name</span> <span class="o">=</span> <span class="s2">"CUSTOM"</span>
<span class="n">model</span><span class="o">.</span><span class="n">meta</span><span class="o">.</span><span class="n">subarray</span><span class="o">.</span><span class="n">id</span> <span class="o">=</span> <span class="mi">1</span>
<span class="n">model</span><span class="o">.</span><span class="n">meta</span><span class="o">.</span><span class="n">subarray</span><span class="o">.</span><span class="n">xstart</span> <span class="o">=</span> <span class="n">xstart</span> <span class="o">+</span> <span class="mi">1</span>
<span class="n">model</span><span class="o">.</span><span class="n">meta</span><span class="o">.</span><span class="n">subarray</span><span class="o">.</span><span class="n">ystart</span> <span class="o">=</span> <span class="n">ystart</span> <span class="o">+</span> <span class="mi">1</span>
<span class="n">model</span><span class="o">.</span><span class="n">meta</span><span class="o">.</span><span class="n">subarray</span><span class="o">.</span><span class="n">xsize</span> <span class="o">=</span> <span class="n">xsize</span>
<span class="n">model</span><span class="o">.</span><span class="n">meta</span><span class="o">.</span><span class="n">subarray</span><span class="o">.</span><span class="n">ysize</span> <span class="o">=</span> <span class="n">ysize</span>
</pre></div>
</div>
<p>Consider that following the FITS conventions the <code class="xref py py-obj docutils literal notranslate"><span class="pre">xstart</span></code> and <code class="xref py py-obj docutils literal notranslate"><span class="pre">ystart</span></code> keywords
are 1-based, therefore the default <code class="xref py py-obj docutils literal notranslate"><span class="pre">xstart</span></code> is 1 and if you are slicing an
array in Python, you should add 1 to the keyword before saving it into the metadata.
<code class="xref py py-obj docutils literal notranslate"><span class="pre">subarray.id</span></code> is saved into the FITS keyword <code class="xref py py-obj docutils literal notranslate"><span class="pre">SUBARRID</span></code> and should be 0 for full
frames, 1 for the first subarray and so on.</p>
<p>The name of an entire frame is “FULL”.</p>
<section id="subarrays-and-reference-files">
<h2>Subarrays and reference files<a class="headerlink" href="#subarrays-and-reference-files" title="Link to this heading">¶</a></h2>
<p>Flat frames, darks and background files either in CRDS or using local overrides
can either be saved as subarrays
or can be saved as full frames. In case they are saved as full frames, after being
accessed they are sliced according to the metadata in the input subarray.</p>
</section>
<section id="example-usage">
<h2>Example usage<a class="headerlink" href="#example-usage" title="Link to this heading">¶</a></h2>
<p>As usage examples, check the notebooks or the <code class="docutils literal notranslate"><span class="pre">test_image2.py</span></code> script in the
<a class="reference external" href="https://github.com/oirlab/liger_iris_pipeline/tree/master/liger_iris_pipeline/tests">unit tests folder in the repository</a></p>
</section>
<section id="related-steps">
<h2>Related steps<a class="headerlink" href="#related-steps" title="Link to this heading">¶</a></h2>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="parse_subarray_map/index.html">Parse Subarray Map</a><ul>
<li class="toctree-l2"><a class="reference internal" href="parse_subarray_map/index.html#description">Description</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="merge_subarrays/index.html">Merge subarrays</a><ul>
<li class="toctree-l2"><a class="reference internal" href="merge_subarrays/index.html#description">Description</a></li>
<li class="toctree-l2"><a class="reference internal" href="merge_subarrays/index.html#input">Input</a></li>
<li class="toctree-l2"><a class="reference internal" href="merge_subarrays/index.html#merging-algorithm">Merging algorithm</a></li>
<li class="toctree-l2"><a class="reference internal" href="merge_subarrays/index.html#output">Output</a></li>
</ul>
</li>
</ul>
</div>
</section>
</section>
<div class="clearer"></div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="Main">
<div class="sphinxsidebarwrapper"><h3>Page Contents</h3>
<ul>
<li><a class="reference internal" href="#">Support for subarrays</a><ul>
<li><a class="reference internal" href="#subarrays-and-reference-files">Subarrays and reference files</a></li>
<li><a class="reference internal" href="#example-usage">Example usage</a></li>
<li><a class="reference internal" href="#related-steps">Related steps</a></li>
</ul>
</li>
</ul>
</div>
</div>
<div class="clearer"></div>
</div>
<footer class="footer">
<p class="pull-right">
<a href="https://github.com/oirlab/liger_iris_pipeline/tree/master/docs/subarrays.rst">Edit This Page on Github</a>
<a href="_sources/subarrays.rst.txt"
rel="nofollow">Page Source</a>
<a href="#">Back to Top</a></p>
<p>
© Copyright 2024, Andrea Zonca, Arun Surya, Bryson Cale.<br/>
Created using <a href="http://www.sphinx-doc.org/en/stable/">Sphinx</a> 8.0.2.
Last built 02 Sep 2024. <br/>
</p>
</footer>
</body>
</html>