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

Fix Allen Notebook #692

Merged
merged 3 commits into from
Oct 11, 2018
Merged

Fix Allen Notebook #692

merged 3 commits into from
Oct 11, 2018

Conversation

ambrosejcarr
Copy link
Member

@ambrosejcarr ambrosejcarr commented Oct 4, 2018

Fixes the Allen Notebook. Note that "use_test_data" doesn't seem to do anything?

The notebook still takes ~ 2.6GB of ram, presumably with a ceiling of + 1/3 when volumes are being manipulated. However, it's all starfish, and it runs.

Fixes #669

@codecov-io
Copy link

Codecov Report

❗ No coverage uploaded for pull request base (master@7f643c4). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #692   +/-   ##
=========================================
  Coverage          ?   87.51%           
=========================================
  Files             ?      117           
  Lines             ?     4045           
  Branches          ?        0           
=========================================
  Hits              ?     3540           
  Misses            ?      505           
  Partials          ?        0
Impacted Files Coverage Δ
starfish/spots/_detector/local_max_peak_finder.py 93.75% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7f643c4...d3bea7d. Read the comment docs.

@ambrosejcarr
Copy link
Member Author

Of note, the documentation in trackpy is wrong. The coordinates are emitted in (y, x) and (z, y, x). I verified by checking the coordinates of the maximum-valued spot in the imagestack and then finding the same value in the IntensityTable.

@ambrosejcarr
Copy link
Member Author

FYI, tests were passing prior to rebase, so I believe this is probably clean/safe to land. I'll tag @dganguli for review for later, but we should get this in master and tested before he's back.

# EPY: END markdown

# EPY: START code
primary_image.show_stack({Indices.CH.value: 0});
_ = primary_image.show_stack({Indices.CH.value: 0, Indices.Z.value: 17}, rescale=True)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why are you assigning this?

Copy link
Member Author

Choose a reason for hiding this comment

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

Done remember. Removed.

clip = Filter.Clip(p_min=10, p_max=100, is_volume=False)
clip.run(primary_image, verbose=True, in_place=True)
# EPY: END code

# EPY: START code
from showit import image
Copy link
Collaborator

Choose a reason for hiding this comment

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

showit!!

# image._show_spots(results, ax=plt.gca(), scale_radius=7);
# if max radius is 3, and mean intensity is about 0.006, and we can expect spots to have around pi*r^2 integrated intensity...
# try half-maximal radius * mean intensity
(np.pi * 1.5 ** 2) * 0.006
Copy link
Collaborator

Choose a reason for hiding this comment

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

what's this for?

Copy link
Member Author

Choose a reason for hiding this comment

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

Added explanation. Thanks for the catch.

Copy link
Collaborator

@ttung ttung left a comment

Choose a reason for hiding this comment

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

can you remove the .skip file while you're at it? :)

@ttung
Copy link
Collaborator

ttung commented Oct 11, 2018

You likely will want to update .travis.yml as well.

@ambrosejcarr ambrosejcarr merged commit 5197e70 into master Oct 11, 2018
@ambrosejcarr ambrosejcarr deleted the ajc-allen-notebook-fix branch October 11, 2018 19:51
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.

3 participants