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):