Skip to content
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

Update all example notebooks #44

Merged
merged 20 commits into from
Feb 27, 2018
Merged

Update all example notebooks #44

merged 20 commits into from
Feb 27, 2018

Conversation

charlesreid1
Copy link
Contributor

@charlesreid1 charlesreid1 commented Nov 8, 2017

This pull request contains a substantial number of changes, but the substance of the notebooks has been preserved in each case. The main changes in this pull request are:

  • trackpy now normalizes "mass" quantities, so several notebooks had to be updated to account for this
  • added many more links to the trackpy and pims source code/documentation when relevant classes were mentioned
  • removed some deprecated code (e.g., the now-deprecated threshold_adaptive() function in scikit-image) and updated mentions of old versions of software (e.g., ipython-parallel)

There are also cosmetic changes caused by changes to modules/libraries since the last time these notebooks were updated (e.g., output of timeit commands or ipython notebooks lacking a "collapsed" state).

Please comment on anything that you have doubts about or wish to discuss. When you're okay with these updates and they've been merged, I would also be happy to export them to HTML, add them to the soft-matter.github.io trackpy page, and send a pull request for that repo as well.

Updating the following:
- image pixel values are now normalized
- adjusting mass values (now scaled by 255)
- more documentation links for functions that point to source code
Updating performance notebook:
- trackpy version
- mass numbers (from [0-255] to [0-1])
- profiling numbers
There have been no significant changes around how to use iPython parallel
between iPython v 4.0 (summer 2015) and iPython v 6.2.1 (November 2017).
The date and version mentioned in the instructions have been updated
to reflect this fact. No other changes made - iPython parlallel code
still works fine.
Adding a link to the ipython-parallel project.

changes in timeit output just reflect changes in timeit module's output.

Updating date and version numbers for ipython and ipython-parallel.
No significant changes between iPython v 4.0 (summer 2015), in prior nb,
and iPython v 6.2.1 (November 2017), in current nb.

ipython-parallel code was tested out and still works fine.
Adding links to HDF5 group's website (portal for "official" resources)
and to trackpy source code (linking to where classes are defined when they
are mentioned).
There were several outdated references to the pims API
and classes that have since been renamed. These were not
used in any notebook code, which is probably why they
have not been updated.
As with other notebooks, the "mass" parameter here is unscaled,
and changes to trackpy have made it a scaled quantity,
so this fixes those values. The values were chosen to give
results very close to the previous notebook version's results.
The scikit-image function threshold_adaptive() is deprecated and is
accordingly replaced with threshold_local(). See
[scikit-image 0.13.0 release notes](https://github.com/scikit-image/scikit-image/blob/28c3b436c84d1db640bd939c5628f5373172d05a/doc/release/release_0.13.rst),
which mention that threshold_adaptive() is now deprecated.
@charlesreid1 charlesreid1 changed the title Update example notebooks. Update all example notebooks Nov 8, 2017
@charlesreid1
Copy link
Contributor Author

This pull request will be updated as follows:

  • Any notebook that uses mass values will have a text warning included, along the lines of "if scikit-image is not installed, pim will fall back to matplotlib for reading images, which causes pixel values to be read as floats and not integers, so you may not get sensible results," etc.
  • The issue that I had originally brought up, regarding mass values and pixel values being normalized, was coming from pims and was caused by scikit-image not being installed, see Incosistent imread() function behavior pims#280
  • This should now print a warning so that users without scikit-image installed will know that some things may break, and why

@charlesreid1
Copy link
Contributor Author

Uncovered another issue while updating these notebooks - installing trackpy from pip implements a legacy link_df() interface, where there is a diagnostics parameter, but this interface breaks when using trackpy installed from the github repository. See #45 for proposed fix, implemented in this PR.

@danielballan
Copy link
Member

Wow, thanks for taking the time for do this @charlesreid1. I appreciate the granular commits.

I would also be happy to export them to HTML, add them to the soft-matter.github.io trackpy page, and send a pull request for that repo as well.

The HTML will be automatically generated and push into the docs repo when this PR is merged, so no separate PR into the docs repo is needed. Thanks for the offer to present a more reviewable form. I'm content to build it locally and take a look. Will give this a detailed review today or tomorrow.

@danielballan
Copy link
Member

So sorry for letting this languish so long, @charlesreid1. Merging!

@danielballan danielballan merged commit 10c98f0 into soft-matter:master Feb 27, 2018
@charlesreid1
Copy link
Contributor Author

No problem. Thanks for the pull!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants