00001 """
00002 class representing sfsrmig
00003 """
00004 from slimpy_base.Core.User.linop.rclinOp import linearop_r as LinearOperatorStruct
00005 from slimpy_base.api.Plugins.slim2rsf.sfCommandFactory import rsfCommandFactory
00006 from slimpy_base.api.Plugins.slim2rsf.sfcommands.sfConverter import sfConverter
00007 from slimpy_base.Core.Interface.node import Source
00008 from slimpy_base.Core.Interface.PSpace import voidSpace
00009 from slimpy_base.Core.Interface.node import Target
00010 from slimpy_base.Core.User.Structures.serial_vector import Vector
00011
00012
00013 class Mig( LinearOperatorStruct ):
00014
00015 name = "srmig3"
00016
00017
00018
00019 cig = None
00020
00021 def __init__(self, domain, **kparams ):
00022
00023
00024 cig_space = domain.copy()
00025 self.cig = Vector( cig_space.makeContaner( self.name ) )
00026
00027 kparams['cig'] = Target(self.cig.container)
00028
00029 kparams['slo'] = Source( kparams['slo'].container )
00030 kparams['rwf'] = Source( kparams['rwf'].container )
00031
00032
00033 LinearOperatorStruct.__init__( self, domain, **kparams )
00034
00035
00036 def create_cig_targets(self):
00037 pass
00038
00039
00040
00041
00042
00043
00044 class mig_converter( sfConverter ):
00045
00046
00047 @classmethod
00048 def map( cls, source, command ):
00049
00050 """
00051 """
00052
00053 command = cls.default_function( command, "srmig3" )
00054
00055 command = cls.truefalseHelper( command )
00056
00057
00058
00059 return cls.pack( command )
00060
00061 @classmethod
00062 def trans( cls, command, space, *spaces ):
00063 return space
00064
00065 @classmethod
00066 def trans_adj( cls, command, space, *spaces ):
00067 return space
00068
00069 @classmethod
00070 def constr( cls, command, space ):
00071 pass
00072 @classmethod
00073 def constr_adj( cls, command, space ):
00074 pass
00075
00076
00077
00078
00079
00080 factory = rsfCommandFactory()
00081 factory['srmig3'] = mig_converter
00082