Skip to content

Commit

Permalink
Remove instances where we use expand_dynamic_range in notebooks (#1762
Browse files Browse the repository at this point in the history
)

Replace them with Levels.

Test plan: `make -j fast`
  • Loading branch information
Tony Tung authored Jan 31, 2020
1 parent c915752 commit 2e61267
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 14 deletions.
6 changes: 3 additions & 3 deletions notebooks/BaristaSeq.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"\n",
"import starfish\n",
"import starfish.data\n",
"from starfish.types import Axes\n",
"from starfish.types import Axes, Levels\n",
"from starfish.util.plot import (\n",
" imshow_plane, intensity_histogram, overlay_spot_calls\n",
")\n",
Expand Down Expand Up @@ -331,7 +331,7 @@
"metadata": {},
"outputs": [],
"source": [
"sbp = starfish.image.Filter.Clip(p_max=100, expand_dynamic_range=True)\n",
"sbp = starfish.image.Filter.Clip(p_max=100, level_method=Levels.SCALE_BY_CHUNK)\n",
"scaled = sbp.run(background_corrected, n_processes=1, in_place=False)"
]
},
Expand Down Expand Up @@ -393,7 +393,7 @@
"metadata": {},
"outputs": [],
"source": [
"sbp = starfish.image.Filter.Clip(p_max=99.8, expand_dynamic_range=True)\n",
"sbp = starfish.image.Filter.Clip(p_max=99.8, level_method=Levels.SCALE_BY_CHUNK)\n",
"scaled = sbp.run(background_corrected, n_processes=1, in_place=False)\n",
"\n",
"f = plot_scaling_result(background_corrected, scaled)"
Expand Down
4 changes: 2 additions & 2 deletions notebooks/DARTFISH.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"\n",
"from starfish import display\n",
"from starfish import data, FieldOfView\n",
"from starfish.types import Features, Axes\n",
"from starfish.types import Axes, Features, Levels\n",
"\n",
"from starfish import IntensityTable\n",
"\n",
Expand Down Expand Up @@ -117,7 +117,7 @@
"metadata": {},
"outputs": [],
"source": [
"sc_filt = Filter.Clip(p_max=100, expand_dynamic_range=True)\n",
"sc_filt = Filter.Clip(p_max=100, level_method=Levels.SCALE_BY_CHUNK)\n",
"norm_imgs = sc_filt.run(imgs)"
]
},
Expand Down
4 changes: 2 additions & 2 deletions notebooks/SeqFISH.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"\n",
"import starfish\n",
"import starfish.data\n",
"from starfish.types import Axes, TraceBuildingStrategies"
"from starfish.types import Axes, Levels, TraceBuildingStrategies"
]
},
{
Expand Down Expand Up @@ -136,7 +136,7 @@
"metadata": {},
"outputs": [],
"source": [
"clip = starfish.image.Filter.Clip(p_max=99.9, expand_dynamic_range=True, is_volume=True)\n",
"clip = starfish.image.Filter.Clip(p_max=99.9, is_volume=True, level_method=Levels.SCALE_BY_CHUNK)\n",
"scaled = clip.run(background_corrected, in_place=False)"
]
},
Expand Down
6 changes: 3 additions & 3 deletions notebooks/py/BaristaSeq.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

import starfish
import starfish.data
from starfish.types import Axes
from starfish.types import Axes, Levels
from starfish.util.plot import (
imshow_plane, intensity_histogram, overlay_spot_calls
)
Expand Down Expand Up @@ -246,7 +246,7 @@
# EPY: END markdown

# EPY: START code
sbp = starfish.image.Filter.Clip(p_max=100, expand_dynamic_range=True)
sbp = starfish.image.Filter.Clip(p_max=100, level_method=Levels.SCALE_BY_CHUNK)
scaled = sbp.run(background_corrected, n_processes=1, in_place=False)
# EPY: END code

Expand Down Expand Up @@ -292,7 +292,7 @@ def plot_scaling_result(
# EPY: END markdown

# EPY: START code
sbp = starfish.image.Filter.Clip(p_max=99.8, expand_dynamic_range=True)
sbp = starfish.image.Filter.Clip(p_max=99.8, level_method=Levels.SCALE_BY_CHUNK)
scaled = sbp.run(background_corrected, n_processes=1, in_place=False)

f = plot_scaling_result(background_corrected, scaled)
Expand Down
4 changes: 2 additions & 2 deletions notebooks/py/DARTFISH.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

from starfish import display
from starfish import data, FieldOfView
from starfish.types import Features, Axes
from starfish.types import Axes, Features, Levels

from starfish import IntensityTable

Expand Down Expand Up @@ -80,7 +80,7 @@
# EPY: END markdown

# EPY: START code
sc_filt = Filter.Clip(p_max=100, expand_dynamic_range=True)
sc_filt = Filter.Clip(p_max=100, level_method=Levels.SCALE_BY_CHUNK)
norm_imgs = sc_filt.run(imgs)
# EPY: END code

Expand Down
4 changes: 2 additions & 2 deletions notebooks/py/SeqFISH.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

import starfish
import starfish.data
from starfish.types import Axes, TraceBuildingStrategies
from starfish.types import Axes, Levels, TraceBuildingStrategies
# EPY: END code

# EPY: START markdown
Expand Down Expand Up @@ -83,7 +83,7 @@
# EPY: END markdown

# EPY: START code
clip = starfish.image.Filter.Clip(p_max=99.9, expand_dynamic_range=True, is_volume=True)
clip = starfish.image.Filter.Clip(p_max=99.9, is_volume=True, level_method=Levels.SCALE_BY_CHUNK)
scaled = clip.run(background_corrected, in_place=False)
# EPY: END code

Expand Down

0 comments on commit 2e61267

Please sign in to comment.