Last active
June 22, 2017 17:42
-
-
Save ryanjdillon/4e04ade04bc9e410d0813de611028676 to your computer and use it in GitHub Desktop.
Seal lipid to body density calculation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def lip2dens(p_lipid, lipid_dens=0.9007, prot_dens=1.34, water_dens=0.994, a_dens=2.3): | |
'''Derive tissue density from lipids | |
Translated to python from R code written by Martin Biuw | |
''' | |
p_comps = perc_bc_from_lipid(p_lipid) | |
p_comps['density'] = (lipid_dens * (0.01 * p_comps['perc_lipid'])) + \ | |
(prot_dens * (0.01 * p_comps['perc_protien'])) + \ | |
(water_dens * (0.01 * p_comps['perc_water'])) + \ | |
(a_dens * (0.01 * p_comps['perc_ash'])) | |
return p_comps |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment