Skip to content

Commit

Permalink
Fix coords assignment in CombineAdjustFeatures.run (#1965)
Browse files Browse the repository at this point in the history
Use explicit parameter calls when building table coordinates
Fix shape definition for the IntensityTable docs
  • Loading branch information
sgratiy authored Oct 20, 2021
1 parent 8741af1 commit 89baf83
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion starfish/core/intensity_table/intensity_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 5 additions & 2 deletions starfish/core/spots/DetectPixels/combine_adjacent_features.py
Original file line number Diff line number Diff line change
Expand Up @@ -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=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
)
Expand Down

0 comments on commit 89baf83

Please sign in to comment.