czbiohub-sf / shrimPy

shrimPy: Smart High-throughput Robust Imaging & Measurement in Python
BSD 3-Clause "New" or "Revised" License
8 stars 1 forks source link

Estimate bleaching/experimental lifetimes #37

Closed talonchandler closed 1 year ago

talonchandler commented 1 year ago

This PR adds a new mantis estimate-bleaching CLI tool. #35 should merge before this.

If you call mantis estimate-bleaching <path-to-ndtiff-dataset> (with optional -o <output-folder>), this tool will generate a folder of plots, one plot for each position, that look like this:

(Generated from the 2023_04_28_PCNA_HEK dataset, position 0)

000

The curve fits are of the form a*exp(-t/b) + c where b is the value I report in the legend. This parameter estimates the time until 37% = $1/e$ of the fluorescence signal remains.

It's tempting to call this estimate the "bleaching liftetime", but there are many other contributing factors other than bleaching. For example, defocus of the lightsheet (a known issue), will be an additional source of decay of the signals plotted and fitted here.

I think these plots serve as a good diagnostic tool for issues in the mantis experiments. For example, take a look at this plot from 2023_04_20 HEK RAC1 PCNA where there are some oscillations in the mean signal intensity (not shown...other positions where these oscillations are consistent): 001

It's also nice to have these "experimental lifetime" numbers as benchmarks. Across the last few weeks of the experiments, I'm seeing fairly consistent 1-2 hour lifetimes.