Commit dec42126 authored by Jay's avatar Jay
Browse files

Merge branch '584' into rq

parents a3848581 96e9c423
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -45,6 +45,7 @@ release.
### Fixed
- `update_from_jigsaw` failures due to stale code. Now uses a conntext on the engine to ensure closure
- Fixes errors where reference measure index was being incorrectly tracked when placing measures would fail [#606](https://github.com/USGS-Astrogeology/autocnet/issues/606)
-  Fixed #584 where importing autocnet fails on kalasiris imports by wrapping the import in a try accept.

## [0.6.0]

+8 −4
Original line number Diff line number Diff line
@@ -15,10 +15,14 @@ from collections import abc
from numbers import Number

import numpy as np

try:
    import kalasiris as isis
import pvl
except Exception as exception:
    from autocnet.utils.utils import FailedImport
    isis = FailedImport(exception)

import kalasiris as kal
import pvl

isis2np_types = {
        "UnsignedByte" : "uint8",
@@ -48,7 +52,7 @@ def get_isis_special_pixels(arr):

    """
    isis_dtype = np2isis_types[str(arr.dtype)]
    sp_pixels = getattr(kal.specialpixels, isis_dtype)
    sp_pixels = getattr(isis.specialpixels, isis_dtype)

    null = np.argwhere(arr==sp_pixels.Null)
    lrs = np.argwhere(arr==sp_pixels.Lrs)
+6 −1
Original line number Diff line number Diff line
@@ -15,7 +15,12 @@ from pathlib import Path
import numpy as np
import numpy.testing as npt


try:
    import kalasiris as isis
except Exception as exception:
    from autocnet.utils.utils import FailedImport
    isis = FailedImport(exception)

from autocnet.spatial import isis as si

+7 −0
Original line number Diff line number Diff line
@@ -20,6 +20,13 @@ from shapely import geometry
from shapely.geometry import MultiPoint
from shapely.ops import cascaded_union, polygonize


class FailedImport():
    def __init__(self, exception):
        self.exception = exception
    def __getattr__(self, name: str):
        raise self.exception

def tile(array_size, tilesize=1000, overlap=500):
    stepsize = tilesize - overlap
    if stepsize < 0:
+5 −1
Original line number Diff line number Diff line
@@ -25,7 +25,11 @@ import numpy as np

from affine import Affine

try:
    import kalasiris as isis
except:
    from autocnet.utils.utils import FailedImport
    isis = FailedImport()

import warnings
warnings.simplefilter("ignore")