00001 ##@package new_noise_slimpy 00002 # This is a very straight forward linear operator which adds Gaussian noise to an image. 00003 # noiseX is a subclass of LinearOperatorStruct. 00004 # @code 00005 # from slimpy_base.Core.User.linop.rclinOp import linearop_r as LinearOperatorStruct 00006 # 00007 # #=============================================================================== 00008 # # Linear operator class itself 00009 # #=============================================================================== 00010 # class noiseX( LinearOperatorStruct ): 00011 # \""" 00012 # Adds Gaussian Noise to image 00013 # Note how noiseX inherits all of its linear operator functionality 00014 # from LinearOperatorStruct. after the initialization is done of 00015 # noiseX SLIMpy will do the rest of the work. 00016 # \""" 00017 # name = "noise" 00018 # 00019 # def __init__( self, domain): 00020 # 00021 # kparams = dict( adj=False ) 00022 # 00023 # LinearOperatorStruct.__init__( self, domain, **kparams ) 00024 # @endcode 00025 00026 from slimpy_base.Core.User.linop.rclinOp import linearop_r as LinearOperatorStruct 00027 00028 #=============================================================================== 00029 # Linear operator class itself 00030 #=============================================================================== 00031 class noiseX( LinearOperatorStruct ): 00032 """ 00033 Adds Gaussian Noise to image 00034 Note how noiseX inherits all of its linear operator functionality 00035 from LinearOperatorStruct. after the initialization is done of 00036 noiseX SLIMpy will do the rest of the work. 00037 """ 00038 name = "noise" 00039 00040 def __init__( self, domain, sigma = 0.08): 00041 00042 kparams = dict( sigma = 0.08, adj=False ) 00043 00044 LinearOperatorStruct.__init__( self, domain, **kparams )