-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rl/process dic timelapses #19
Conversation
- add dask-compatible function for Li thresholding - change default number of central frames to extract during processing
This is a sort of crude and minimal implementation for processing DIC time lapses of agar microchambers such that it could be used to (quickly) process old in-house datasets.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few minor comments and caught what I think might be some bugs/typos.
After seeing how many issues/quirks you found in Code to generate above plotfrom pathlib import Path
import skimage as ski
import numpy as np
import matplotlib.pyplot as plt
from mpl_interactions import hyperslicer
from chlamytracker.timelapse import Timelapse
from chlamytracker.pool_finder import PoolFinder
nd2_file = Path(
"/Users/ryanlane/Projects/2024-unicellular-tracking/pub_videos/pools_data/s1-cr3-t-timelapse_#6.nd2"
)
poolfinder = PoolFinder(nd2_file)
pools = poolfinder.extract_pools()
%matplotlib ipympl
ncols, nrows = max(pools)
fig, axes = plt.subplots(
nrows=nrows + 1,
ncols=ncols + 1,
figsize=(2.5 * ncols, 2.5 * nrows),
)
for (ix, iy), pool in pools.items():
has_cells = pool.has_cells()
if ix == iy == 0:
slider = hyperslicer(
pool.raw_data,
vmin=14786,
vmax=35060,
cmap="Greys_r",
display_controls=True,
ax=axes[iy, ix],
)
else:
slider = hyperslicer(
pool.raw_data,
vmin=14786,
vmax=35060,
cmap="Greys_r",
controls=slider,
display_controls=False,
ax=axes[iy, ix],
)
axes[iy, ix].set_title(f"Cells :: {has_cells}")
axes[iy, ix].axis("off") |
Lol, nice. I would guess that the cells are so dark compared to the rest of the image that exactly how |
This PR is a sort of crude and minimal implementation for processing DIC time lapses of agar microchambers such that it could be used to (quickly) process old in-house datasets.
The
modalityFlag
tag is parsed from the nd2 metadata to determine the imaging modality of the time lapse -- or at least whether or not it is brightfield. The only real change in processing this triggers is how the thresholding is done for the time lapses (see below). This approach was tested on a handful of in-house DIC time lapses acquired previously, but is not expected to be very robust. The DIC data was previously processed and analyzed using a different pipeline for the pub: "Phenotypic differences between interfertile Chlamydomonas species". While this dataset will not be included or discussed in the pub associated with this repository, the idea is to still be able to use this repository to process DIC time lapses for the sake of convenience.This PR also includes some changes to default parameter values and some minor refactoring changes.
PR checklist