# -*- coding: utf-8 -*-
#
# <NAME> <<EMAIL>>
# parasim
# (c) 1998-2021 all rights reserved
#


# wrapper over the input data products that helps with viz
class SLC:


    # public data
    @property
    def range(self):
        """
        Return the range of values in the data product
        """
        # get the cached values
        range = self._range
        # if they are good
        if range is not None:
            # use them
            return range
        # otherwise, compute
        range = self._slc.raster.range
        # save
        self._range = range
        # and return
        return range


    @property
    def raster(self):
        """
        Access the SLC raster
        """
        # easy enough
        return self._slc.raster


    # metamethods
    def __init__(self, slc, **kwds):
        # chain up
        super().__init__(**kwds)
        # save the product
        self._slc = slc.open(mode="r")
        # all done
        return


    # data
    _slc = None
    _range = None


# end of file

# -*- coding: utf-8 -*-
#
# <NAME> <<EMAIL>>
# parasim
# (c) 1998-2021 all rights reserved
#


# wrapper over the input data products that helps with viz
class SLC:


    # public data
    @property
    def range(self):
        """
        Return the range of values in the data product
        """
        # get the cached values
        range = self._range
        # if they are good
        if range is not None:
            # use them
            return range
        # otherwise, compute
        range = self._slc.raster.range
        # save
        self._range = range
        # and return
        return range


    @property
    def raster(self):
        """
        Access the SLC raster
        """
        # easy enough
        return self._slc.raster


    # metamethods
    def __init__(self, slc, **kwds):
        # chain up
        super().__init__(**kwds)
        # save the product
        self._slc = slc.open(mode="r")
        # all done
        return


    # data
    _slc = None
    _range = None


# end of file

# -*- coding: utf-8 -*- # # <NAME> <<EMAIL>> # parasim # (c) 1998-2021 all rights reserved # # wrapper over the input data products that helps with viz # public data Return the range of values in the data product # get the cached values # if they are good # use them # otherwise, compute # save # and return Access the SLC raster # easy enough # metamethods # chain up # save the product # all done # data # end of file