From ef6cc2197ee749874d649b9d2ba95a1760431e30 Mon Sep 17 00:00:00 2001 From: Sergey Gratiy Date: Tue, 19 Oct 2021 13:15:15 -0700 Subject: [PATCH] Fix coords assignment in CombineAdjustFeatures.run Use explicit parameter calls when building table coordinates Fix shape definition for the IntensityTable docs --- starfish/core/intensity_table/intensity_table.py | 2 +- .../core/spots/DetectPixels/combine_adjacent_features.py | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/starfish/core/intensity_table/intensity_table.py b/starfish/core/intensity_table/intensity_table.py index 6a47449fb..1752edae6 100644 --- a/starfish/core/intensity_table/intensity_table.py +++ b/starfish/core/intensity_table/intensity_table.py @@ -33,7 +33,7 @@ class IntensityTable(xr.DataArray): An IntensityTable records the numeric intensity of a set of features in each :code:`(round, channel)` tile in which the feature is identified. The :py:class:`IntensityTable` has shape - :code:`(n_feature, n_channel, n_round)`. + :code:`(n_feature, n_round, n_channel)`. Some :py:class:`SpotFinder` methods identify a position and search for Gaussian blobs in a small radius, only recording intensities if they are diff --git a/starfish/core/spots/DetectPixels/combine_adjacent_features.py b/starfish/core/spots/DetectPixels/combine_adjacent_features.py index b27d6a23e..01f5238bf 100644 --- a/starfish/core/spots/DetectPixels/combine_adjacent_features.py +++ b/starfish/core/spots/DetectPixels/combine_adjacent_features.py @@ -422,10 +422,13 @@ def run( # create new indexes for the output IntensityTable channel_index = mean_pixel_traces.indexes[Axes.CH] round_index = mean_pixel_traces.indexes[Axes.ROUND] - coords = IntensityTable._build_xarray_coords(spot_attributes, channel_index, round_index) + coords = IntensityTable._build_xarray_coords( + spot_attributes, + round_values=round_index, + channel_values=channel_index) # create the output IntensityTable - dims = (Features.AXIS, Axes.CH.value, Axes.ROUND.value) + dims = (Features.AXIS, Axes.ROUND.value, Axes.CH.value) intensity_table = DecodedIntensityTable( data=mean_pixel_traces, coords=coords, dims=dims )