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

Fixed the issues with the tests in Eric's roi branch #306

Merged
merged 31 commits into from Sep 9, 2015
Merged

Fixed the issues with the tests in Eric's roi branch #306

merged 31 commits into from Sep 9, 2015

Conversation

sameera2004
Copy link
Member

No description provided.

@sameera2004
Copy link
Member Author

@ericdill tests are ok, issue with pandas
ERROR: Failure: ImportError (No module named pandas)

@sameera2004
Copy link
Member Author

fixed the issue

@ericdill
Copy link
Member

I am 👎 on including mean_intensity_sets as a library function, as it only iterates over a list and calls another library function mean_intensity.

@sameera2004
Copy link
Member Author

@ericdill I took it out, now ready for review

@@ -22,6 +22,7 @@ install:
- python setup.py install
- pip install coveralls
- pip install codecov
- pip install pandas
Copy link
Member

Choose a reason for hiding this comment

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

Can you conda install pandas instead? (Add it to line 18)

@sameera2004
Copy link
Member Author

@ericdill I took out the pandas dependency in these test, and rebased this PR. Ready for review.

labeled array; 0 is background.
Each ROI is represented by a distinct label (i.e., integer).

mean_intensity : list
Copy link
Member

Choose a reason for hiding this comment

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

This is coming back an as array not a list

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed the issue of mean_intensity coming as array, it returns a list

Copy link
Member

Choose a reason for hiding this comment

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

I would have just changed the documentation. Arrays are far more useful than lists of lists

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, I'm with Tom on this one. Can you undo the change to the code and update the docs to say that it is coming back as an array?

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure I will make it to return an array instead of a list

ericdill and others added 10 commits September 2, 2015 10:42
@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

Conflicts:
	.travis.yml
	conda-recipe/meta.yaml
added new function to get combine mean intensities for image sets
Conflicts:
	.travis.yml
@sameera2004
Copy link
Member Author

Fixed the issues ready for review

@@ -10,14 +10,17 @@ before_install:
- chmod +x miniconda.sh
- ./miniconda.sh -b -p /home/travis/mc
- export PATH=/home/travis/mc/bin:$PATH
- wget https://gist.githubusercontent.com/tacaswell/128bb482f845feb024eb/raw/5cf21dc03a354fc87140d4a75e17cb5c076a0517/.condarc -O /home/travis/.condarc
Copy link
Member

Choose a reason for hiding this comment

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

why is this being added back in to the travis yaml?

Copy link
Member Author

Choose a reason for hiding this comment

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

It is a mistake I will take it out in travis yaml

@sameera2004
Copy link
Member Author

Fixed ready for review

# turn the 2-D array back into a list of arrays because the rows and
# columns have different units
mean_intensity = [data[:, i] for i in range(data.shape[1])]
return np.asarray(mean_intensity), index
Copy link
Member

Choose a reason for hiding this comment

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

It is entirely unclear why you are laundering this numpy array through a list and back to a numpy array...

@sameera2004
Copy link
Member Author

@ericdill now the mean_intensity only return as a bumpy array, took out the list

except TypeError:
index = [index]
# not sure that this is needed
index = np.asarray(index)
Copy link
Member

Choose a reason for hiding this comment

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

This line is not needed. The index argument to ndim.mean just needs to be a sequence, not a numpy array

@ericdill
Copy link
Member

ericdill commented Sep 9, 2015

Great, thanks for all the work!

ericdill added a commit that referenced this pull request Sep 9, 2015
Add functions for kymograph and ROI aware mean computation for image stack
@ericdill ericdill merged commit fe20fa1 into scikit-beam:master Sep 9, 2015
@sameera2004
Copy link
Member Author

Sure, Thank you for all the help!

@sameera2004 sameera2004 deleted the eric_roi branch September 28, 2015 14:17
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

3 participants