-
Notifications
You must be signed in to change notification settings - Fork 68
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
Move preserve_float_range #1041
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1041 +/- ##
==========================================
+ Coverage 88.39% 88.48% +0.09%
==========================================
Files 163 164 +1
Lines 6090 6139 +49
==========================================
+ Hits 5383 5432 +49
Misses 707 707
Continue to review full report at Codecov.
|
12adec9
to
bb3634b
Compare
starfish/imagestack/imagestack.py
Outdated
sorted(AXES_DATA.items(), key=lambda kv: kv[1].order) | ||
] + [Axes.Y.value, Axes.X.value] | ||
|
||
# build and then slice the xarray to get the piece needed for this worker |
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.
This drops the coords, right?
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.
From the filtered function, yes. From the resulting object, no.
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.
Make the enum change but otherwise looks good!
bb3634b
to
07cb43d
Compare
07cb43d
to
4b8c85a
Compare
Purpose
Clipping and scaling was not happening properly in our filters, leading to some bugs. Specifically,
preserve_float_range
withrescale=True
scales by the max value of the provided image. This was being called on each chunk independently, when some filters need to call it on the whole imagestack. This PR adds that flexibility.Changes
preserve_float_range
calls intoImageStack.apply
and enable 3 modes of clipping (see below).preserve_float_range
fromfilter
tostarfish.util.dtype
.clip_method
parameter.apply
,transform
and related methods to clarify process flow.New
clip_method
parameter:Review strategy
starfish/imagestack/imagestack.py
starfish/test/image/test_apply.py
starfish/test/full_pipelines/api/test_merfish.py