Skip to content

Commit

Permalink
adding NB demo for roman ramps in cubeviz
Browse files Browse the repository at this point in the history
  • Loading branch information
bmorris3 committed Aug 25, 2023
1 parent 6d345ff commit 4a724d1
Showing 1 changed file with 80 additions and 0 deletions.
80 changes: 80 additions & 0 deletions notebooks/concepts/cubeviz-roman-ramp.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
{
"cells": [
{
"cell_type": "markdown",
"id": "b3e22694-d8ee-4c14-8931-8f8db1d7485d",
"metadata": {
"tags": []
},
"source": [
"## PoC: Visualize a Roman L1 ramp file in Cubeviz\n",
"\n",
"First download a synthetic Roman L1 file:"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "e80524dd-bcc5-4312-879a-33780e297006",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"import os\n",
"from urllib.request import urlretrieve\n",
"\n",
"url_L1 = \"https://stsci.box.com/shared/static/24gpvqb9676acdy6hjvymc2llgcny8ul.asdf\"\n",
"local_path = \"L1.asdf\"\n",
"\n",
"if not os.path.exists(local_path):\n",
" urlretrieve(url_L1, local_path)"
]
},
{
"cell_type": "markdown",
"id": "0f94fbf1-6f4c-4118-917d-de824af57fe6",
"metadata": {},
"source": [
"Open the ramp in Cubeviz:"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "863ce611-bf38-4a97-bd1d-c0ff79d36073",
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"from jdaviz import Cubeviz\n",
"\n",
"cubeviz = Cubeviz()\n",
"cubeviz.load_data(local_path, data_label='Roman L1')\n",
"cubeviz.show(height=1000)"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.4"
}
},
"nbformat": 4,
"nbformat_minor": 5
}

0 comments on commit 4a724d1

Please sign in to comment.