soft-matter / trackpy-examples

sample images, examples, and speed tests for trackpy
Other
21 stars 43 forks source link

Add notebook on feature chracterization exploration w/ linked brushing. #5

Closed danielballan closed 8 years ago

danielballan commented 10 years ago

Here's a neat example using mpld3's linked brushing to reveal clusters in the dimensions of feature characterization.

I think this could be really useful on videos with aggregated particles or busy, messy backgrounds. (In my case, I'm about to work on videos of particles in mucus from the lungs of cystic fibrosis patients.) I'm not sure I presented this in a way that is general enough. I invite your comments on the prose.

This notebook works on trackpy 0.2. The recipe is meant to be copy/pasted by our users. We could incorporate it into trackpy as a convenience function, but it's really more general than that. I might see if Jake is interested in putting this directly into mpld3.

danielballan commented 10 years ago

@RebeccaWPerry This is a nice illustration of how "signal" is a very strong indicator, an observation that you made here awhile back. That's especially interesting because signal is not computed by any of the other tracking codes I've seen.

nkeim commented 10 years ago

Cool!! This is good for all kinds of reasons. I'm sure if I knew anything about mpld3, I'd know how to put info about the selection back into Python. But for purposes of showing off, I think it would be great to show that as the last step.

Also, the nbviewer URL is http://nbviewer.ipython.org/github/danielballan/trackpy-examples/blob/exploration/notebooks/multidimensional-feature-exploration.ipynb

danielballan commented 10 years ago

Thanks.

There is way to send data from mpld3 to Python, but the best-practice, future proof way would be invoking mpld3 from inside an IPython widget (!). But that scheme will not be viewable in nbviewer until IPython 3.0.

I'll work up a demo using mpld3 only for now. Separately, I have trackpy/widgets.py in the works, probably ready for a PR later this week. I need all this merged and at least a little tested before the talk in July. Wheee!

danielballan commented 8 years ago

Closing this since mpld3 is way behind (doesn't work well on py3.4 or mpl > 1.3.x). There are a lot of ways to do something like this nowadays -- not sure which one is the winner yet. :- )