{"action":"created","comment":{"url":"https://api.github.com/repos/radio-astro-tools/spectral-cube/pulls/comments/49162218","id":49162218,"diff_hunk":"@@ -0,0 +1,201 @@\n+from __future__ import print_function, absolute_import, division\n+\n+import numpy as np\n+\n+from astropy.extern import six\n+from .spectral_cube import SpectralCube\n+from . import wcs_utils\n+from .masks import BooleanArrayMask, is_broadcastable_and_smaller\n+\n+__all__ = ['StokesSpectalCube']\n+\n+VALID_STOKES = ['I', 'Q', 'U', 'V', 'RR', 'LL', 'RL', 'LR']\n+\n+\n+class StokesSpectralCube(object):\n+    \"\"\"\n+    A class to store a spectral cube with multiple Stokes parameters.\n+\n+    The individual Stokes cubes can share a common mask in addition to having\n+    component-specific masks.","path":"spectral_cube/stokes_spectral_cube.py","position":20,"original_position":20,"commit_id":"54d65aec750a04902efc5871aa259dba8487c1f0","original_commit_id":"54d65aec750a04902efc5871aa259dba8487c1f0","user":{"login":"keflavich","id":143715,"avatar_url":"https://avatars.githubusercontent.com/u/143715?v=3","gravatar_id":"","url":"https://api.github.com/users/keflavich","html_url":"https://github.com/keflavich","followers_url":"https://api.github.com/users/keflavich/followers","following_url":"https://api.github.com/users/keflavich/following{/other_user}","gists_url":"https://api.github.com/users/keflavich/gists{/gist_id}","starred_url":"https://api.github.com/users/keflavich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keflavich/subscriptions","organizations_url":"https://api.github.com/users/keflavich/orgs","repos_url":"https://api.github.com/users/keflavich/repos","events_url":"https://api.github.com/users/keflavich/events{/privacy}","received_events_url":"https://api.github.com/users/keflavich/received_events","type":"User","site_admin":false},"body":"I guess https://github.com/radio-astro-tools/spectral-cube/issues/264 means you want to leave the `Parameters` and other details for a separate PR?","created_at":"2016-01-08T06:43:35Z","updated_at":"2016-01-08T06:43:35Z","html_url":"https://github.com/radio-astro-tools/spectral-cube/pull/249#discussion_r49162218","pull_request_url":"https://api.github.com/repos/radio-astro-tools/spectral-cube/pulls/249","_links":{"self":{"href":"https://api.github.com/repos/radio-astro-tools/spectral-cube/pulls/comments/49162218"},"html":{"href":"https://github.com/radio-astro-tools/spectral-cube/pull/249#discussion_r49162218"},"pull_request":{"href":"https://api.github.com/repos/radio-astro-tools/spectral-cube/pulls/249"}}},"pull_request":{"url":"https://api.github.com/repos/radio-astro-tools/spectral-cube/pulls/249","id":47412673,"html_url":"https://github.com/radio-astro-tools/spectral-cube/pull/249","diff_url":"https://github.com/radio-astro-tools/spectral-cube/pull/249.diff","patch_url":"https://github.com/radio-astro-tools/spectral-cube/pull/249.patch","issue_url":"https://api.github.com/repos/radio-astro-tools/spectral-cube/issues/249","number":249,"state":"open","locked":false,"title":"Implement StokesSpectralCube","user":{"login":"astrofrog","id":314716,"avatar_url":"https://avatars.githubusercontent.com/u/314716?v=3","gravatar_id":"","url":"https://api.github.com/users/astrofrog","html_url":"https://github.com/astrofrog","followers_url":"https://api.github.com/users/astrofrog/followers","following_url":"https://api.github.com/users/astrofrog/following{/other_user}","gists_url":"https://api.github.com/users/astrofrog/gists{/gist_id}","starred_url":"https://api.github.com/users/astrofrog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/astrofrog/subscriptions","organizations_url":"https://api.github.com/users/astrofrog/orgs","repos_url":"https://api.github.com/users/astrofrog/repos","events_url":"https://api.github.com/users/astrofrog/events{/privacy}","received_events_url":"https://api.github.com/users/astrofrog/received_events","type":"User","site_admin":false},"body":"@keflavich - this is the combination of your work and my tests and work since.\r\n\r\nStill a fair bit to do, including implementing the I/O, but maybe you can already check if this seems ok so far?","created_at":"2015-10-12T12:12:55Z","updated_at":"2016-01-08T06:43:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4d2a46f90ae152f47a654c8af0b4bab89b644d42","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/radio-astro-tools/spectral-cube/pulls/249/commits","review_comments_url":"https://api.github.com/repos/radio-astro-tools/spectral-cube/pulls/249/comments","review_comment_url":"https://api.github.com/repos/radio-astro-tools/spectral-cube/pulls/comments{/number}","comments_url":"https://api.github.com/repos/radio-astro-tools/spectral-cube/issues/249/comments","statuses_url":"https://api.github.com/repos/radio-astro-tools/spectral-cube/statuses/54d65aec750a04902efc5871aa259dba8487c1f0","head":{"label":"astrofrog:stokes","ref":"stokes","sha":"54d65aec750a04902efc5871aa259dba8487c1f0","user":{"login":"astrofrog","id":314716,"avatar_url":"https://avatars.githubusercontent.com/u/314716?v=3","gravatar_id":"","url":"https://api.github.com/users/astrofrog","html_url":"https://github.com/astrofrog","followers_url":"https://api.github.com/users/astrofrog/followers","following_url":"https://api.github.com/users/astrofrog/following{/other_user}","gists_url":"https://api.github.com/users/astrofrog/gists{/gist_id}","starred_url":"https://api.github.com/users/astrofrog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/astrofrog/subscriptions","organizations_url":"https://api.github.com/users/astrofrog/orgs","repos_url":"https://api.github.com/users/astrofrog/repos","events_url":"https://api.github.com/users/astrofrog/events{/privacy}","received_events_url":"https://api.github.com/users/astrofrog/received_events","type":"User","site_admin":false},"repo":{"id":18769694,"name":"spectral-cube","full_name":"astrofrog/spectral-cube","owner":{"login":"astrofrog","id":314716,"avatar_url":"https://avatars.githubusercontent.com/u/314716?v=3","gravatar_id":"","url":"https://api.github.com/users/astrofrog","html_url":"https://github.com/astrofrog","followers_url":"https://api.github.com/users/astrofrog/followers","following_url":"https://api.github.com/users/astrofrog/following{/other_user}","gists_url":"https://api.github.com/users/astrofrog/gists{/gist_id}","starred_url":"https://api.github.com/users/astrofrog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/astrofrog/subscriptions","organizations_url":"https://api.github.com/users/astrofrog/orgs","repos_url":"https://api.github.com/users/astrofrog/repos","events_url":"https://api.github.com/users/astrofrog/events{/privacy}","received_events_url":"https://api.github.com/users/astrofrog/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/astrofrog/spectral-cube","description":"","fork":true,"url":"https://api.github.com/repos/astrofrog/spectral-cube","forks_url":"https://api.github.com/repos/astrofrog/spectral-cube/forks","keys_url":"https://api.github.com/repos/astrofrog/spectral-cube/keys{/key_id}","collaborators_url":"https://api.github.com/repos/astrofrog/spectral-cube/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/astrofrog/spectral-cube/teams","hooks_url":"https://api.github.com/repos/astrofrog/spectral-cube/hooks","issue_events_url":"https://api.github.com/repos/astrofrog/spectral-cube/issues/events{/number}","events_url":"https://api.github.com/repos/astrofrog/spectral-cube/events","assignees_url":"https://api.github.com/repos/astrofrog/spectral-cube/assignees{/user}","branches_url":"https://api.github.com/repos/astrofrog/spectral-cube/branches{/branch}","tags_url":"https://api.github.com/repos/astrofrog/spectral-cube/tags","blobs_url":"https://api.github.com/repos/astrofrog/spectral-cube/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/astrofrog/spectral-cube/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/astrofrog/spectral-cube/git/refs{/sha}","trees_url":"https://api.github.com/repos/astrofrog/spectral-cube/git/trees{/sha}","statuses_url":"https://api.github.com/repos/astrofrog/spectral-cube/statuses/{sha}","languages_url":"https://api.github.com/repos/astrofrog/spectral-cube/languages","stargazers_url":"https://api.github.com/repos/astrofrog/spectral-cube/stargazers","contributors_url":"https://api.github.com/repos/astrofrog/spectral-cube/contributors","subscribers_url":"https://api.github.com/repos/astrofrog/spectral-cube/subscribers","subscription_url":"https://api.github.com/repos/astrofrog/spectral-cube/subscription","commits_url":"https://api.github.com/repos/astrofrog/spectral-cube/commits{/sha}","git_commits_url":"https://api.github.com/repos/astrofrog/spectral-cube/git/commits{/sha}","comments_url":"https://api.github.com/repos/astrofrog/spectral-cube/comments{/number}","issue_comment_url":"https://api.github.com/repos/astrofrog/spectral-cube/issues/comments{/number}","contents_url":"https://api.github.com/repos/astrofrog/spectral-cube/contents/{+path}","compare_url":"https://api.github.com/repos/astrofrog/spectral-cube/compare/{base}...{head}","merges_url":"https://api.github.com/repos/astrofrog/spectral-cube/merges","archive_url":"https://api.github.com/repos/astrofrog/spectral-cube/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/astrofrog/spectral-cube/downloads","issues_url":"https://api.github.com/repos/astrofrog/spectral-cube/issues{/number}","pulls_url":"https://api.github.com/repos/astrofrog/spectral-cube/pulls{/number}","milestones_url":"https://api.github.com/repos/astrofrog/spectral-cube/milestones{/number}","notifications_url":"https://api.github.com/repos/astrofrog/spectral-cube/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/astrofrog/spectral-cube/labels{/name}","releases_url":"https://api.github.com/repos/astrofrog/spectral-cube/releases{/id}","created_at":"2014-04-14T17:29:39Z","updated_at":"2014-05-27T08:58:58Z","pushed_at":"2016-01-07T20:17:31Z","git_url":"git://github.com/astrofrog/spectral-cube.git","ssh_url":"git@github.com:astrofrog/spectral-cube.git","clone_url":"https://github.com/astrofrog/spectral-cube.git","svn_url":"https://github.com/astrofrog/spectral-cube","homepage":null,"size":1373,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"radio-astro-tools:master","ref":"master","sha":"2477fc653194642584bbc0db5391dbc2e3047d16","user":{"login":"radio-astro-tools","id":7228695,"avatar_url":"https://avatars.githubusercontent.com/u/7228695?v=3","gravatar_id":"","url":"https://api.github.com/users/radio-astro-tools","html_url":"https://github.com/radio-astro-tools","followers_url":"https://api.github.com/users/radio-astro-tools/followers","following_url":"https://api.github.com/users/radio-astro-tools/following{/other_user}","gists_url":"https://api.github.com/users/radio-astro-tools/gists{/gist_id}","starred_url":"https://api.github.com/users/radio-astro-tools/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/radio-astro-tools/subscriptions","organizations_url":"https://api.github.com/users/radio-astro-tools/orgs","repos_url":"https://api.github.com/users/radio-astro-tools/repos","events_url":"https://api.github.com/users/radio-astro-tools/events{/privacy}","received_events_url":"https://api.github.com/users/radio-astro-tools/received_events","type":"Organization","site_admin":false},"repo":{"id":18766007,"name":"spectral-cube","full_name":"radio-astro-tools/spectral-cube","owner":{"login":"radio-astro-tools","id":7228695,"avatar_url":"https://avatars.githubusercontent.com/u/7228695?v=3","gravatar_id":"","url":"https://api.github.com/users/radio-astro-tools","html_url":"https://github.com/radio-astro-tools","followers_url":"https://api.github.com/users/radio-astro-tools/followers","following_url":"https://api.github.com/users/radio-astro-tools/following{/other_user}","gists_url":"https://api.github.com/users/radio-astro-tools/gists{/gist_id}","starred_url":"https://api.github.com/users/radio-astro-tools/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/radio-astro-tools/subscriptions","organizations_url":"https://api.github.com/users/radio-astro-tools/orgs","repos_url":"https://api.github.com/users/radio-astro-tools/repos","events_url":"https://api.github.com/users/radio-astro-tools/events{/privacy}","received_events_url":"https://api.github.com/users/radio-astro-tools/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/radio-astro-tools/spectral-cube","description":"Library for reading and analyzing astrophysical spectral data cubes","fork":false,"url":"https://api.github.com/repos/radio-astro-tools/spectral-cube","forks_url":"https://api.github.com/repos/radio-astro-tools/spectral-cube/forks","keys_url":"https://api.github.com/repos/radio-astro-tools/spectral-cube/keys{/key_id}","collaborators_url":"https://api.github.com/repos/radio-astro-tools/spectral-cube/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/radio-astro-tools/spectral-cube/teams","hooks_url":"https://api.github.com/repos/radio-astro-tools/spectral-cube/hooks","issue_events_url":"https://api.github.com/repos/radio-astro-tools/spectral-cube/issues/events{/number}","events_url":"https://api.github.com/repos/radio-astro-tools/spectral-cube/events","assignees_url":"https://api.github.com/repos/radio-astro-tools/spectral-cube/assignees{/user}","branches_url":"https://api.github.com/repos/radio-astro-tools/spectral-cube/branches{/branch}","tags_url":"https://api.github.com/repos/radio-astro-tools/spectral-cube/tags","blobs_url":"https://api.github.com/repos/radio-astro-tools/spectral-cube/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/radio-astro-tools/spectral-cube/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/radio-astro-tools/spectral-cube/git/refs{/sha}","trees_url":"https://api.github.com/repos/radio-astro-tools/spectral-cube/git/trees{/sha}","statuses_url":"https://api.github.com/repos/radio-astro-tools/spectral-cube/statuses/{sha}","languages_url":"https://api.github.com/repos/radio-astro-tools/spectral-cube/languages","stargazers_url":"https://api.github.com/repos/radio-astro-tools/spectral-cube/stargazers","contributors_url":"https://api.github.com/repos/radio-astro-tools/spectral-cube/contributors","subscribers_url":"https://api.github.com/repos/radio-astro-tools/spectral-cube/subscribers","subscription_url":"https://api.github.com/repos/radio-astro-tools/spectral-cube/subscription","commits_url":"https://api.github.com/repos/radio-astro-tools/spectral-cube/commits{/sha}","git_commits_url":"https://api.github.com/repos/radio-astro-tools/spectral-cube/git/commits{/sha}","comments_url":"https://api.github.com/repos/radio-astro-tools/spectral-cube/comments{/number}","issue_comment_url":"https://api.github.com/repos/radio-astro-tools/spectral-cube/issues/comments{/number}","contents_url":"https://api.github.com/repos/radio-astro-tools/spectral-cube/contents/{+path}","compare_url":"https://api.github.com/repos/radio-astro-tools/spectral-cube/compare/{base}...{head}","merges_url":"https://api.github.com/repos/radio-astro-tools/spectral-cube/merges","archive_url":"https://api.github.com/repos/radio-astro-tools/spectral-cube/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/radio-astro-tools/spectral-cube/downloads","issues_url":"https://api.github.com/repos/radio-astro-tools/spectral-cube/issues{/number}","pulls_url":"https://api.github.com/repos/radio-astro-tools/spectral-cube/pulls{/number}","milestones_url":"https://api.github.com/repos/radio-astro-tools/spectral-cube/milestones{/number}","notifications_url":"https://api.github.com/repos/radio-astro-tools/spectral-cube/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/radio-astro-tools/spectral-cube/labels{/name}","releases_url":"https://api.github.com/repos/radio-astro-tools/spectral-cube/releases{/id}","created_at":"2014-04-14T15:33:50Z","updated_at":"2015-07-15T19:48:33Z","pushed_at":"2016-01-08T06:37:53Z","git_url":"git://github.com/radio-astro-tools/spectral-cube.git","ssh_url":"git@github.com:radio-astro-tools/spectral-cube.git","clone_url":"https://github.com/radio-astro-tools/spectral-cube.git","svn_url":"https://github.com/radio-astro-tools/spectral-cube","homepage":"http://spectral-cube.rtfd.org","size":1524,"stargazers_count":7,"watchers_count":7,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":15,"mirror_url":null,"open_issues_count":61,"forks":15,"open_issues":61,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/radio-astro-tools/spectral-cube/pulls/249"},"html":{"href":"https://github.com/radio-astro-tools/spectral-cube/pull/249"},"issue":{"href":"https://api.github.com/repos/radio-astro-tools/spectral-cube/issues/249"},"comments":{"href":"https://api.github.com/repos/radio-astro-tools/spectral-cube/issues/249/comments"},"review_comments":{"href":"https://api.github.com/repos/radio-astro-tools/spectral-cube/pulls/249/comments"},"review_comment":{"href":"https://api.github.com/repos/radio-astro-tools/spectral-cube/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/radio-astro-tools/spectral-cube/pulls/249/commits"},"statuses":{"href":"https://api.github.com/repos/radio-astro-tools/spectral-cube/statuses/54d65aec750a04902efc5871aa259dba8487c1f0"}}}}