Skip to content
Snippets Groups Projects
Commit 67800a12 authored by Kaitlyn Lee's avatar Kaitlyn Lee Committed by Jesse Mapel
Browse files

Updated lro notebook and fixed campt call.

parent 5a3cf71f
No related branches found
No related tags found
No related merge requests found
Source diff could not be displayed: it is too large. Options to address this: view the blob.
......@@ -112,13 +112,16 @@ def point_info(cube_path, x, y, point_type, allow_outside=False):
f.write("\n".join(["{}, {}".format(xval,yval) for xval,yval in zip(x, y)]))
f.flush()
with tempfile.NamedTemporaryFile("r+") as campt_output:
try:
pvlres = isis.campt(from_=cube_path, coordlist=f.name, allowoutside=allow_outside, usecoordlist=True, coordtype=point_type)
isis.campt(from_=cube_path, coordlist=f.name, allowoutside=allow_outside, usecoordlist=True, coordtype=point_type, to=campt_output.name)
except ProcessError as e:
warn(f"CAMPT call failed, image: {cube_path}\n{e.stderr}")
return
pvlres = pvl.loads(pvlres)
pvlres = pvl.load(campt_output.name)
if len(x) > 1 and len(y) > 1:
for r in pvlres:
# convert all pixels to PLIO pixels from ISIS
......@@ -127,7 +130,6 @@ def point_info(cube_path, x, y, point_type, allow_outside=False):
else:
pvlres["GroundPoint"]["Sample"] -= .5
pvlres["GroundPoint"]["Line"] -= .5
return pvlres
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment