00001 """
00002 contains the curvelet transforms in 2d and 3d.
00003 """
00004
00005 __copyright__ = """
00006 Copyright 2008 Sean Ross-Ross
00007 """
00008 __license__ = """
00009 This file is part of SLIMpy .
00010
00011 SLIMpy is free software: you can redistribute it and/or modify
00012 it under the terms of the GNU Lesser General Public License as published by
00013 the Free Software Foundation, either version 3 of the License, or
00014 (at your option) any later version.
00015
00016 SLIMpy is distributed in the hope that it will be useful,
00017 but WITHOUT ANY WARRANTY; without even the implied warranty of
00018 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00019 GNU Lesser General Public License for more details.
00020
00021 You should have received a copy of the GNU Lesser General Public License
00022 along with SLIMpy . If not, see <http://www.gnu.org/licenses/>.
00023 """
00024
00025
00026 from slimpy_base.Core.User.linop.rclinOp import linearop_r as LinearOperatorStruct
00027
00028 from slimpy_base.api.functions.functions import clnorm
00029
00030 import warnings
00031
00032
00033
00034
00035
00036
00037 class fdct3( LinearOperatorStruct ):
00038 """
00039 The fast discrete curvelet transform in three dimensions.
00040 """
00041 name = "fdct3"
00042 __block_diagonal__ = True
00043 def __init__( self, inSpace, nbs, nbd, ac, cpxIn=False, adj=False ):
00044
00045 LinearOperatorStruct.__init__( self, inSpace, nbs=nbs, nbd=nbd, ac=ac, adj=adj, cpxIn = cpxIn )
00046
00047 def applyop( self, other ):
00048 """
00049 overload the applyop to take into account the sizes file.
00050 sets a breakpoint in the graph to build the data at
00051 this point.
00052 """
00053 new = LinearOperatorStruct.applyop( self, other )
00054 new.addBreakPoint( )
00055 return new
00056
00057
00058
00059
00060 class fdct2( LinearOperatorStruct ):
00061 """
00062 The fast discrete curvelet transform in two dimensions.
00063 """
00064 name = 'fdct2'
00065 __block_diagonal__ = True
00066 def __init__( self, inSpace, nbs, nba, ac, cpxIn=False, adj=False ):
00067 LinearOperatorStruct.__init__( self, inSpace, nba=nba, nbs=nbs, ac=ac, adj=adj, cpxIn = cpxIn)
00068
00069
00070
00071 def norm( self ):
00072 """
00073 depricated function
00074 overload our norm operator to use the sffdct2vects rsf function.
00075 """
00076 warnings.warn("please use SLIMpy.Norm function", DeprecationWarning , 2)
00077 return self.__norm_col__( )
00078
00079 def __norm_col__(self):
00080 """
00081 A.__norm_col__() <-> Norm( A )
00082 """
00083
00084 return clnorm( self )
00085
00086 def __min_vel_const__(self, ang_weights ):
00087 """
00088 A.__min_vel_const__(ang_weights) <-> MinVelConst( A )
00089 """
00090
00091 return clnorm( self, mode='zang', angconstr=ang_weights )
00092
00093
00094
00095 class fdct( LinearOperatorStruct ):
00096 """
00097 The fast discrete curvelet transform in-core with PYCT (sffdct)
00098 """
00099 name = 'fdct'
00100 def __init__( self, inSpace, curveSpace=None, nbs=4, nba=8, ac=1, adj=False ):
00101 LinearOperatorStruct.__init__( self, inSpace, curveSpace=curveSpace, nbs=nbs, nba=nba, ac=ac, adj=adj)
00102
00103