mwavepy.mathFunctions
index
/home/alex/docs/python/path/mwavepy/mathFunctions.py

#       mathFunctions.py
#       
#       
#       Copyright 2010 alex arsenovic <arsenovic@virginia.edu>
#       Copyright 2010 lihan chen 
#
#       This program is free software; you can redistribute it and/or modify
#       it under the terms of the GNU General Public License as published by
#       the Free Software Foundation; either version 2 of the License, or
#       (at your option) any later versionpy.
#       
#       This program is distributed in the hope that it will be useful,
#       but WITHOUT ANY WARRANTY; without even the implied warranty of
#       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#       GNU General Public License for more details.
#       
#       You should have received a copy of the GNU General Public License
#       along with this program; if not, write to the Free Software
#       Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
#       MA 02110-1301, USA.

 
Modules
       
numpy

 
Functions
       
complex2MagPhase(complx, deg=False)
complex2ReIm(complx)
complex2Scalar(input)
# old functions just for reference
complex2dB(complx)
complex_2_db(input)
returns the magnitude in dB of a complex number. 
 
returns:
        20*log10(|z|)
where z is a complex number
complex_2_degree(input)
returns the angle complex number in radians.
complex_2_magnitude(input)
returns the magnitude of a complex number.
complex_2_radian(input)
returns the angle complex number in radians.
db_2_magnitude(input)
converts db to normal magnitude
 
returns:
        10**((z)/20.)
where z is a complex number
db_2_np(x)
converts a value in nepers to dB
degree_2rad_(deg)
dirac_delta(x)
the dirac function.
 
can take numpy arrays or numbers
returns 1 or 0
magnitude_2_db(input)
converts magnitude to db 
 
 db is given by 
        20*log10(|z|)
where z is a complex number
neuman(x)
neumans number
 
2-dirac_delta(x)
np_2_db(x)
converts a value in dB to neper's
null(A, eps=1.0000000000000001e-15)
 calculates the null space of matrix A.
i found this on stack overflow.
radian_2_degree(rad)
scalar2Complex(input)

 
Data
        pi = 3.1415926535897931