Skip to content

Commit

Permalink
review changes
Browse files Browse the repository at this point in the history
changed label

import fix

test fixes
  • Loading branch information
antonhibl committed Aug 24, 2023
1 parent 2fc820b commit 4662ce6
Show file tree
Hide file tree
Showing 22 changed files with 2,167 additions and 590 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from ale import util


class UvvisIsisLabelNaifSpiceDriver(Framer, IsisLabel, NaifSpice, NoDistortion, Driver):
class ClementineUvvisIsisLabelNaifSpiceDriver(Framer, IsisLabel, NaifSpice, NoDistortion, Driver):
"""
Driver for reading Ultra-violet Invisible Spectrum ISIS3 Labels
"""
Expand Down
117 changes: 117 additions & 0 deletions notebooks/write_UvvisIsisLabelNaifSpiceDriver.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"id": "318dcdae",
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "accb1a2f",
"metadata": {},
"outputs": [],
"source": [
"import os\n",
"import spiceypy as spice\n",
"import json\n",
"import numpy as np\n",
"import pvl\n",
"\n",
"import ale\n",
"from ale.base import Driver\n",
"from ale.base.label_isis import IsisLabel\n",
"from ale.base.data_naif import NaifSpice\n",
"from ale.base.type_distortion import RadialDistortion, NoDistortion\n",
"from ale.base.type_sensor import Framer, LineScanner\n",
"from ale.drivers.clementine_drivers import ClementineUvvisIsisLabelNaifSpiceDriver\n",
"from ale.util import generate_kernels_from_cube\n",
"from ale.base.type_sensor import Framer\n",
"from ale.base.type_distortion import NoDistortion\n",
"\n",
"from ale import util\n",
"from ale.util import generate_kernels_from_cube\n",
"from ale.formatters.formatter import to_isd"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "0d88ed00",
"metadata": {},
"outputs": [],
"source": [
"os.environ[\"ISISDATA\"] = \"\"\n",
"os.environ[\"ISISTESTDATA\"] = \"\"\n",
"os.environ[\"ISISROOT\"] = \"\""
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "4e3f8e49",
"metadata": {},
"outputs": [],
"source": [
"!spiceinit from=LUA3107H.161.clem.cub"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "94fe9e7b",
"metadata": {},
"outputs": [],
"source": [
"import pprint\n",
"\n",
"ale_file = \"LUA3107H.161.clem.cub\"\n",
"\n",
"with ClementineUvvisIsisLabelNaifSpiceDriver(ale_file, props = {\"kernels\" : kernels}) as driver: \n",
" ale_isd = to_isd(driver)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "aa530588",
"metadata": {},
"outputs": [],
"source": [
"pprint.pprint(ale_isd)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "f53f8dce-c5a4-49fa-baf3-0fe472f46bdc",
"metadata": {},
"outputs": [],
"source": []
}
],
"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.9.16"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
9 changes: 9 additions & 0 deletions tests/pytests/data/LUA3107H.161/LUA3107H.161.clem_0.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
LEAPSECONDS_KERNEL = /Users/ahibl/astro_efs/base/kernels/lsk/naif0012.tls
SPK_KERNEL = uvvis/LUA3107H.161.clem_0.bsp
BODIES = 0, 3, 10, 301, -40
BEGIN_TIME = 1994 MAR 25 15:03:56.564
END_TIME = 1994 MAR 25 15:07:57.205
SOURCE_SPK_KERNEL = /Users/ahibl/astro_efs/base/kernels/spk/de430.bsp
INCLUDE_COMMENTS = no
SOURCE_SPK_KERNEL = /Users/ahibl/astro_efs/Clementine1/kernels/spk/SPKMERGE_940219_940504_CLEMV001b.bsp
INCLUDE_COMMENTS = no
Loading

0 comments on commit 4662ce6

Please sign in to comment.