- This topic has 3 replies, 2 voices, and was last updated 2 years, 4 months ago by harrison.
-
AuthorPosts
-
July 26, 2022 at 4:09 pm #1541sefremParticipant
Hi there,
I was wondering if you could explain how the growth rate value is calculated from OD with dithering?
I did an experiment with b. subtilis where I held OD at various setpoints with dithering on. For some reason, the growth rate graph didn’t have a lot going on.
See full graph here and zoomed in part here where the dithering seemed to work well.
The growth rate value seems to rise as dithering continues despite the slope of the “zig” segments looking relatively constant.
Thank you!
July 26, 2022 at 4:17 pm #1542harrisonKeymasterHello,
The growth rate data is “smoothed” compared to the raw derivative of the OD. This smoothing filter would therefore introduce a lag into the data i.e. it takes some time from an actual growth rate change until the estimated growth rate converges on the true value. This is done to make it as robust as possible in as many scenarios as possible (i.e it minimises the impact of noise), but as you observe, it takes a little bit of time to converge in your case. You could decrease the width of this filter which would mean your data would be noisier, but respond faster to changing growth rates. Probably the easiest way is for you to try some post-processing (i.e. process the OD data yourself in Excel/R/Matlab/Python) and decide on a filter width that looks good for your system, and then edit the Chi.Bio code to reflect this.July 26, 2022 at 7:35 pm #1543sefremParticipantAh okay, so is the growth rate graph just the derivative of the OD graph with smoothing? And where can I find this filter value?
July 27, 2022 at 8:29 am #1544harrisonKeymasterYep, almost. It is in the ZigZag function of the code. In particular around line 2013 of the current version there is this code:
if (iteration>6 and TimeSinceSwitch>5 and current > 0 and last > 0): #The reason we wait a few minutes after starting growth is that new media may still be introduced, it takes a while for the growth to get going.
dGrowthRate=(math.log(current)-math.log(last))*60.0 #Converting to units of 1/hour
sysData[M][‘GrowthRate’][‘current’]=sysData[M][‘GrowthRate’][‘current’]*0.95 + dGrowthRate*0.05 #We are essentially implementing an online growth rate estimator with learning rate 0.05return
So you can see it does a difference in the (log) OD and then converts this to units of hours. It then has a moving average filter with ~0.05 learning rate. If you wish it to respond more quickly you could for example change the 0.95 to 0.8 and the 0.05 to 0.2 (make sure they add to 1). Hope this helps!
-
AuthorPosts
- You must be logged in to reply to this topic.