{"action":"created","comment":{"url":"https://api.github.com/repos/PYPIT/PYPIT/pulls/comments/59540492","id":59540492,"diff_hunk":"@@ -462,37 +556,63 @@ def MasterTrace(self, fitsdict, det):\n             msgs.info(\"An identical master trace frame already exists\")\n             return False\n         if self._argflag['reduce']['usetrace'] in ['trace', 'blzflat']:\n-            msgs.info(\"Preparing a master trace frame with {0:s}\".format(self._argflag['reduce']['usetrace']))\n-            ind = self._idx_trace\n-            # Load the frames for tracing\n-            frames = arload.load_frames(self, fitsdict, ind, det, frametype='trace', msbias=self._msbias[det-1],\n-                                        trim=self._argflag['reduce']['trim'], transpose=self._transpose)\n-            if self._argflag['reduce']['flatmatch'] > 0.0:\n-                sframes = arsort.match_frames(frames, self._argflag['reduce']['flatmatch'], msgs, frametype='trace', satlevel=self._spect['det'][det-1]['saturation']*self._spect['det'][det-1]['nonlinear'])\n-                subframes = np.zeros((frames.shape[0], frames.shape[1], len(sframes)))\n-                numarr = np.array([])\n-                for i in xrange(len(sframes)):\n-                    numarr = np.append(numarr, sframes[i].shape[2])\n-                    mstrace = arcomb.comb_frames(sframes[i], det, spect=self._spect, frametype='trace', **self._argflag['trace']['comb'])\n-                    subframes[:,:,i] = mstrace.copy()\n-                del sframes\n-                # Combine all sub-frames\n-                mstrace = arcomb.comb_frames(subframes, det, spect=self._spect, frametype='trace', weights=numarr, **self._argflag['trace']['comb'])\n-                del subframes\n-            else:\n-                mstrace = arcomb.comb_frames(frames, det, spect=self._spect, frametype='trace', **self._argflag['trace']['comb'])\n-            del frames\n+            if self._argflag['masters']['use']:\n+                # Attempt to load the Master Frame\n+                mstrace_name = armasters.master_name(self._argflag['run']['masterdir'],\n+                                                   'trace', self._argflag['masters']['setup'])\n+                try:\n+                    mstrace, head = arload.load_master(mstrace_name, frametype=\"trace\")\n+                except IOError:\n+                    msgs.warn(\"No MasterTrac3 frame found {:s}\".format(mstrace_name))","path":"src/arsciexp.py","position":362,"original_position":362,"commit_id":"32182584b47d012ba1ad5056bf0e954e67b9c7af","original_commit_id":"32182584b47d012ba1ad5056bf0e954e67b9c7af","user":{"login":"profxj","id":3998093,"avatar_url":"https://avatars.githubusercontent.com/u/3998093?v=3","gravatar_id":"","url":"https://api.github.com/users/profxj","html_url":"https://github.com/profxj","followers_url":"https://api.github.com/users/profxj/followers","following_url":"https://api.github.com/users/profxj/following{/other_user}","gists_url":"https://api.github.com/users/profxj/gists{/gist_id}","starred_url":"https://api.github.com/users/profxj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/profxj/subscriptions","organizations_url":"https://api.github.com/users/profxj/orgs","repos_url":"https://api.github.com/users/profxj/repos","events_url":"https://api.github.com/users/profxj/events{/privacy}","received_events_url":"https://api.github.com/users/profxj/received_events","type":"User","site_admin":false},"body":"Fixed","created_at":"2016-04-13T12:44:04Z","updated_at":"2016-04-13T12:44:04Z","html_url":"https://github.com/PYPIT/PYPIT/pull/40#discussion_r59540492","pull_request_url":"https://api.github.com/repos/PYPIT/PYPIT/pulls/40","_links":{"self":{"href":"https://api.github.com/repos/PYPIT/PYPIT/pulls/comments/59540492"},"html":{"href":"https://github.com/PYPIT/PYPIT/pull/40#discussion_r59540492"},"pull_request":{"href":"https://api.github.com/repos/PYPIT/PYPIT/pulls/40"}}},"pull_request":{"url":"https://api.github.com/repos/PYPIT/PYPIT/pulls/40","id":66085463,"html_url":"https://github.com/PYPIT/PYPIT/pull/40","diff_url":"https://github.com/PYPIT/PYPIT/pull/40.diff","patch_url":"https://github.com/PYPIT/PYPIT/pull/40.patch","issue_url":"https://api.github.com/repos/PYPIT/PYPIT/issues/40","number":40,"state":"open","locked":false,"title":"Optimal and more","user":{"login":"profxj","id":3998093,"avatar_url":"https://avatars.githubusercontent.com/u/3998093?v=3","gravatar_id":"","url":"https://api.github.com/users/profxj","html_url":"https://github.com/profxj","followers_url":"https://api.github.com/users/profxj/followers","following_url":"https://api.github.com/users/profxj/following{/other_user}","gists_url":"https://api.github.com/users/profxj/gists{/gist_id}","starred_url":"https://api.github.com/users/profxj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/profxj/subscriptions","organizations_url":"https://api.github.com/users/profxj/orgs","repos_url":"https://api.github.com/users/profxj/repos","events_url":"https://api.github.com/users/profxj/events{/privacy}","received_events_url":"https://api.github.com/users/profxj/received_events","type":"User","site_admin":false},"body":"Object profile fitting (Gaussian) + QA\nOptimal extraction\n\nWriting and re-using MasterFrames\n'Setups' too\n\nSome bug fixes (e.g. robust_polyfit)\n\nToo much in this PR, I fear...","created_at":"2016-04-12T00:50:10Z","updated_at":"2016-04-13T12:44:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1467dfaa8aa80339f10be8ee496fe749f37d165d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/PYPIT/PYPIT/pulls/40/commits","review_comments_url":"https://api.github.com/repos/PYPIT/PYPIT/pulls/40/comments","review_comment_url":"https://api.github.com/repos/PYPIT/PYPIT/pulls/comments{/number}","comments_url":"https://api.github.com/repos/PYPIT/PYPIT/issues/40/comments","statuses_url":"https://api.github.com/repos/PYPIT/PYPIT/statuses/32182584b47d012ba1ad5056bf0e954e67b9c7af","head":{"label":"PYPIT:object_profile","ref":"object_profile","sha":"32182584b47d012ba1ad5056bf0e954e67b9c7af","user":{"login":"PYPIT","id":13422981,"avatar_url":"https://avatars.githubusercontent.com/u/13422981?v=3","gravatar_id":"","url":"https://api.github.com/users/PYPIT","html_url":"https://github.com/PYPIT","followers_url":"https://api.github.com/users/PYPIT/followers","following_url":"https://api.github.com/users/PYPIT/following{/other_user}","gists_url":"https://api.github.com/users/PYPIT/gists{/gist_id}","starred_url":"https://api.github.com/users/PYPIT/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PYPIT/subscriptions","organizations_url":"https://api.github.com/users/PYPIT/orgs","repos_url":"https://api.github.com/users/PYPIT/repos","events_url":"https://api.github.com/users/PYPIT/events{/privacy}","received_events_url":"https://api.github.com/users/PYPIT/received_events","type":"Organization","site_admin":false},"repo":{"id":36958428,"name":"PYPIT","full_name":"PYPIT/PYPIT","owner":{"login":"PYPIT","id":13422981,"avatar_url":"https://avatars.githubusercontent.com/u/13422981?v=3","gravatar_id":"","url":"https://api.github.com/users/PYPIT","html_url":"https://github.com/PYPIT","followers_url":"https://api.github.com/users/PYPIT/followers","following_url":"https://api.github.com/users/PYPIT/following{/other_user}","gists_url":"https://api.github.com/users/PYPIT/gists{/gist_id}","starred_url":"https://api.github.com/users/PYPIT/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PYPIT/subscriptions","organizations_url":"https://api.github.com/users/PYPIT/orgs","repos_url":"https://api.github.com/users/PYPIT/repos","events_url":"https://api.github.com/users/PYPIT/events{/privacy}","received_events_url":"https://api.github.com/users/PYPIT/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/PYPIT/PYPIT","description":"The Python Spectroscopic Data Reduction Pipeline","fork":false,"url":"https://api.github.com/repos/PYPIT/PYPIT","forks_url":"https://api.github.com/repos/PYPIT/PYPIT/forks","keys_url":"https://api.github.com/repos/PYPIT/PYPIT/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PYPIT/PYPIT/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PYPIT/PYPIT/teams","hooks_url":"https://api.github.com/repos/PYPIT/PYPIT/hooks","issue_events_url":"https://api.github.com/repos/PYPIT/PYPIT/issues/events{/number}","events_url":"https://api.github.com/repos/PYPIT/PYPIT/events","assignees_url":"https://api.github.com/repos/PYPIT/PYPIT/assignees{/user}","branches_url":"https://api.github.com/repos/PYPIT/PYPIT/branches{/branch}","tags_url":"https://api.github.com/repos/PYPIT/PYPIT/tags","blobs_url":"https://api.github.com/repos/PYPIT/PYPIT/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PYPIT/PYPIT/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PYPIT/PYPIT/git/refs{/sha}","trees_url":"https://api.github.com/repos/PYPIT/PYPIT/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PYPIT/PYPIT/statuses/{sha}","languages_url":"https://api.github.com/repos/PYPIT/PYPIT/languages","stargazers_url":"https://api.github.com/repos/PYPIT/PYPIT/stargazers","contributors_url":"https://api.github.com/repos/PYPIT/PYPIT/contributors","subscribers_url":"https://api.github.com/repos/PYPIT/PYPIT/subscribers","subscription_url":"https://api.github.com/repos/PYPIT/PYPIT/subscription","commits_url":"https://api.github.com/repos/PYPIT/PYPIT/commits{/sha}","git_commits_url":"https://api.github.com/repos/PYPIT/PYPIT/git/commits{/sha}","comments_url":"https://api.github.com/repos/PYPIT/PYPIT/comments{/number}","issue_comment_url":"https://api.github.com/repos/PYPIT/PYPIT/issues/comments{/number}","contents_url":"https://api.github.com/repos/PYPIT/PYPIT/contents/{+path}","compare_url":"https://api.github.com/repos/PYPIT/PYPIT/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PYPIT/PYPIT/merges","archive_url":"https://api.github.com/repos/PYPIT/PYPIT/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PYPIT/PYPIT/downloads","issues_url":"https://api.github.com/repos/PYPIT/PYPIT/issues{/number}","pulls_url":"https://api.github.com/repos/PYPIT/PYPIT/pulls{/number}","milestones_url":"https://api.github.com/repos/PYPIT/PYPIT/milestones{/number}","notifications_url":"https://api.github.com/repos/PYPIT/PYPIT/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PYPIT/PYPIT/labels{/name}","releases_url":"https://api.github.com/repos/PYPIT/PYPIT/releases{/id}","deployments_url":"https://api.github.com/repos/PYPIT/PYPIT/deployments","created_at":"2015-06-05T22:25:37Z","updated_at":"2016-02-19T18:26:52Z","pushed_at":"2016-04-12T00:50:11Z","git_url":"git://github.com/PYPIT/PYPIT.git","ssh_url":"git@github.com:PYPIT/PYPIT.git","clone_url":"https://github.com/PYPIT/PYPIT.git","svn_url":"https://github.com/PYPIT/PYPIT","homepage":null,"size":11406,"stargazers_count":1,"watchers_count":1,"language":"Jupyter Notebook","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":17,"forks":3,"open_issues":17,"watchers":1,"default_branch":"master"}},"base":{"label":"PYPIT:master","ref":"master","sha":"bd309d88666ac07b0486cf243756c21eee445297","user":{"login":"PYPIT","id":13422981,"avatar_url":"https://avatars.githubusercontent.com/u/13422981?v=3","gravatar_id":"","url":"https://api.github.com/users/PYPIT","html_url":"https://github.com/PYPIT","followers_url":"https://api.github.com/users/PYPIT/followers","following_url":"https://api.github.com/users/PYPIT/following{/other_user}","gists_url":"https://api.github.com/users/PYPIT/gists{/gist_id}","starred_url":"https://api.github.com/users/PYPIT/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PYPIT/subscriptions","organizations_url":"https://api.github.com/users/PYPIT/orgs","repos_url":"https://api.github.com/users/PYPIT/repos","events_url":"https://api.github.com/users/PYPIT/events{/privacy}","received_events_url":"https://api.github.com/users/PYPIT/received_events","type":"Organization","site_admin":false},"repo":{"id":36958428,"name":"PYPIT","full_name":"PYPIT/PYPIT","owner":{"login":"PYPIT","id":13422981,"avatar_url":"https://avatars.githubusercontent.com/u/13422981?v=3","gravatar_id":"","url":"https://api.github.com/users/PYPIT","html_url":"https://github.com/PYPIT","followers_url":"https://api.github.com/users/PYPIT/followers","following_url":"https://api.github.com/users/PYPIT/following{/other_user}","gists_url":"https://api.github.com/users/PYPIT/gists{/gist_id}","starred_url":"https://api.github.com/users/PYPIT/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PYPIT/subscriptions","organizations_url":"https://api.github.com/users/PYPIT/orgs","repos_url":"https://api.github.com/users/PYPIT/repos","events_url":"https://api.github.com/users/PYPIT/events{/privacy}","received_events_url":"https://api.github.com/users/PYPIT/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/PYPIT/PYPIT","description":"The Python Spectroscopic Data Reduction Pipeline","fork":false,"url":"https://api.github.com/repos/PYPIT/PYPIT","forks_url":"https://api.github.com/repos/PYPIT/PYPIT/forks","keys_url":"https://api.github.com/repos/PYPIT/PYPIT/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PYPIT/PYPIT/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PYPIT/PYPIT/teams","hooks_url":"https://api.github.com/repos/PYPIT/PYPIT/hooks","issue_events_url":"https://api.github.com/repos/PYPIT/PYPIT/issues/events{/number}","events_url":"https://api.github.com/repos/PYPIT/PYPIT/events","assignees_url":"https://api.github.com/repos/PYPIT/PYPIT/assignees{/user}","branches_url":"https://api.github.com/repos/PYPIT/PYPIT/branches{/branch}","tags_url":"https://api.github.com/repos/PYPIT/PYPIT/tags","blobs_url":"https://api.github.com/repos/PYPIT/PYPIT/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PYPIT/PYPIT/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PYPIT/PYPIT/git/refs{/sha}","trees_url":"https://api.github.com/repos/PYPIT/PYPIT/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PYPIT/PYPIT/statuses/{sha}","languages_url":"https://api.github.com/repos/PYPIT/PYPIT/languages","stargazers_url":"https://api.github.com/repos/PYPIT/PYPIT/stargazers","contributors_url":"https://api.github.com/repos/PYPIT/PYPIT/contributors","subscribers_url":"https://api.github.com/repos/PYPIT/PYPIT/subscribers","subscription_url":"https://api.github.com/repos/PYPIT/PYPIT/subscription","commits_url":"https://api.github.com/repos/PYPIT/PYPIT/commits{/sha}","git_commits_url":"https://api.github.com/repos/PYPIT/PYPIT/git/commits{/sha}","comments_url":"https://api.github.com/repos/PYPIT/PYPIT/comments{/number}","issue_comment_url":"https://api.github.com/repos/PYPIT/PYPIT/issues/comments{/number}","contents_url":"https://api.github.com/repos/PYPIT/PYPIT/contents/{+path}","compare_url":"https://api.github.com/repos/PYPIT/PYPIT/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PYPIT/PYPIT/merges","archive_url":"https://api.github.com/repos/PYPIT/PYPIT/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PYPIT/PYPIT/downloads","issues_url":"https://api.github.com/repos/PYPIT/PYPIT/issues{/number}","pulls_url":"https://api.github.com/repos/PYPIT/PYPIT/pulls{/number}","milestones_url":"https://api.github.com/repos/PYPIT/PYPIT/milestones{/number}","notifications_url":"https://api.github.com/repos/PYPIT/PYPIT/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PYPIT/PYPIT/labels{/name}","releases_url":"https://api.github.com/repos/PYPIT/PYPIT/releases{/id}","deployments_url":"https://api.github.com/repos/PYPIT/PYPIT/deployments","created_at":"2015-06-05T22:25:37Z","updated_at":"2016-02-19T18:26:52Z","pushed_at":"2016-04-12T00:50:11Z","git_url":"git://github.com/PYPIT/PYPIT.git","ssh_url":"git@github.com:PYPIT/PYPIT.git","clone_url":"https://github.com/PYPIT/PYPIT.git","svn_url":"https://github.com/PYPIT/PYPIT","homepage":null,"size":11406,"stargazers_count":1,"watchers_count":1,"language":"Jupyter Notebook","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":17,"forks":3,"open_issues":17,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/PYPIT/PYPIT/pulls/40"},"html":{"href":"https://github.com/PYPIT/PYPIT/pull/40"},"issue":{"href":"https://api.github.com/repos/PYPIT/PYPIT/issues/40"},"comments":{"href":"https://api.github.com/repos/PYPIT/PYPIT/issues/40/comments"},"review_comments":{"href":"https://api.github.com/repos/PYPIT/PYPIT/pulls/40/comments"},"review_comment":{"href":"https://api.github.com/repos/PYPIT/PYPIT/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/PYPIT/PYPIT/pulls/40/commits"},"statuses":{"href":"https://api.github.com/repos/PYPIT/PYPIT/statuses/32182584b47d012ba1ad5056bf0e954e67b9c7af"}}}}