PyPedal::pyp_demog Namespace Reference


Functions

def set_base_year
def set_age_units
def age_distribution
def sex_ratio
def founders_by_year


Function Documentation

def PyPedal::pyp_demog::age_distribution (   pedobj,
  sex = 1 
)

age_distribution() computes histograms of the age distribution of males and females in the population. You can also stratify by sex to get individual histograms.

Parameters:
myped An instance of a PyPedal NewPedigree object.
sex A flag which determines whether or not to stratify by sex.
age_distribution() computes histograms of the age distribution of
males and females in the population.  You can also stratify by
sex to get individual histograms.

Definition at line 66 of file pyp_demog.py.

def PyPedal::pyp_demog::founders_by_year (   pedobj  ) 

founders_by_year() returns a dictionary containing the number of founders in each birthyear.

Parameters:
pedobj A PyPedal pedigree object.
Returns:
dict A dictionary containing entries for each sex/gender code defined in the global SEX_CODE_MAP. dictionary
founders_by_year() returns a dictionary containing the number of founders in each
birthyear.

Definition at line 199 of file pyp_demog.py.

def PyPedal::pyp_demog::set_age_units (   units = 'year'  ) 

set_age_units() defines a global variable, BASE_DEMOGRAPHIC_UNIT.

Parameters:
units The base unit for age computations ('year'|'month'|'day').
Returns:
None None
set_age_units() defines a global variable, BASE_DEMOGRAPHIC_UNIT.

Definition at line 49 of file pyp_demog.py.

def PyPedal::pyp_demog::set_base_year (   year = 1900  ) 

set_base_year() defines a global variable, BASE_DEMOGRAPHIC_YEAR.

Parameters:
year The year to be used as a base for computing ages.
Returns:
None None
set_base_year() defines a global variable, BASE_DEMOGRAPHIC_YEAR.

Definition at line 37 of file pyp_demog.py.

def PyPedal::pyp_demog::sex_ratio (   pedobj  ) 

sex_ratio() returns a dictionary containing the proportion of males and females in the population.

Parameters:
myped An instance of a PyPedal NewPedigree object.
Returns:
dict A dictionary containing entries for each sex/gender code defined in the global SEX_CODE_MAP. dictionary
sex_ratio() returns a dictionary containing the proportion of males and females in
the population.

Definition at line 161 of file pyp_demog.py.


Generated on Fri Mar 28 14:34:59 2008 for PyPedal by  doxygen 1.5.3