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

#       frequency.py
#       
#       Copyright 2010 alex arsenovic <arsenovic@virginia.edu>
#       
#       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.

 
Classes
       
__builtin__.object
Frequency

 
class Frequency(__builtin__.object)
    represents a frequency band. 
 
attributes:
        start: starting frequency  (in Hz)
        stop: stoping frequency  (in Hz)
        npoints: number of points, an int
        unit: unit which to scale a formated axis, when accesssed. see
                formattedAxis
        
frequently many calcluations are made in a given band , so this class 
is used in other classes so user doesnt have to continually supply 
frequency info.
 
  Methods defined here:
__init__(self, start, stop, npoints, unit='hz')
takes:
        start: start of band.  units of unit, defaults is  Hz
        stop: end of band. units of unit, defaults is  Hz
        npoints: number of points in the band. 
        unit: unit you want the band in for plots. a string. can be:
                'hz', 'mhz','ghz', 
 
example:
        wr1p5band = frequencyBand(500,750,401, 'ghz')
        
note: unit sets the property freqMultiplier, which is used 
to scale the frequncy when formatedAxis is referenced.
labelXAxis(self, ax=None)

Data descriptors defined here:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)
center
f
returns a frequency vector  in Hz
f_scaled
returns a frequency vector in units of self.unit
multiplier
multiplier for formating axis
unit
The unit to format the frequency axis in. see formatedAxis

Data and other attributes defined here:
__slotnames__ = []
multiplier_dict = {'ghz': 1000000000.0, 'hz': 1, 'mhz': 1000000.0}
unit_dict = {'ghz': 'GHz', 'hz': 'Hz', 'mhz': 'MHz'}

 
Functions
       
f_2_frequency(f)
convienience function
converts a frequency vector to a Frequency object