From fdd45061ebc328d2a6353c2ff3db1d8c51024b4d Mon Sep 17 00:00:00 2001 From: marco cammarata Date: Sat, 11 Mar 2017 11:28:38 +0100 Subject: [PATCH] added volumeFraction calculation --- xray/utils.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/xray/utils.py b/xray/utils.py index 24d6b72..066435b 100644 --- a/xray/utils.py +++ b/xray/utils.py @@ -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):