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

ImageStack parsers should provide coordinates as an array #1351

Merged
merged 1 commit into from
May 21, 2019

Conversation

ttung
Copy link
Collaborator

@ttung ttung commented May 15, 2019

The coordinates for zplanes need to be a sequence of coordinate values since a start/end range does not work for irregularly spaced coordinates. To make the API consistent, this PR passes all coordinates to the numpy parser and between the parsers and ImageStack as sequences of coordinate values.

Add a test for from_numpy(..) to verify that construction of an ImageStack from a numpy array with coordinates works correctly.

Test plan: pytest -v -n4 starfish/core/imagestack/test/

Depends on #1350

@ttung ttung requested a review from shanaxel42 May 15, 2019 08:22
@codecov-io
Copy link

codecov-io commented May 15, 2019

Codecov Report

Merging #1351 into master will increase coverage by 0.11%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1351      +/-   ##
==========================================
+ Coverage   89.05%   89.17%   +0.11%     
==========================================
  Files         147      147              
  Lines        5355     5358       +3     
==========================================
+ Hits         4769     4778       +9     
+ Misses        586      580       -6
Impacted Files Coverage Δ
starfish/core/imagestack/parser/numpy/__init__.py 91.04% <100%> (+8.18%) ⬆️
starfish/core/imagestack/parser/tileset/_parser.py 83.54% <100%> (+1.85%) ⬆️
starfish/core/imagestack/parser/_tiledata.py 68.75% <100%> (ø) ⬆️
starfish/core/imagestack/parser/crop.py 90.4% <100%> (-0.37%) ⬇️
starfish/core/imagestack/imagestack.py 93.95% <100%> (+0.05%) ⬆️

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 445e40a...198335a. Read the comment docs.

@ttung ttung force-pushed the tonytung-improve-physical-calculation branch from 832304e to 6020ead Compare May 15, 2019 08:39
@ttung ttung force-pushed the tonytung-pass-array branch from 0718de2 to 2b78fb2 Compare May 15, 2019 08:39
@ttung ttung force-pushed the tonytung-improve-physical-calculation branch from 6020ead to c80e9fc Compare May 15, 2019 18:52
@ttung ttung force-pushed the tonytung-pass-array branch from 2b78fb2 to 3100881 Compare May 15, 2019 18:52
@ttung ttung force-pushed the tonytung-improve-physical-calculation branch from c80e9fc to 661ced4 Compare May 15, 2019 20:36
@ttung ttung force-pushed the tonytung-pass-array branch 4 times, most recently from d6bc600 to fca77d8 Compare May 15, 2019 23:54
@ttung ttung changed the base branch from tonytung-improve-physical-calculation to master May 15, 2019 23:59
@ttung ttung force-pushed the tonytung-pass-array branch from fca77d8 to 7b65acd Compare May 16, 2019 18:42
The coordinates for zplanes need to be a sequence of coordinate values since a start/end range does not work for irregularly spaced coordinates.  To make the API consistent, this PR passes _all_ coordinates to the numpy parser and between the parsers and ImageStack as sequences of coordinate values.

Add a test for from_numpy(..) to verify that construction of an ImageStack from a numpy array with coordinates works correctly.

Test plan: `pytest -v -n4 starfish/core/imagestack/test/`
@ttung ttung force-pushed the tonytung-pass-array branch from 7b65acd to 198335a Compare May 20, 2019 21:42
Copy link
Collaborator

@shanaxel42 shanaxel42 left a comment

Choose a reason for hiding this comment

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

lgtm!

@ttung ttung merged commit dcff749 into master May 21, 2019
@ttung ttung deleted the tonytung-pass-array branch May 21, 2019 17:34
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