payload: {"action":"closed","issue":{"url":"https://api.github.com/repos/spacetx/starfish/issues/1475","repository_url":"https://api.github.com/repos/spacetx/starfish","labels_url":"https://api.github.com/repos/spacetx/starfish/issues/1475/labels{/name}","comments_url":"https://api.github.com/repos/spacetx/starfish/issues/1475/comments","events_url":"https://api.github.com/repos/spacetx/starfish/issues/1475/events","html_url":"https://github.com/spacetx/starfish/issues/1475","id":474280553,"node_id":"MDU6SXNzdWU0NzQyODA1NTM=","number":1475,"title":"[Question] How to properly merge round IntensityTables?","user":{"login":"njmei","id":43766899,"node_id":"MDQ6VXNlcjQzNzY2ODk5","avatar_url":"https://avatars0.githubusercontent.com/u/43766899?v=4","gravatar_id":"","url":"https://api.github.com/users/njmei","html_url":"https://github.com/njmei","followers_url":"https://api.github.com/users/njmei/followers","following_url":"https://api.github.com/users/njmei/following{/other_user}","gists_url":"https://api.github.com/users/njmei/gists{/gist_id}","starred_url":"https://api.github.com/users/njmei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/njmei/subscriptions","organizations_url":"https://api.github.com/users/njmei/orgs","repos_url":"https://api.github.com/users/njmei/repos","events_url":"https://api.github.com/users/njmei/events{/privacy}","received_events_url":"https://api.github.com/users/njmei/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2019-07-29T22:13:41Z","updated_at":"2019-07-30T19:28:39Z","closed_at":"2019-07-30T19:28:39Z","author_association":"CONTRIBUTOR","body":"Hi,\r\n\r\nHave a question regarding how to properly \"combine\" `IntensityTable`s produced from spotfinding individual rounds within an experiment.\r\n\r\nAttached are two example fovs from two rounds which comprise an experiment:\r\n[round_intensity_table_examples.tar.gz](https://github.com/spacetx/starfish/files/3444386/round_intensity_table_examples.tar.gz)\r\n\r\nMy expectation is that there *should* be some set of xarray operations such that:\r\n`round_000_fov_000_spots.nc` + `round_001_fov_000_spots.nc` = `expt_fov_000_spots.nc`\r\n`round_000_fov_001_spots.nc` + `round_001_fov_001_spots.nc` = `expt_fov_001_spots.nc`\r\n\r\nThings I've attempted so far:\r\n```\r\nfrom pathlib import Path\r\nimport xarray as xr\r\n\r\nfrom starfish import IntensityTable\r\n\r\nexpt_fov_0 = IntensityTable.open_netcdf(Path('expt_fov_000_spots.nc'))\r\nround_0_fov_0 = IntensityTable.open_netcdf(Path('round_000_fov_000_spots.nc'))\r\nround_1_fov_0 = IntensityTable.open_netcdf(Path('round_001_fov_000_spots.nc'))\r\n\r\n# This does not work, wrong number of '* features'\r\nmerge_attempt_0 = xr.concat([round_0_fov_0, round_1_fov_0], dim='features', fill_value=0.0)\r\n\r\n# This produces correct number of '* features' but (expt_values.values == merge_attempt_1.values).all() == False\r\nreindex_round_1_fov_0 = round_1_fov_0.assign_coords(features=range(len(round_0_fov_0), len(round_0_fov_0) + len(round_1_fov_0)))\r\nmerge_attempt_1= xr.concat([round_0_fov_0, reindex_round_1_fov_0], dim='features', fill_value=0.0)\r\n```\r\n\r\nWill be continuing to try things out, but was wondering if there is an easy way to do this 'combining' as I'm still not super familiar with xarray.\r\n\r\nP.S. Is there a specific 'github issue' category for questions? I didn't feel like this issue fit under the existing categories..."}}
other: {"actor":{"display_login":"njmei"}}