Example #1
0
 def checker(self,
             path,
             labels=None,
             interpolation='none',
             colorMap='Accent',
             suffix=None):
     check = util.InputValidation(class_name)
     check.dispatch(check.labels_type, method.__name__, labels)
     check.dispatch(check.suffix_type, method.__name__, suffix)
     method(self,
            path,
            labels=labels,
            interpolation=interpolation,
            colorMap=colorMap,
            suffix=suffix)
 def checker(self, M, q, numSkewers=10000, normalize=False, mask=None):
     check = util.InputValidation(class_name)
     check.dispatch(check.cube_type, method.__name__, M, 'M')
     check.dispatch(check.int_type, method.__name__, q, 'q')
     check.dispatch(check.int_type, method.__name__, numSkewers,
                    'numSkewers')
     check.dispatch(check.bool_type, method.__name__, normalize,
                    'normalize')
     check.dispatch(check.mask_type, method.__name__, mask)
     return method(self,
                   M,
                   q,
                   numSkewers=numSkewers,
                   normalize=normalize,
                   mask=mask)
Example #3
0
 def checker(self,
             mask=None,
             interpolation='none',
             colorMap='jet',
             columns=None,
             suffix=None):
     check = util.InputValidation(class_name)
     check.dispatch(check.mask_type, method.__name__, mask)
     check.dispatch(check.columns_type, method.__name__, columns,
                    'columns')
     check.dispatch(check.suffix_type, method.__name__, suffix)
     method(self,
            mask=mask,
            interpolation=interpolation,
            colorMap=colorMap,
            columns=columns,
            suffix=suffix)
Example #4
0
 def checker(self,
             lib_idx,
             constrained=True,
             stretch=False,
             colorMap='spectral',
             suffix=None):
     check = util.InputValidation(class_name)
     check.dispatch(check.cmap_exist, method.__name__, self.cmap,
                    call_before)
     check.dispatch(check.index_range, method.__name__, lib_idx,
                    self.n_classes)
     check.dispatch(check.bool_type, method.__name__, constrained,
                    'constrained')
     check.dispatch(check.bool_type, method.__name__, stretch,
                    'stretch')
     check.dispatch(check.suffix_type, method.__name__, suffix)
     method(self,
            lib_idx,
            constrained=constrained,
            stretch=stretch,
            colorMap=colorMap,
            suffix=suffix)
Example #5
0
 def checker(self, whiteOnBlack=True, suffix=None):
     check = util.InputValidation(class_name)
     check.dispatch(check.bool_type, method.__name__, whiteOnBlack, 'whiteOnBlack')
     check.dispatch(check.suffix_type, method.__name__, suffix)
     method(self, whiteOnBlack=whiteOnBlack, suffix=suffix)
Example #6
0
 def checker(self, M, t, threshold=None):
     check = util.InputValidation(class_name)
     check.dispatch(check.cube_type, method.__name__, M, 'M')
     check.dispatch(check.spectrum_type, method.__name__, t, 't')
     check.dispatch(check.threshold_type2, method.__name__, threshold)
     return method(self, M, t, threshold=threshold)
Example #7
0
 def checker(self, X):
     check = util.InputValidation(class_name)
     check.dispatch(check.cube_type, method.__name__, X, 'X')
     return method(self, X)
Example #8
0
 def checker(self, path, plot_name, feature='all'):
     check = util.InputValidation(class_name)
     check.dispatch(check.string_type, method.__name__, plot_name, 'plot_name')
     check.dispatch(check.index_range, method.__name__, feature, len(self.features))
     method(self, path, plot_name, feature=feature)
Example #9
0
 def checker(self, plot_name, suffix=None):
     check = util.InputValidation(class_name)
     check.dispatch(check.string_type, method.__name__, plot_name, 'plot_name')
     check.dispatch(check.suffix_type, method.__name__, suffix)
     method(self, plot_name, suffix=suffix)
Example #10
0
 def checker(self, spectrum, wvl, normalize=False):
     check = util.InputValidation(class_name)
     check.dispatch(check.list_type, method.__name__, spectrum, 'spectrum')
     check.dispatch(check.list_type, method.__name__, wvl, 'wvl')
     check.dispatch(check.bool_type, method.__name__, normalize, 'normalize')
     return method(self, spectrum, wvl, normalize=normalize)
Example #11
0
 def checker(self, lib_idx, constrained=True):
     check = util.InputValidation(class_name)
     check.dispatch(check.index_range, method.__name__, lib_idx, self.n_classes)
     check.dispatch(check.bool_type, method.__name__, constrained, 'constrained')
     return method(self, lib_idx, constrained=constrained)
Example #12
0
 def checker(self):
     check = util.InputValidation(class_name)
     check.dispatch(check.cmap_exist, method.__name__, self.cmap, call_before)
     return method(self)
Example #13
0
 def checker(self, M, threshold=0.1):
     check = util.InputValidation(class_name)
     check.dispatch(check.cube_type, method.__name__, M, 'M')
     check.dispatch(check.threshold_type3, method.__name__, M, threshold)
     return method(self, M, threshold=threshold)
 def checker(self, axes=None, suffix=None):
     check = util.InputValidation(class_name)
     check.dispatch(check.axes_type, method.__name__, axes)
     check.dispatch(check.suffix_type, method.__name__, suffix)
     method(self, axes=axes, suffix=suffix)