added volumeFraction calculation

This commit is contained in:
marco cammarata 2017-03-11 11:28:38 +01:00
parent 9eb8484331
commit fdd45061eb
1 changed files with 8 additions and 0 deletions

View File

@ -134,6 +134,14 @@ def plotdata(*args,x=None,plot=True,showTrend=True,title=None,clim='auto',fig=No
if (plot or showTrend) and title is not None:
plt.title(title)
def volumeFraction(concentration=1,molWeight=17,density=1.347):
""" molWeight is kDa
concentration in mM
density g/ml
"""
concentration_mg_ml = concentration*molWeight
volume_fraction = concentration_mg_ml/density/1e3
return volume_fraction
def plotdiffs(*args,select=None,err=None,absSignal=None,absSignalScale=10,
showErr=False,cmap=plt.cm.jet,fig=None,title=None):