Ejemplo n.º 1
0
 def __init__( self, opspecs: Dict, **kwargs ):
     self._opspecs = { key.lower(): value for key,value in opspecs.items() }
     ConfigurableObject.__init__( self, **kwargs )
     self.water_maps: xr.DataArray = None
     self.water_probability: xr.DataArray = None
     self.persistent_classes: xr.DataArray = None
     self.yearly_lake_masks: xr.DataArray = None
     self.roi_bounds: gpd.GeoSeries = None
     self.mask_value = 5
Ejemplo n.º 2
0
 def __init__(self, data_dir: str, **kwargs):
     ConfigurableObject.__init__(self, **kwargs)
     self.data_dir = data_dir
Ejemplo n.º 3
0
 def __init__(self, **kwargs):
     ConfigurableObject.__init__(self, **kwargs)
Ejemplo n.º 4
0
 def __init__(self, **kwargs):
     ConfigurableObject.__init__(self, **kwargs)
     colors = self.getParameter("colors", [(0, 0, 0), (0.5, 1, 0.25),
                                           (1, 1, 0), (0, 0, 1)])
     self.setColormap(colors)
Ejemplo n.º 5
0
 def preprocess_input(cls, dataArray: xa.DataArray ) -> xa.DataArray:
     if dataArray.ndim == 3: return dataArray
     if 'time' not in dataArray.dims:
         return BaseOp.time_merge([dataArray])
     else:
         raise Exception( f"This plotter only works with 3 dimensional [t,y,x] data arrays.  Found {dataArray.dims}" )