{"action":"created","issue":{"url":"https://api.github.com/repos/Nikea/scikit-xray/issues/301","labels_url":"https://api.github.com/repos/Nikea/scikit-xray/issues/301/labels{/name}","comments_url":"https://api.github.com/repos/Nikea/scikit-xray/issues/301/comments","events_url":"https://api.github.com/repos/Nikea/scikit-xray/issues/301/events","html_url":"https://github.com/Nikea/scikit-xray/issues/301","id":97073184,"number":301,"title":"Confusing function","user":{"login":"ericdill","id":6223243,"avatar_url":"https://avatars.githubusercontent.com/u/6223243?v=3","gravatar_id":"","url":"https://api.github.com/users/ericdill","html_url":"https://github.com/ericdill","followers_url":"https://api.github.com/users/ericdill/followers","following_url":"https://api.github.com/users/ericdill/following{/other_user}","gists_url":"https://api.github.com/users/ericdill/gists{/gist_id}","starred_url":"https://api.github.com/users/ericdill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ericdill/subscriptions","organizations_url":"https://api.github.com/users/ericdill/orgs","repos_url":"https://api.github.com/users/ericdill/repos","events_url":"https://api.github.com/users/ericdill/events{/privacy}","received_events_url":"https://api.github.com/users/ericdill/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-07-24T15:07:59Z","updated_at":"2015-07-24T15:34:52Z","closed_at":null,"body":"What is the purpose of this function? https://github.com/Nikea/scikit-xray/blob/master/skxray/core/roi.py#L431\r\n\r\nIt is intended to be used like this:\r\n```python\r\nmask_data1 = N_mask*duke_data[0:2000]\r\nmask_data2 = N_mask*duke_data[2001: 3500]\r\nmask_data3 = N_mask*duke_data[3501:5000]\r\nimage_sets = (mask_data1, mask_data2, mask_data3)\r\nmean_int_sets, index_list = roi.mean_intensity_sets(image_sets, rings_mask)\r\ncombine_intensity = roi.combine_mean_intensity(mean_int_sets, index_list)\r\n```\r\n\r\nwhere index_list in the above code snippet is `[array([1, 2, 3, 4]), array([1, 2, 3, 4]), array([1, 2, 3, 4])]`.\r\nand where:\r\n```python\r\nfor means in mean_int_sets:\r\n    print(means.shape)\r\n```\r\nproduces\r\n```\r\n(2000, 4)\r\n(1499, 4)\r\n(1499, 4)\r\n```\r\nand \r\n```python\r\ncombine_intensity.shape\r\n```\r\nproduces\r\n```\r\n(4998, 4)\r\n```\r\n\r\nHere is the problem...\r\n----\r\nInside the function it checks to make sure that index_list is a list with a bunch of identical entries, then calls `np.vstack(mean_int_list)`.  Somewhat amusingly, if I pass in `index_list=['cat', 'cat', 'cat']`, then `combine_mean_intensity` still returns the same `combine_intensity` as the above code snipped.  \r\n\r\nI guess I'm wondering if we can't just remove this function entirely, as it seems like a very very confusing wrapper around np.vstack.\r\n\r\n[edit] i suck at spelling"},"comment":{"url":"https://api.github.com/repos/Nikea/scikit-xray/issues/comments/124560431","html_url":"https://github.com/Nikea/scikit-xray/issues/301#issuecomment-124560431","issue_url":"https://api.github.com/repos/Nikea/scikit-xray/issues/301","id":124560431,"user":{"login":"ericdill","id":6223243,"avatar_url":"https://avatars.githubusercontent.com/u/6223243?v=3","gravatar_id":"","url":"https://api.github.com/users/ericdill","html_url":"https://github.com/ericdill","followers_url":"https://api.github.com/users/ericdill/followers","following_url":"https://api.github.com/users/ericdill/following{/other_user}","gists_url":"https://api.github.com/users/ericdill/gists{/gist_id}","starred_url":"https://api.github.com/users/ericdill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ericdill/subscriptions","organizations_url":"https://api.github.com/users/ericdill/orgs","repos_url":"https://api.github.com/users/ericdill/repos","events_url":"https://api.github.com/users/ericdill/events{/privacy}","received_events_url":"https://api.github.com/users/ericdill/received_events","type":"User","site_admin":false},"created_at":"2015-07-24T15:34:52Z","updated_at":"2015-07-24T15:34:52Z","body":"I'm still not clear on what `combine_mean_intensity` is supposed to do."}}