-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Add missing datasets to public API #4951
Conversation
Not sure what you mean here @hmaarrfk. Where would we describe? What would you like to see? |
skimage/data/__init__.py
Outdated
def cells3D(): | ||
"""3D microscopy images of cells. | ||
|
||
The data for this was provided by the Allen Institute for Cell Science. It |
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.
I think information like 598–609 should be in a Notes
section.
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.
Understanding your data is critical to good analysis and visualization.
What is the difference between the "Notes" and the "Description".
If you feel strongly about it, do reorganize.
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.
We follow the Numpy docstyle. According to them:
The sections of a function’s docstring are:
1.
Short summary
A one-line summary that does not use variable names or the function name (...)
(...)
13.
Notes
An optional section that provides additional information about the code, possibly including a discussion (...)
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.
I've made some modifications, however, I will point to:
Extended Summary
A few sentences giving an extended description. This section should be used to clarify functionality, not to discuss implementation detail or background theory, which should rather be explored in the Notes section below. You may refer to the parameters and the function name, but parameter descriptions still belong in the Parameters section.
Functionality here, for me, represents things like metadata, depicting voxel size, which are simply not communicated in a numpy array. I've kept those details.
Thanks for the review @alexdesiqueira! I don't see the need for a Notes section if the description is empty. IMO: we can reorganize once the description gets crowded. |
Hello @hmaarrfk! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:
Comment last updated at 2020-10-29 08:13:43 UTC |
CC @mkcor |
|
||
|
||
##################################################################### | ||
# Load and display 3D images | ||
# ========================== | ||
# Three-dimensional data can be loaded with `io.imread`. | ||
# |
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.
# | |
# ========================== |
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.
Thanks
# Three-dimensional data can be loaded with `io.imread`. | ||
# | ||
# The optional dependency, pooch is required to obtain the dataset. | ||
##################################################################### |
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.
This line is not necessary.
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.
Thanks
skimage/data/__init__.py
Outdated
|
||
Notes | ||
----- | ||
|
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.
This blank line can be deleted.
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.
thanks
I think my comments will turn the CI green. Once applied, i'm ready to approve. |
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.
Approved with @sciunto's suggestions.
Thank you all for the reviews. @mkcor suggested that we unify the names in the registry with the names of the functions. Now that I look at this, I notice that we might be "breaking" a private API. Are you guys OK with that? I'm not sure how many people you've pointed to these functions. |
Did I? ;-) Are you referring to my considerations about one-word names? |
I'm refering to #4951 (comment) :D |
Oh! Well, if this PR is merged, But 😉 I'm always happy to have a discussion about naming conventions, as @jni knows! I know that we already have |
Honestly, i don't know what to call this dataset. Context would help. I would prefer not naming it Something more descriptive of the experiment would be really nice. |
In this case, I'd go for "if isn't broke don't fix it" 😂 |
Sorry, I'm not sure about the complete discussion here. Can someone summarise the proposed options? Regarding deprecating names of functions already released, I'd prefer we avoid that, even if we didn't publicise them. Someone might have done On example is the cells-3d dataset. For that one, if we haven't actually published it in the |
@mkcor would you mind helping me attribute the data correctly? Do you have al link to the original data?
|
skimage/data/tests/test_data.py
Outdated
@@ -170,4 +173,4 @@ def test_lily_multichannel(): | |||
""" | |||
fetch('data/lily.tif') | |||
lily = data.lily() | |||
assert lily.shape == (922, 922, 4) | |||
assert lily.shape == (922, 922, 4) |
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.
I don't support this change 😉 (only referring to the EOF thing)
@jni
Interesting, I wasn't aware of this. Ok, so let's look into this more carefully before we publish |
Sure, it is: https://github.com/CellProfiler/examples/blob/master/ExampleHuman/images/AS_09125_050116030001_D03f00d0.tif as documented under |
s/mouse/murine/ |
thanks for the reference for human mitosis. @jni do you k,now the original link for the cells3d? |
Knowing more about the dataset might help crafting a new name. |
Actually I'm quite in favor of |
Co-authored-by: Gregory R. Lee <grlee77@gmail.com>
Thanks @grlee77 i've fixed a few more thngs. I'm a little hesitant that we are pointing to master, and not to a specific branch or to more permanent links. That said, the sample data feels more ephemeral to me, than the library itself. |
I see there was one other issue by @jni that remains to be addressed: #4951 (comment) @jni, was your intention that Here is a plot of a single slice of the 3D datasets overlaid for context from skimage import io
import matplotlib.pyplot as plt
m = io.imread('cells_membrane.tif')
c = io.imread('cells.tif')
fig, axes = plt.subplots(1, 3)
axes[0].imshow(c[30])
axes[0].set_title('cells.tif')
axes[1].imshow(m[30])
axes[1].set_title('cells_membrane.tif')
axes[2].imshow(c[30] + 2*m[30])
axes[2].set_title('overlaid') |
Yeah, that's my goal/intention. I intend to push to this branch shortly, hold please! |
Done! Assuming tests pass this is ok from me. |
🎉 🚀 |
Thanks everybody |
Thank you, @hmaarrfk! You always do the hard work and then it sits in committee for months! But we deeply appreciate it! ❤️ |
Description
@scikit-image/core I noticed a few datasets were missing from
data.__init__.py
.I added them and updated the examples that used them.
However, I am unclear about the exact meaning of these datasets, and their importance.
Help is appreciated elaborating on the description of each dataset.
TODO:
cells3d
mitosis
Checklist
./doc/examples
(new features only)./benchmarks
, if your changes aren't covered by anexisting benchmark
For reviewers
later.
__init__.py
.doc/release/release_dev.rst
.