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
Loading
Loading
Loading
Loading
+1 −1

File changed.

Preview size limit exceeded, changes collapsed.

+9 −7
Original line number Diff line number Diff line
@@ -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