{"action":"created","comment":{"url":"https://api.github.com/repos/STScI-JWST/jwst/pulls/comments/185807947","pull_request_review_id":117271973,"id":185807947,"diff_hunk":"@@ -685,28 +681,53 @@ def setup_IFUCube(self,j):\n         err_cube = np.zeros((naxis3, naxis2, naxis1))\n \n         IFUCube = datamodels.IFUCubeModel(data=data, dq=dq_cube, err=err_cube, weightmap=idata)\n-\n         IFUCube.update(self.input_models[j])\n-\n         IFUCube.meta.filename = self.output_name\n-\n+        \n+        self.blend_output_metadata(IFUCube)\n+#______________________________________________________________________\n         if self.output_type == 'single':\n             with datamodels.open(self.input_models[j]) as input:\n-\n                 # define the cubename for each single\n                 filename = self.input_filenames[j]\n                 indx = filename.rfind('.fits')\n                 self.output_name_base = filename[:indx]\n                 self.output_file = None\n-                newname  = IFUCubeData.define_cubename(self)\n+                newname  = self.define_cubename()\n                 IFUCube.meta.filename = newname\n-                # need to set what type of SINGLE IFU Cube is being created in header\n-                # this information is needed in the blotting stage\n-                if(self.instrument == 'MIRI'):\n-                    IFUCube.meta.instrument.channel = self.list_par1[0]\n-                if(self.instrument == 'NIRSPEC'):\n-                    IFUCube.meta.instrument.grating = self.list_par1[0]\n \n+#______________________________________________________________________\n+# fill in Channel, Band for MIRI\n+        if self.instrument == 'MIRI':\n+            # fill in Channel output meta data\n+            num_ch = len(self.list_par1)\n+            IFUCube.meta.instrument.channel = self.list_par1[0]\n+            num_ch = len(self.list_par1)\n+            for j in range (1, num_ch):\n+                IFUCube.meta.instrument.channel =  IFUCube.meta.instrument.channel + str(self.list_par1[j])\n+\n+            # fill in Band output meta  data","path":"jwst/cube_build/ifu_cube.py","position":141,"original_position":141,"commit_id":"ae62d78b6b79524a330e1e17c8c2231917c183d5","original_commit_id":"ae62d78b6b79524a330e1e17c8c2231917c183d5","user":{"login":"hbushouse","id":12860084,"avatar_url":"https://avatars1.githubusercontent.com/u/12860084?v=4","gravatar_id":"","url":"https://api.github.com/users/hbushouse","html_url":"https://github.com/hbushouse","followers_url":"https://api.github.com/users/hbushouse/followers","following_url":"https://api.github.com/users/hbushouse/following{/other_user}","gists_url":"https://api.github.com/users/hbushouse/gists{/gist_id}","starred_url":"https://api.github.com/users/hbushouse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hbushouse/subscriptions","organizations_url":"https://api.github.com/users/hbushouse/orgs","repos_url":"https://api.github.com/users/hbushouse/repos","events_url":"https://api.github.com/users/hbushouse/events{/privacy}","received_events_url":"https://api.github.com/users/hbushouse/received_events","type":"User","site_admin":false},"body":"I've confirmed by looking at the model_blenders rules that the \"multi\" rule will do exactly what we want here (and exactly what you're doing in this block of code. The \"multi\" rule determines the number of unique values in the input list and if there's only 1 unique value, it sets the output keyword to that value. If there are multiple unique values, it sets the output keyword value to \"MULTIPLE\". So you can remove this block of code for the BAND keyword and add \"blend_rule: multi\" to the BAND keyword definition in core.schema.yaml (see below).","created_at":"2018-05-03T14:01:53Z","updated_at":"2018-05-03T14:01:53Z","html_url":"https://github.com/STScI-JWST/jwst/pull/1955#discussion_r185807947","pull_request_url":"https://api.github.com/repos/STScI-JWST/jwst/pulls/1955","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/STScI-JWST/jwst/pulls/comments/185807947"},"html":{"href":"https://github.com/STScI-JWST/jwst/pull/1955#discussion_r185807947"},"pull_request":{"href":"https://api.github.com/repos/STScI-JWST/jwst/pulls/1955"}}},"pull_request":{"url":"https://api.github.com/repos/STScI-JWST/jwst/pulls/1955","id":184492455,"html_url":"https://github.com/STScI-JWST/jwst/pull/1955","diff_url":"https://github.com/STScI-JWST/jwst/pull/1955.diff","patch_url":"https://github.com/STScI-JWST/jwst/pull/1955.patch","issue_url":"https://api.github.com/repos/STScI-JWST/jwst/issues/1955","number":1955,"state":"open","locked":false,"title":"add model blender","user":{"login":"jemorrison","id":18491225,"avatar_url":"https://avatars3.githubusercontent.com/u/18491225?v=4","gravatar_id":"","url":"https://api.github.com/users/jemorrison","html_url":"https://github.com/jemorrison","followers_url":"https://api.github.com/users/jemorrison/followers","following_url":"https://api.github.com/users/jemorrison/following{/other_user}","gists_url":"https://api.github.com/users/jemorrison/gists{/gist_id}","starred_url":"https://api.github.com/users/jemorrison/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jemorrison/subscriptions","organizations_url":"https://api.github.com/users/jemorrison/orgs","repos_url":"https://api.github.com/users/jemorrison/repos","events_url":"https://api.github.com/users/jemorrison/events{/privacy}","received_events_url":"https://api.github.com/users/jemorrison/received_events","type":"User","site_admin":false},"body":"Added model blender to cube_build.\r\nI still need to add functions to override some of the values (for example, Channel)\r\n\r\n@hbushouse \r\n@stsci-hack ","created_at":"2018-04-26T23:51:27Z","updated_at":"2018-05-03T14:01:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"eb8b1bd8440a71b72cba9f42674ecd9fb29ca83e","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":692373261,"url":"https://api.github.com/repos/STScI-JWST/jwst/labels/blend%20headers","name":"blend headers","color":"fef2c0","default":false},{"id":390242547,"url":"https://api.github.com/repos/STScI-JWST/jwst/labels/cube_build","name":"cube_build","color":"0e8a16","default":false}],"milestone":{"url":"https://api.github.com/repos/STScI-JWST/jwst/milestones/6","html_url":"https://github.com/STScI-JWST/jwst/milestone/6","labels_url":"https://api.github.com/repos/STScI-JWST/jwst/milestones/6/labels","id":2946419,"number":6,"title":"Build 7.1.3","description":"Patch build. SCSB development due 11-May-2018.","creator":{"login":"hbushouse","id":12860084,"avatar_url":"https://avatars1.githubusercontent.com/u/12860084?v=4","gravatar_id":"","url":"https://api.github.com/users/hbushouse","html_url":"https://github.com/hbushouse","followers_url":"https://api.github.com/users/hbushouse/followers","following_url":"https://api.github.com/users/hbushouse/following{/other_user}","gists_url":"https://api.github.com/users/hbushouse/gists{/gist_id}","starred_url":"https://api.github.com/users/hbushouse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hbushouse/subscriptions","organizations_url":"https://api.github.com/users/hbushouse/orgs","repos_url":"https://api.github.com/users/hbushouse/repos","events_url":"https://api.github.com/users/hbushouse/events{/privacy}","received_events_url":"https://api.github.com/users/hbushouse/received_events","type":"User","site_admin":false},"open_issues":21,"closed_issues":207,"state":"open","created_at":"2017-11-29T12:14:10Z","updated_at":"2018-05-02T18:49:23Z","due_on":"2018-05-11T07:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/STScI-JWST/jwst/pulls/1955/commits","review_comments_url":"https://api.github.com/repos/STScI-JWST/jwst/pulls/1955/comments","review_comment_url":"https://api.github.com/repos/STScI-JWST/jwst/pulls/comments{/number}","comments_url":"https://api.github.com/repos/STScI-JWST/jwst/issues/1955/comments","statuses_url":"https://api.github.com/repos/STScI-JWST/jwst/statuses/ae62d78b6b79524a330e1e17c8c2231917c183d5","head":{"label":"jemorrison:cube_build_blend_headers","ref":"cube_build_blend_headers","sha":"ae62d78b6b79524a330e1e17c8c2231917c183d5","user":{"login":"jemorrison","id":18491225,"avatar_url":"https://avatars3.githubusercontent.com/u/18491225?v=4","gravatar_id":"","url":"https://api.github.com/users/jemorrison","html_url":"https://github.com/jemorrison","followers_url":"https://api.github.com/users/jemorrison/followers","following_url":"https://api.github.com/users/jemorrison/following{/other_user}","gists_url":"https://api.github.com/users/jemorrison/gists{/gist_id}","starred_url":"https://api.github.com/users/jemorrison/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jemorrison/subscriptions","organizations_url":"https://api.github.com/users/jemorrison/orgs","repos_url":"https://api.github.com/users/jemorrison/repos","events_url":"https://api.github.com/users/jemorrison/events{/privacy}","received_events_url":"https://api.github.com/users/jemorrison/received_events","type":"User","site_admin":false},"repo":{"id":60788380,"name":"jwst","full_name":"jemorrison/jwst","owner":{"login":"jemorrison","id":18491225,"avatar_url":"https://avatars3.githubusercontent.com/u/18491225?v=4","gravatar_id":"","url":"https://api.github.com/users/jemorrison","html_url":"https://github.com/jemorrison","followers_url":"https://api.github.com/users/jemorrison/followers","following_url":"https://api.github.com/users/jemorrison/following{/other_user}","gists_url":"https://api.github.com/users/jemorrison/gists{/gist_id}","starred_url":"https://api.github.com/users/jemorrison/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jemorrison/subscriptions","organizations_url":"https://api.github.com/users/jemorrison/orgs","repos_url":"https://api.github.com/users/jemorrison/repos","events_url":"https://api.github.com/users/jemorrison/events{/privacy}","received_events_url":"https://api.github.com/users/jemorrison/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jemorrison/jwst","description":null,"fork":true,"url":"https://api.github.com/repos/jemorrison/jwst","forks_url":"https://api.github.com/repos/jemorrison/jwst/forks","keys_url":"https://api.github.com/repos/jemorrison/jwst/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jemorrison/jwst/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jemorrison/jwst/teams","hooks_url":"https://api.github.com/repos/jemorrison/jwst/hooks","issue_events_url":"https://api.github.com/repos/jemorrison/jwst/issues/events{/number}","events_url":"https://api.github.com/repos/jemorrison/jwst/events","assignees_url":"https://api.github.com/repos/jemorrison/jwst/assignees{/user}","branches_url":"https://api.github.com/repos/jemorrison/jwst/branches{/branch}","tags_url":"https://api.github.com/repos/jemorrison/jwst/tags","blobs_url":"https://api.github.com/repos/jemorrison/jwst/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jemorrison/jwst/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jemorrison/jwst/git/refs{/sha}","trees_url":"https://api.github.com/repos/jemorrison/jwst/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jemorrison/jwst/statuses/{sha}","languages_url":"https://api.github.com/repos/jemorrison/jwst/languages","stargazers_url":"https://api.github.com/repos/jemorrison/jwst/stargazers","contributors_url":"https://api.github.com/repos/jemorrison/jwst/contributors","subscribers_url":"https://api.github.com/repos/jemorrison/jwst/subscribers","subscription_url":"https://api.github.com/repos/jemorrison/jwst/subscription","commits_url":"https://api.github.com/repos/jemorrison/jwst/commits{/sha}","git_commits_url":"https://api.github.com/repos/jemorrison/jwst/git/commits{/sha}","comments_url":"https://api.github.com/repos/jemorrison/jwst/comments{/number}","issue_comment_url":"https://api.github.com/repos/jemorrison/jwst/issues/comments{/number}","contents_url":"https://api.github.com/repos/jemorrison/jwst/contents/{+path}","compare_url":"https://api.github.com/repos/jemorrison/jwst/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jemorrison/jwst/merges","archive_url":"https://api.github.com/repos/jemorrison/jwst/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jemorrison/jwst/downloads","issues_url":"https://api.github.com/repos/jemorrison/jwst/issues{/number}","pulls_url":"https://api.github.com/repos/jemorrison/jwst/pulls{/number}","milestones_url":"https://api.github.com/repos/jemorrison/jwst/milestones{/number}","notifications_url":"https://api.github.com/repos/jemorrison/jwst/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jemorrison/jwst/labels{/name}","releases_url":"https://api.github.com/repos/jemorrison/jwst/releases{/id}","deployments_url":"https://api.github.com/repos/jemorrison/jwst/deployments","created_at":"2016-06-09T16:08:52Z","updated_at":"2018-04-26T16:58:44Z","pushed_at":"2018-05-02T18:44:27Z","git_url":"git://github.com/jemorrison/jwst.git","ssh_url":"git@github.com:jemorrison/jwst.git","clone_url":"https://github.com/jemorrison/jwst.git","svn_url":"https://github.com/jemorrison/jwst","homepage":null,"size":67225,"stargazers_count":0,"watchers_count":0,"language":"Jupyter Notebook","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"STScI-JWST:master","ref":"master","sha":"99d504218042fe2d11925f25663d6dae7a3e1e13","user":{"login":"STScI-JWST","id":17731768,"avatar_url":"https://avatars0.githubusercontent.com/u/17731768?v=4","gravatar_id":"","url":"https://api.github.com/users/STScI-JWST","html_url":"https://github.com/STScI-JWST","followers_url":"https://api.github.com/users/STScI-JWST/followers","following_url":"https://api.github.com/users/STScI-JWST/following{/other_user}","gists_url":"https://api.github.com/users/STScI-JWST/gists{/gist_id}","starred_url":"https://api.github.com/users/STScI-JWST/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/STScI-JWST/subscriptions","organizations_url":"https://api.github.com/users/STScI-JWST/orgs","repos_url":"https://api.github.com/users/STScI-JWST/repos","events_url":"https://api.github.com/users/STScI-JWST/events{/privacy}","received_events_url":"https://api.github.com/users/STScI-JWST/received_events","type":"Organization","site_admin":false},"repo":{"id":60551519,"name":"jwst","full_name":"STScI-JWST/jwst","owner":{"login":"STScI-JWST","id":17731768,"avatar_url":"https://avatars0.githubusercontent.com/u/17731768?v=4","gravatar_id":"","url":"https://api.github.com/users/STScI-JWST","html_url":"https://github.com/STScI-JWST","followers_url":"https://api.github.com/users/STScI-JWST/followers","following_url":"https://api.github.com/users/STScI-JWST/following{/other_user}","gists_url":"https://api.github.com/users/STScI-JWST/gists{/gist_id}","starred_url":"https://api.github.com/users/STScI-JWST/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/STScI-JWST/subscriptions","organizations_url":"https://api.github.com/users/STScI-JWST/orgs","repos_url":"https://api.github.com/users/STScI-JWST/repos","events_url":"https://api.github.com/users/STScI-JWST/events{/privacy}","received_events_url":"https://api.github.com/users/STScI-JWST/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/STScI-JWST/jwst","description":"JWST Calibration Pipeline","fork":false,"url":"https://api.github.com/repos/STScI-JWST/jwst","forks_url":"https://api.github.com/repos/STScI-JWST/jwst/forks","keys_url":"https://api.github.com/repos/STScI-JWST/jwst/keys{/key_id}","collaborators_url":"https://api.github.com/repos/STScI-JWST/jwst/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/STScI-JWST/jwst/teams","hooks_url":"https://api.github.com/repos/STScI-JWST/jwst/hooks","issue_events_url":"https://api.github.com/repos/STScI-JWST/jwst/issues/events{/number}","events_url":"https://api.github.com/repos/STScI-JWST/jwst/events","assignees_url":"https://api.github.com/repos/STScI-JWST/jwst/assignees{/user}","branches_url":"https://api.github.com/repos/STScI-JWST/jwst/branches{/branch}","tags_url":"https://api.github.com/repos/STScI-JWST/jwst/tags","blobs_url":"https://api.github.com/repos/STScI-JWST/jwst/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/STScI-JWST/jwst/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/STScI-JWST/jwst/git/refs{/sha}","trees_url":"https://api.github.com/repos/STScI-JWST/jwst/git/trees{/sha}","statuses_url":"https://api.github.com/repos/STScI-JWST/jwst/statuses/{sha}","languages_url":"https://api.github.com/repos/STScI-JWST/jwst/languages","stargazers_url":"https://api.github.com/repos/STScI-JWST/jwst/stargazers","contributors_url":"https://api.github.com/repos/STScI-JWST/jwst/contributors","subscribers_url":"https://api.github.com/repos/STScI-JWST/jwst/subscribers","subscription_url":"https://api.github.com/repos/STScI-JWST/jwst/subscription","commits_url":"https://api.github.com/repos/STScI-JWST/jwst/commits{/sha}","git_commits_url":"https://api.github.com/repos/STScI-JWST/jwst/git/commits{/sha}","comments_url":"https://api.github.com/repos/STScI-JWST/jwst/comments{/number}","issue_comment_url":"https://api.github.com/repos/STScI-JWST/jwst/issues/comments{/number}","contents_url":"https://api.github.com/repos/STScI-JWST/jwst/contents/{+path}","compare_url":"https://api.github.com/repos/STScI-JWST/jwst/compare/{base}...{head}","merges_url":"https://api.github.com/repos/STScI-JWST/jwst/merges","archive_url":"https://api.github.com/repos/STScI-JWST/jwst/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/STScI-JWST/jwst/downloads","issues_url":"https://api.github.com/repos/STScI-JWST/jwst/issues{/number}","pulls_url":"https://api.github.com/repos/STScI-JWST/jwst/pulls{/number}","milestones_url":"https://api.github.com/repos/STScI-JWST/jwst/milestones{/number}","notifications_url":"https://api.github.com/repos/STScI-JWST/jwst/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/STScI-JWST/jwst/labels{/name}","releases_url":"https://api.github.com/repos/STScI-JWST/jwst/releases{/id}","deployments_url":"https://api.github.com/repos/STScI-JWST/jwst/deployments","created_at":"2016-06-06T18:34:23Z","updated_at":"2018-05-02T18:49:26Z","pushed_at":"2018-05-02T18:49:23Z","git_url":"git://github.com/STScI-JWST/jwst.git","ssh_url":"git@github.com:STScI-JWST/jwst.git","clone_url":"https://github.com/STScI-JWST/jwst.git","svn_url":"https://github.com/STScI-JWST/jwst","homepage":"","size":67444,"stargazers_count":42,"watchers_count":42,"language":"Jupyter Notebook","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":39,"mirror_url":null,"archived":false,"open_issues_count":207,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":39,"open_issues":207,"watchers":42,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/STScI-JWST/jwst/pulls/1955"},"html":{"href":"https://github.com/STScI-JWST/jwst/pull/1955"},"issue":{"href":"https://api.github.com/repos/STScI-JWST/jwst/issues/1955"},"comments":{"href":"https://api.github.com/repos/STScI-JWST/jwst/issues/1955/comments"},"review_comments":{"href":"https://api.github.com/repos/STScI-JWST/jwst/pulls/1955/comments"},"review_comment":{"href":"https://api.github.com/repos/STScI-JWST/jwst/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/STScI-JWST/jwst/pulls/1955/commits"},"statuses":{"href":"https://api.github.com/repos/STScI-JWST/jwst/statuses/ae62d78b6b79524a330e1e17c8c2231917c183d5"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"hbushouse"}}