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

WIP: Refactoring some of the functions in roi.py #302

Closed
wants to merge 20 commits into from
Closed

WIP: Refactoring some of the functions in roi.py #302

wants to merge 20 commits into from

Conversation

ericdill
Copy link
Member

Companion PR to Nikea/xray-vision#68

@sameera2004
Copy link
Member

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):
Copy link
Member

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

@sameera2004
Copy link
Member

@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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merge conflict remains.

@codecov-io
Copy link

@ericdill
Copy link
Member Author

@sameera2004 can you review my changes?

@ericdill
Copy link
Member Author

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*
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have added .gitignore

Copy link
Member Author

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
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
@ericdill
Copy link
Member Author

superseded by #306

@ericdill ericdill closed this Aug 26, 2015
@ericdill ericdill deleted the roi branch September 18, 2015 21:42
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.

None yet

4 participants