-
Notifications
You must be signed in to change notification settings - Fork 60
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
WIP: Refactoring some of the functions in roi.py #302
Conversation
Looks like this is the first time we are using pandas here |
return pd.DataFrame(series_dict) | ||
|
||
|
||
def _mean_intensity(images, labeled_array, index=None): |
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.
@ericdill I saw you changed function name, you have to change that in test too, because I put a test for that function
@ericdill Other than fixing the tests this function looks fine to me, when you fix it I will check it again |
@@ -15,7 +15,8 @@ before_install: | |||
install: | |||
- export GIT_FULL_HASH=`git rev-parse HEAD` | |||
- conda update conda --yes | |||
- conda create -n testenv --yes pip nose python=$TRAVIS_PYTHON_VERSION lmfit xraylib numpy scipy scikit-image netcdf4 six coverage | |||
- conda create -n testenv --yes pip nose python=$TRAVIS_PYTHON_VERSION lmfit xraylib numpy scipy scikit-image netcdf4 six coverage pandas | |||
>>>>>>> MNT: Add pandas as a dep |
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.
merge conflict remains.
Uncovered Suggestions
|
@sameera2004 can you review my changes? |
ignore failing travis for now. I want to get feedback from chx about this API before we sort out the best way to test these functions |
@@ -87,3 +87,6 @@ doc/resource/api/generated/ | |||
*.txt | |||
*.zip | |||
*.jpg | |||
|
|||
# ctags | |||
.tags* |
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.
You have added .gitignore
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.
What is your question here?
it now takes a list of bad data that should be removed before data is returned from the function as a list of rois
It now returns a dataframe
Using pandas drop row/col functions instead
Used to return np.matrix, now returns np.vstack
We should test the public function that uses the private function, not the private function itself.
@danielballan made a convincing argument that the library functions of skxray should not return DataFrames. If we want/need DataFrames, then fancy callable classes could be used to do this, but those callable classes still need to call library functions to do all their work
superseded by #306 |
Companion PR to Nikea/xray-vision#68