Skip to content

Commit eb8f4f4

Browse files
committed
release
1 parent 94d36f7 commit eb8f4f4

File tree

5 files changed

+84
-53
lines changed

5 files changed

+84
-53
lines changed

CHANGELOG.md

+9
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22

33
<!-- do not remove -->
44

5+
## 0.21.1
6+
7+
8+
### Bugs Squashed
9+
10+
- User functions not exported to library ([#8](https://github.com/michaelaye/nbplanetary/issues/8))
11+
- I forgot the #export line in the cells with the user functions.
12+
13+
514

615
## 0.21.0
716

docs/ctx.html

+21-6
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@
3434

3535

3636

37-
<div id="b0d920e2-4d0f-4e02-b150-ce437d4ca64e"></div>
37+
<div id="510f4906-de2e-4b80-a21e-ca654155ba61"></div>
3838
<div class="output_subarea output_javascript ">
3939
<script type="text/javascript">
40-
var element = $('#b0d920e2-4d0f-4e02-b150-ce437d4ca64e');
40+
var element = $('#510f4906-de2e-4b80-a21e-ca654155ba61');
4141

4242
(function(root) {
4343
function now() {
@@ -1687,10 +1687,10 @@
16871687

16881688

16891689

1690-
<div id="c218227f-3dc5-4bec-9482-365adf21842d"></div>
1690+
<div id="939af6e4-17c6-4e1e-a42e-3a120f8c661e"></div>
16911691
<div class="output_subarea output_javascript ">
16921692
<script type="text/javascript">
1693-
var element = $('#c218227f-3dc5-4bec-9482-365adf21842d');
1693+
var element = $('#939af6e4-17c6-4e1e-a42e-3a120f8c661e');
16941694

16951695
if ((window.PyViz === undefined) || (window.PyViz instanceof HTMLElement)) {
16961696
window.PyViz = {comms: {}, comm_status:{}, kernels:{}, receivers: {}, plot_index: []}
@@ -2190,6 +2190,10 @@
21902190
<div class="output_markdown rendered_html output_subarea ">
21912191
<h4 id="catch_isis_error" class="doc_header"><code>catch_isis_error</code><a href="https://github.com/michaelaye/nbplanetary/tree/master/planetarypy/ctx.py#L40" class="source_link" style="float:right">[source]</a></h4><blockquote><p><code>catch_isis_error</code>(<strong><code>func</code></strong>)</p>
21922192
</blockquote>
2193+
<p><strong>Parameters:</strong></p>
2194+
<ul>
2195+
<li><strong><code>func</code></strong> : <em><code>&lt;class 'inspect._empty'&gt;</code></em></li>
2196+
</ul>
21932197

21942198
</div>
21952199

@@ -2221,6 +2225,10 @@ <h4 id="catch_isis_error" class="doc_header"><code>catch_isis_error</code><a hre
22212225
<div class="output_markdown rendered_html output_subarea ">
22222226
<h3 id="CTXEDR" class="doc_header"><code>class</code> <code>CTXEDR</code><a href="https://github.com/michaelaye/nbplanetary/tree/master/planetarypy/ctx.py#L53" class="source_link" style="float:right">[source]</a></h3><blockquote><p><code>CTXEDR</code>(<strong><code>id_</code></strong>)</p>
22232227
</blockquote>
2228+
<p><strong>Parameters:</strong></p>
2229+
<ul>
2230+
<li><strong><code>id_</code></strong> : <em><code>&lt;class 'inspect._empty'&gt;</code></em></li>
2231+
</ul>
22242232

22252233
</div>
22262234

@@ -2586,6 +2594,10 @@ <h3 id="CTXEDR" class="doc_header"><code>class</code> <code>CTXEDR</code><a href
25862594
<div class="output_markdown rendered_html output_subarea ">
25872595
<h4 id="CTXEDR.calib_pipeline" class="doc_header"><code>CTXEDR.calib_pipeline</code><a href="https://github.com/michaelaye/nbplanetary/tree/master/planetarypy/ctx.py#L137" class="source_link" style="float:right">[source]</a></h4><blockquote><p><code>CTXEDR.calib_pipeline</code>(<strong><code>overwrite</code></strong>=<em><code>False</code></em>)</p>
25882596
</blockquote>
2597+
<p><strong>Parameters:</strong></p>
2598+
<ul>
2599+
<li><strong><code>overwrite</code></strong> : <em><code>&lt;class 'bool'&gt;</code></em>, <em>optional</em></li>
2600+
</ul>
25892601

25902602
</div>
25912603

@@ -3161,8 +3173,11 @@ <h4 id="CTXEDR.calib_pipeline" class="doc_header"><code>CTXEDR.calib_pipeline</c
31613173
<div class="output_markdown rendered_html output_subarea ">
31623174
<h3 id="CTXEDRCollection" class="doc_header"><code>class</code> <code>CTXEDRCollection</code><a href="https://github.com/michaelaye/nbplanetary/tree/master/planetarypy/ctx.py#L187" class="source_link" style="float:right">[source]</a></h3><blockquote><p><code>CTXEDRCollection</code>(<strong><code>product_ids</code></strong>)</p>
31633175
</blockquote>
3164-
3165-
<pre><code>Class to deal with a set of CTX products.</code></pre>
3176+
<p>Class to deal with a set of CTX products.</p>
3177+
<p><strong>Parameters:</strong></p>
3178+
<ul>
3179+
<li><strong><code>product_ids</code></strong> : <em><code>&lt;class 'inspect._empty'&gt;</code></em></li>
3180+
</ul>
31663181

31673182
</div>
31683183

docs/hirise.html

+40-35
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@
3434

3535

3636

37-
<div id="5964b5a4-57eb-4696-8fc9-45c2b5ee70f2"></div>
37+
<div id="f37b0e0f-e6a0-42c8-926c-78d055cb8b4c"></div>
3838
<div class="output_subarea output_javascript ">
3939
<script type="text/javascript">
40-
var element = $('#5964b5a4-57eb-4696-8fc9-45c2b5ee70f2');
40+
var element = $('#f37b0e0f-e6a0-42c8-926c-78d055cb8b4c');
4141

4242
(function(root) {
4343
function now() {
@@ -1687,10 +1687,10 @@
16871687

16881688

16891689

1690-
<div id="894070bc-77bc-4b48-836b-9e70e5e2a278"></div>
1690+
<div id="dbe4f3c5-32b8-401b-90cc-198569eefd22"></div>
16911691
<div class="output_subarea output_javascript ">
16921692
<script type="text/javascript">
1693-
var element = $('#894070bc-77bc-4b48-836b-9e70e5e2a278');
1693+
var element = $('#dbe4f3c5-32b8-401b-90cc-198569eefd22');
16941694

16951695
if ((window.PyViz === undefined) || (window.PyViz instanceof HTMLElement)) {
16961696
window.PyViz = {comms: {}, comm_status:{}, kernels:{}, receivers: {}, plot_index: []}
@@ -2000,18 +2000,16 @@
20002000
<div class="output_markdown rendered_html output_subarea ">
20012001
<h2 id="OBSERVATION_ID" class="doc_header"><code>class</code> <code>OBSERVATION_ID</code><a href="https://github.com/michaelaye/nbplanetary/tree/master/planetarypy/hirise.py#L30" class="source_link" style="float:right">[source]</a></h2><blockquote><p><code>OBSERVATION_ID</code>(<strong><code>obsid</code></strong>=<em><code>None</code></em>)</p>
20022002
</blockquote>
2003-
2004-
<pre><code>Manage HiRISE observation ids.
2005-
2006-
For example PSP_003092_0985.
2007-
2008-
`phase` is set to PSP for orbits &lt; 11000, no setting required.
2009-
2010-
Parameters
2011-
----------
2012-
obsid : str, optional
2003+
<p>Manage HiRISE observation ids.</p>
2004+
<p>For example PSP_003092_0985.</p>
2005+
<p><code>phase</code> is set to PSP for orbits &lt; 11000, no setting required.</p>
2006+
<h2 id="Parameters">Parameters<a class="anchor-link" href="#Parameters"> </a></h2><p>obsid : str, optional
20132007
One can optionally also create an 'empty' OBSERVATION_ID object and set the
2014-
properties accordingly to create a new obsid.</code></pre>
2008+
properties accordingly to create a new obsid.</p>
2009+
<p><strong>Parameters:</strong></p>
2010+
<ul>
2011+
<li><strong><code>obsid</code></strong> : <em><code>&lt;class 'NoneType'&gt;</code></em>, <em>optional</em></li>
2012+
</ul>
20152013

20162014
</div>
20172015

@@ -2161,6 +2159,10 @@ <h2 id="OBSERVATION_ID" class="doc_header"><code>class</code> <code>OBSERVATION_
21612159
<div class="output_markdown rendered_html output_subarea ">
21622160
<h4 id="check_url_exists" class="doc_header"><code>check_url_exists</code><a href="https://github.com/michaelaye/nbplanetary/tree/master/planetarypy/hirise.py#L106" class="source_link" style="float:right">[source]</a></h4><blockquote><p><code>check_url_exists</code>(<strong><code>url</code></strong>)</p>
21632161
</blockquote>
2162+
<p><strong>Parameters:</strong></p>
2163+
<ul>
2164+
<li><strong><code>url</code></strong> : <em><code>&lt;class 'inspect._empty'&gt;</code></em></li>
2165+
</ul>
21642166

21652167
</div>
21662168

@@ -2190,23 +2192,19 @@ <h4 id="check_url_exists" class="doc_header"><code>check_url_exists</code><a hre
21902192

21912193

21922194
<div class="output_markdown rendered_html output_subarea ">
2193-
<h2 id="PRODUCT_ID" class="doc_header"><code>class</code> <code>PRODUCT_ID</code><a href="https://github.com/michaelaye/nbplanetary/tree/master/planetarypy/hirise.py#L114" class="source_link" style="float:right">[source]</a></h2><blockquote><p><code>PRODUCT_ID</code>(<strong><code>initstr</code></strong>=<em><code>None</code></em>)</p>
2195+
<h2 id="ProductPathfinder" class="doc_header"><code>class</code> <code>ProductPathfinder</code><a href="https://github.com/michaelaye/nbplanetary/tree/master/planetarypy/hirise.py#L114" class="source_link" style="float:right">[source]</a></h2><blockquote><p><code>ProductPathfinder</code>(<strong><code>initstr</code></strong>=<em><code>None</code></em>)</p>
21942196
</blockquote>
2195-
2196-
<pre><code>Manage storage paths for HiRISE RDR products (also EXTRAS.)
2197-
2198-
Attributes `jp2_path` and `label_path` get you the official RDR product,
2199-
with `kind` steering if you get the COLOR or the RED product.
2200-
All other properties go to the RDR/EXTRAS folder.
2201-
2202-
Parameters
2203-
----------
2204-
initstr : str, optional
2205-
PRODUCT_ID string like PSP_003902_0985_RED
2206-
2207-
Note
2208-
----
2209-
The "PDS" part of the path is handled in the OBSERVATION_ID class.</code></pre>
2197+
<p>Determine paths and URLs for HiRISE RDR products (also EXTRAS.)</p>
2198+
<p>Attributes <code>jp2_path</code> and <code>label_path</code> get you the official RDR mosaic product,
2199+
with <code>kind</code> steering if you get the COLOR or the RED product.
2200+
All other properties go to the RDR/EXTRAS folder.</p>
2201+
<h2 id="Parameters">Parameters<a class="anchor-link" href="#Parameters"> </a></h2><p>initstr : str, optional
2202+
PRODUCT_ID string like PSP_003902_0985_RED</p>
2203+
<h2 id="Note">Note<a class="anchor-link" href="#Note"> </a></h2><p>The "PDS" part of the path is handled in the OBSERVATION_ID class.</p>
2204+
<p><strong>Parameters:</strong></p>
2205+
<ul>
2206+
<li><strong><code>initstr</code></strong> : <em><code>&lt;class 'NoneType'&gt;</code></em>, <em>optional</em></li>
2207+
</ul>
22102208

22112209
</div>
22122210

@@ -2614,8 +2612,12 @@ <h3 id="Paths-and-URLS">Paths and URLS<a class="anchor-link" href="#Paths-and-UR
26142612

26152613

26162614
<div class="output_markdown rendered_html output_subarea ">
2617-
<h2 id="RGB_NOMAP" class="doc_header"><code>class</code> <code>RGB_NOMAP</code><a href="https://github.com/michaelaye/nbplanetary/tree/master/planetarypy/hirise.py#L276" class="source_link" style="float:right">[source]</a></h2><blockquote><p><code>RGB_NOMAP</code>(<strong><code>obsid</code></strong>)</p>
2615+
<h2 id="RGB_NOMAP" class="doc_header"><code>class</code> <code>RGB_NOMAP</code><a href="https://github.com/michaelaye/nbplanetary/tree/master/planetarypy/hirise.py#L278" class="source_link" style="float:right">[source]</a></h2><blockquote><p><code>RGB_NOMAP</code>(<strong><code>obsid</code></strong>)</p>
26182616
</blockquote>
2617+
<p><strong>Parameters:</strong></p>
2618+
<ul>
2619+
<li><strong><code>obsid</code></strong> : <em><code>&lt;class 'inspect._empty'&gt;</code></em></li>
2620+
</ul>
26192621

26202622
</div>
26212623

@@ -4105,10 +4107,13 @@ <h2 id="RGB_NOMAP" class="doc_header"><code>class</code> <code>RGB_NOMAP</code><
41054107

41064108

41074109
<div class="output_markdown rendered_html output_subarea ">
4108-
<h2 id="RGB_NOMAPCollection" class="doc_header"><code>class</code> <code>RGB_NOMAPCollection</code><a href="https://github.com/michaelaye/nbplanetary/tree/master/planetarypy/hirise.py#L348" class="source_link" style="float:right">[source]</a></h2><blockquote><p><code>RGB_NOMAPCollection</code>(<strong><code>obsids</code></strong>)</p>
4110+
<h2 id="RGB_NOMAPCollection" class="doc_header"><code>class</code> <code>RGB_NOMAPCollection</code><a href="https://github.com/michaelaye/nbplanetary/tree/master/planetarypy/hirise.py#L350" class="source_link" style="float:right">[source]</a></h2><blockquote><p><code>RGB_NOMAPCollection</code>(<strong><code>obsids</code></strong>)</p>
41094111
</blockquote>
4110-
4111-
<pre><code>Class to deal with a set of RGB_NOMAP products.</code></pre>
4112+
<p>Class to deal with a set of RGB_NOMAP products.</p>
4113+
<p><strong>Parameters:</strong></p>
4114+
<ul>
4115+
<li><strong><code>obsids</code></strong> : <em><code>&lt;class 'inspect._empty'&gt;</code></em></li>
4116+
</ul>
41124117

41134118
</div>
41144119

notebooks/03_ctx.ipynb

+1-1
Original file line numberDiff line numberDiff line change
@@ -1407,7 +1407,7 @@
14071407
],
14081408
"metadata": {
14091409
"kernelspec": {
1410-
"display_name": "Python [conda env:py38] *",
1410+
"display_name": "Python [conda env:py38]",
14111411
"language": "python",
14121412
"name": "conda-env-py38-py"
14131413
}

notebooks/04_hirise.ipynb

+13-11
Original file line numberDiff line numberDiff line change
@@ -259,10 +259,10 @@
259259
"outputs": [],
260260
"source": [
261261
"# export\n",
262-
"class PRODUCT_ID:\n",
263-
" \"\"\"Manage storage paths for HiRISE RDR products (also EXTRAS.)\n",
262+
"class ProductPathfinder:\n",
263+
" \"\"\"Determine paths and URLs for HiRISE RDR products (also EXTRAS.)\n",
264264
"\n",
265-
" Attributes `jp2_path` and `label_path` get you the official RDR product,\n",
265+
" Attributes `jp2_path` and `label_path` get you the official RDR mosaic product,\n",
266266
" with `kind` steering if you get the COLOR or the RED product.\n",
267267
" All other properties go to the RDR/EXTRAS folder.\n",
268268
"\n",
@@ -348,7 +348,7 @@
348348
" if tokens[-1] == \"url\":\n",
349349
" return self._make_url(\"_\".join(tokens[:-1]))\n",
350350
" except IndexError:\n",
351-
" raise ValueError(f\"No attribute named '{item}' found.\")\n",
351+
" raise AttributeError(f\"No attribute named '{item}' found.\")\n",
352352
"\n",
353353
" @property\n",
354354
" def jp2_fname(self):\n",
@@ -369,36 +369,36 @@
369369
" if self.kind in [\"RED\", \"IRB\", \"RGB\"]:\n",
370370
" return f\"EXTRAS/RDR/{self.storage_stem}.NOMAP.JP2\"\n",
371371
" else:\n",
372-
" raise AttributeError(f\"No NOMAP exists for {self.kind}.\")\n",
372+
" raise ValueError(f\"No NOMAP exists for {self.kind}.\")\n",
373373
"\n",
374374
" @property\n",
375375
" def quicklook_path(self):\n",
376376
" if self.kind in [\"COLOR\", \"RED\"]:\n",
377377
" return Path(\"EXTRAS/RDR/\") / (self.storage_stem + \".QLOOK.JP2\")\n",
378378
" else:\n",
379-
" raise AttributeError(f\"No quicklook exists for {self.kind} products.\")\n",
379+
" raise ValueError(f\"No quicklook exists for {self.kind} products.\")\n",
380380
"\n",
381381
" @property\n",
382382
" def abrowse_path(self):\n",
383383
" if self.kind in [\"COLOR\", \"MIRB\", \"MRGB\", \"RED\"]:\n",
384384
" return Path(\"EXTRAS/RDR/\") / (self.storage_stem + \".abrowse.jpg\")\n",
385385
" else:\n",
386-
" raise AttributeError(f\"No abrowse exists for {self.kind}\")\n",
386+
" raise ValueError(f\"No abrowse exists for {self.kind}\")\n",
387387
"\n",
388388
" @property\n",
389389
" def browse_path(self):\n",
390390
" inset = \"\"\n",
391391
" if self.kind in [\"IRB\", \"RGB\"]:\n",
392392
" inset = \".NOMAP\"\n",
393393
" if self.kind not in [\"COLOR\", \"MIRB\", \"MRGB\", \"RED\", \"IRB\", \"RGB\"]:\n",
394-
" raise AttributeError(f\"No browse exists for {self.kind}\")\n",
394+
" raise ValueError(f\"No browse exists for {self.kind}\")\n",
395395
" else:\n",
396396
" return Path(\"EXTRAS/RDR/\") / (self.storage_stem + inset + \".browse.jpg\")\n",
397397
"\n",
398398
" @property\n",
399399
" def thumbnail_path(self):\n",
400400
" if self.kind in [\"BG\", \"IR\"]:\n",
401-
" raise AttributeError(f\"No thumbnail exists for {self.kind}\")\n",
401+
" raise ValueError(f\"No thumbnail exists for {self.kind}\")\n",
402402
" inset = \"\"\n",
403403
" if self.kind in [\"IRB\", \"RGB\"]:\n",
404404
" inset = \".NOMAP\"\n",
@@ -409,12 +409,14 @@
409409
" if self.kind in [\"RED\", \"IRB\", \"RGB\"]:\n",
410410
" return Path(\"EXTRAS/RDR\") / (self.storage_stem + \".NOMAP.thumb.jpg\")\n",
411411
" else:\n",
412-
" raise AttributeError(f\"No NOMAP thumbnail exists for {self.kind}\")\n",
412+
" raise ValueError(f\"No NOMAP thumbnail exists for {self.kind} images.\")\n",
413413
"\n",
414414
" @property\n",
415415
" def nomap_browse_path(self):\n",
416416
" if self.kind in [\"RED\", \"IRB\", \"RGB\"]:\n",
417417
" return Path(\"EXTRAS/RDR\") / (self.storage_stem + \".NOMAP.browse.jpg\")\n",
418+
" else:\n",
419+
" raise ValueError(f\"No NOMAP browse exists for {self.kind} images.\")\n",
418420
"\n",
419421
" @property\n",
420422
" def edr_storage_stem(self):\n",
@@ -2177,7 +2179,7 @@
21772179
],
21782180
"metadata": {
21792181
"kernelspec": {
2180-
"display_name": "Python [conda env:py38] *",
2182+
"display_name": "Python [conda env:py38]",
21812183
"language": "python",
21822184
"name": "conda-env-py38-py"
21832185
}

0 commit comments

Comments
 (0)