{"action":"created","comment":{"url":"https://api.github.com/repos/sunpy/sunpy/pulls/comments/23552677","id":23552677,"diff_hunk":"@@ -583,16 +605,490 @@ def _goes_get_chianti_em(longflux, temp, satellite=8, abundances=\"coronal\",\n     modelflux = np.asarray(modelflux)\n \n     # Ensure input values of flux ratio are within limits of model table\n-    if np.min(np.log10(temp)) < np.min(modeltemp) or \\\n-      np.max(np.log10(temp)) > np.max(modeltemp) or \\\n-      np.isnan(np.min(np.log10(temp))):\n+    if np.min(np.log10(temp.value)) < np.min(modeltemp) or \\\n+      np.max(np.log10(temp.value)) > np.max(modeltemp) or \\\n+      np.isnan(np.min(np.log10(temp.value))):\n         raise ValueError(\"All values in temp must be within the range \"\n                          \"{0} - {1} MK.\".format(np.min(10**modeltemp),\n                                                 np.max(10**modeltemp)))\n \n     # Perform spline fit to model data\n     spline = interpolate.splrep(modeltemp, modelflux, s=0)\n-    denom = interpolate.splev(np.log10(temp), spline, der=0)\n-    em = longflux/denom * 1e55\n+    denom = interpolate.splev(np.log10(temp.value), spline, der=0)","path":"sunpy/instr/goes.py","position":439,"original_position":439,"commit_id":"6b1895bdfe81e6194351a17d97a8e6ab093ee946","original_commit_id":"6b1895bdfe81e6194351a17d97a8e6ab093ee946","user":{"login":"DanRyanIrish","id":6806704,"avatar_url":"https://avatars.githubusercontent.com/u/6806704?v=3","gravatar_id":"","url":"https://api.github.com/users/DanRyanIrish","html_url":"https://github.com/DanRyanIrish","followers_url":"https://api.github.com/users/DanRyanIrish/followers","following_url":"https://api.github.com/users/DanRyanIrish/following{/other_user}","gists_url":"https://api.github.com/users/DanRyanIrish/gists{/gist_id}","starred_url":"https://api.github.com/users/DanRyanIrish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DanRyanIrish/subscriptions","organizations_url":"https://api.github.com/users/DanRyanIrish/orgs","repos_url":"https://api.github.com/users/DanRyanIrish/repos","events_url":"https://api.github.com/users/DanRyanIrish/events{/privacy}","received_events_url":"https://api.github.com/users/DanRyanIrish/received_events","type":"User","site_admin":false},"body":"Good suggestion.  I've made that change locally and will push it soon.","created_at":"2015-01-26T18:36:31Z","updated_at":"2015-01-26T18:36:31Z","html_url":"https://github.com/sunpy/sunpy/pull/1067#discussion_r23552677","pull_request_url":"https://api.github.com/repos/sunpy/sunpy/pulls/1067","_links":{"self":{"href":"https://api.github.com/repos/sunpy/sunpy/pulls/comments/23552677"},"html":{"href":"https://github.com/sunpy/sunpy/pull/1067#discussion_r23552677"},"pull_request":{"href":"https://api.github.com/repos/sunpy/sunpy/pulls/1067"}}},"pull_request":{"url":"https://api.github.com/repos/sunpy/sunpy/pulls/1067","id":17177563,"html_url":"https://github.com/sunpy/sunpy/pull/1067","diff_url":"https://github.com/sunpy/sunpy/pull/1067.diff","patch_url":"https://github.com/sunpy/sunpy/pull/1067.patch","issue_url":"https://api.github.com/repos/sunpy/sunpy/issues/1067","number":1067,"state":"open","locked":false,"title":"[Review]: Functions to calculate GOES radiative losses","user":{"login":"DanRyanIrish","id":6806704,"avatar_url":"https://avatars.githubusercontent.com/u/6806704?v=3","gravatar_id":"","url":"https://api.github.com/users/DanRyanIrish","html_url":"https://github.com/DanRyanIrish","followers_url":"https://api.github.com/users/DanRyanIrish/followers","following_url":"https://api.github.com/users/DanRyanIrish/following{/other_user}","gists_url":"https://api.github.com/users/DanRyanIrish/gists{/gist_id}","starred_url":"https://api.github.com/users/DanRyanIrish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DanRyanIrish/subscriptions","organizations_url":"https://api.github.com/users/DanRyanIrish/orgs","repos_url":"https://api.github.com/users/DanRyanIrish/repos","events_url":"https://api.github.com/users/DanRyanIrish/events{/privacy}","received_events_url":"https://api.github.com/users/DanRyanIrish/received_events","type":"User","site_admin":false},"body":"Hi guys,\r\n    Here is the next batch of software for analysing GOES data in sunpy.  This PR includes functions to calculate the radiative losses from the GOES-observed plasma, calc_rad_loss(), and the X-ray luminosity in the wavelength ranges of the two GOES channels, goes_lx().  There are also two functions which allows these properties to be calculated and inserted directly into and GOESLightCurve object, rad_loss_rate() and xray_luminosity, respectively.\r\n\r\nLet me know what you guys think.  For instance, there is probably a better place than goes.py to put _time_steps(), which calculates the time differences between successive measurement times.  I'm also not sure if the assert statements in my units tests are the most efficient.  \r\n\r\nHowever, all the function give the correct results.  If the functionality proposed here can be merged, sunpy could allow you to do all the analysis of GOES data that is possible in SSW which I think would be a great step forward.","created_at":"2014-06-16T13:28:14Z","updated_at":"2015-01-26T18:36:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2f26ed77c11e3004450a2de1e1259e5dee18de47","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/sunpy/sunpy/pulls/1067/commits","review_comments_url":"https://api.github.com/repos/sunpy/sunpy/pulls/1067/comments","review_comment_url":"https://api.github.com/repos/sunpy/sunpy/pulls/comments/{number}","comments_url":"https://api.github.com/repos/sunpy/sunpy/issues/1067/comments","statuses_url":"https://api.github.com/repos/sunpy/sunpy/statuses/6b1895bdfe81e6194351a17d97a8e6ab093ee946","head":{"label":"DanRyanIrish:goes_radloss","ref":"goes_radloss","sha":"6b1895bdfe81e6194351a17d97a8e6ab093ee946","user":{"login":"DanRyanIrish","id":6806704,"avatar_url":"https://avatars.githubusercontent.com/u/6806704?v=3","gravatar_id":"","url":"https://api.github.com/users/DanRyanIrish","html_url":"https://github.com/DanRyanIrish","followers_url":"https://api.github.com/users/DanRyanIrish/followers","following_url":"https://api.github.com/users/DanRyanIrish/following{/other_user}","gists_url":"https://api.github.com/users/DanRyanIrish/gists{/gist_id}","starred_url":"https://api.github.com/users/DanRyanIrish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DanRyanIrish/subscriptions","organizations_url":"https://api.github.com/users/DanRyanIrish/orgs","repos_url":"https://api.github.com/users/DanRyanIrish/repos","events_url":"https://api.github.com/users/DanRyanIrish/events{/privacy}","received_events_url":"https://api.github.com/users/DanRyanIrish/received_events","type":"User","site_admin":false},"repo":{"id":18759600,"name":"sunpy","full_name":"DanRyanIrish/sunpy","owner":{"login":"DanRyanIrish","id":6806704,"avatar_url":"https://avatars.githubusercontent.com/u/6806704?v=3","gravatar_id":"","url":"https://api.github.com/users/DanRyanIrish","html_url":"https://github.com/DanRyanIrish","followers_url":"https://api.github.com/users/DanRyanIrish/followers","following_url":"https://api.github.com/users/DanRyanIrish/following{/other_user}","gists_url":"https://api.github.com/users/DanRyanIrish/gists{/gist_id}","starred_url":"https://api.github.com/users/DanRyanIrish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DanRyanIrish/subscriptions","organizations_url":"https://api.github.com/users/DanRyanIrish/orgs","repos_url":"https://api.github.com/users/DanRyanIrish/repos","events_url":"https://api.github.com/users/DanRyanIrish/events{/privacy}","received_events_url":"https://api.github.com/users/DanRyanIrish/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/DanRyanIrish/sunpy","description":"SunPy - Python for solar physics","fork":true,"url":"https://api.github.com/repos/DanRyanIrish/sunpy","forks_url":"https://api.github.com/repos/DanRyanIrish/sunpy/forks","keys_url":"https://api.github.com/repos/DanRyanIrish/sunpy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DanRyanIrish/sunpy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DanRyanIrish/sunpy/teams","hooks_url":"https://api.github.com/repos/DanRyanIrish/sunpy/hooks","issue_events_url":"https://api.github.com/repos/DanRyanIrish/sunpy/issues/events{/number}","events_url":"https://api.github.com/repos/DanRyanIrish/sunpy/events","assignees_url":"https://api.github.com/repos/DanRyanIrish/sunpy/assignees{/user}","branches_url":"https://api.github.com/repos/DanRyanIrish/sunpy/branches{/branch}","tags_url":"https://api.github.com/repos/DanRyanIrish/sunpy/tags","blobs_url":"https://api.github.com/repos/DanRyanIrish/sunpy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DanRyanIrish/sunpy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DanRyanIrish/sunpy/git/refs{/sha}","trees_url":"https://api.github.com/repos/DanRyanIrish/sunpy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DanRyanIrish/sunpy/statuses/{sha}","languages_url":"https://api.github.com/repos/DanRyanIrish/sunpy/languages","stargazers_url":"https://api.github.com/repos/DanRyanIrish/sunpy/stargazers","contributors_url":"https://api.github.com/repos/DanRyanIrish/sunpy/contributors","subscribers_url":"https://api.github.com/repos/DanRyanIrish/sunpy/subscribers","subscription_url":"https://api.github.com/repos/DanRyanIrish/sunpy/subscription","commits_url":"https://api.github.com/repos/DanRyanIrish/sunpy/commits{/sha}","git_commits_url":"https://api.github.com/repos/DanRyanIrish/sunpy/git/commits{/sha}","comments_url":"https://api.github.com/repos/DanRyanIrish/sunpy/comments{/number}","issue_comment_url":"https://api.github.com/repos/DanRyanIrish/sunpy/issues/comments/{number}","contents_url":"https://api.github.com/repos/DanRyanIrish/sunpy/contents/{+path}","compare_url":"https://api.github.com/repos/DanRyanIrish/sunpy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DanRyanIrish/sunpy/merges","archive_url":"https://api.github.com/repos/DanRyanIrish/sunpy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DanRyanIrish/sunpy/downloads","issues_url":"https://api.github.com/repos/DanRyanIrish/sunpy/issues{/number}","pulls_url":"https://api.github.com/repos/DanRyanIrish/sunpy/pulls{/number}","milestones_url":"https://api.github.com/repos/DanRyanIrish/sunpy/milestones{/number}","notifications_url":"https://api.github.com/repos/DanRyanIrish/sunpy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DanRyanIrish/sunpy/labels{/name}","releases_url":"https://api.github.com/repos/DanRyanIrish/sunpy/releases{/id}","created_at":"2014-04-14T12:22:20Z","updated_at":"2014-08-05T14:57:00Z","pushed_at":"2015-01-26T14:59:26Z","git_url":"git://github.com/DanRyanIrish/sunpy.git","ssh_url":"git@github.com:DanRyanIrish/sunpy.git","clone_url":"https://github.com/DanRyanIrish/sunpy.git","svn_url":"https://github.com/DanRyanIrish/sunpy","homepage":"http://www.sunpy.org","size":34842,"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":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"sunpy:master","ref":"master","sha":"d78cd4b8a370cf101bd99bcc645e5d0caec143b2","user":{"login":"sunpy","id":963197,"avatar_url":"https://avatars.githubusercontent.com/u/963197?v=3","gravatar_id":"","url":"https://api.github.com/users/sunpy","html_url":"https://github.com/sunpy","followers_url":"https://api.github.com/users/sunpy/followers","following_url":"https://api.github.com/users/sunpy/following{/other_user}","gists_url":"https://api.github.com/users/sunpy/gists{/gist_id}","starred_url":"https://api.github.com/users/sunpy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sunpy/subscriptions","organizations_url":"https://api.github.com/users/sunpy/orgs","repos_url":"https://api.github.com/users/sunpy/repos","events_url":"https://api.github.com/users/sunpy/events{/privacy}","received_events_url":"https://api.github.com/users/sunpy/received_events","type":"Organization","site_admin":false},"repo":{"id":2165383,"name":"sunpy","full_name":"sunpy/sunpy","owner":{"login":"sunpy","id":963197,"avatar_url":"https://avatars.githubusercontent.com/u/963197?v=3","gravatar_id":"","url":"https://api.github.com/users/sunpy","html_url":"https://github.com/sunpy","followers_url":"https://api.github.com/users/sunpy/followers","following_url":"https://api.github.com/users/sunpy/following{/other_user}","gists_url":"https://api.github.com/users/sunpy/gists{/gist_id}","starred_url":"https://api.github.com/users/sunpy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sunpy/subscriptions","organizations_url":"https://api.github.com/users/sunpy/orgs","repos_url":"https://api.github.com/users/sunpy/repos","events_url":"https://api.github.com/users/sunpy/events{/privacy}","received_events_url":"https://api.github.com/users/sunpy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sunpy/sunpy","description":"SunPy - Python for solar physics","fork":false,"url":"https://api.github.com/repos/sunpy/sunpy","forks_url":"https://api.github.com/repos/sunpy/sunpy/forks","keys_url":"https://api.github.com/repos/sunpy/sunpy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sunpy/sunpy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sunpy/sunpy/teams","hooks_url":"https://api.github.com/repos/sunpy/sunpy/hooks","issue_events_url":"https://api.github.com/repos/sunpy/sunpy/issues/events{/number}","events_url":"https://api.github.com/repos/sunpy/sunpy/events","assignees_url":"https://api.github.com/repos/sunpy/sunpy/assignees{/user}","branches_url":"https://api.github.com/repos/sunpy/sunpy/branches{/branch}","tags_url":"https://api.github.com/repos/sunpy/sunpy/tags","blobs_url":"https://api.github.com/repos/sunpy/sunpy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sunpy/sunpy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sunpy/sunpy/git/refs{/sha}","trees_url":"https://api.github.com/repos/sunpy/sunpy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sunpy/sunpy/statuses/{sha}","languages_url":"https://api.github.com/repos/sunpy/sunpy/languages","stargazers_url":"https://api.github.com/repos/sunpy/sunpy/stargazers","contributors_url":"https://api.github.com/repos/sunpy/sunpy/contributors","subscribers_url":"https://api.github.com/repos/sunpy/sunpy/subscribers","subscription_url":"https://api.github.com/repos/sunpy/sunpy/subscription","commits_url":"https://api.github.com/repos/sunpy/sunpy/commits{/sha}","git_commits_url":"https://api.github.com/repos/sunpy/sunpy/git/commits{/sha}","comments_url":"https://api.github.com/repos/sunpy/sunpy/comments{/number}","issue_comment_url":"https://api.github.com/repos/sunpy/sunpy/issues/comments/{number}","contents_url":"https://api.github.com/repos/sunpy/sunpy/contents/{+path}","compare_url":"https://api.github.com/repos/sunpy/sunpy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sunpy/sunpy/merges","archive_url":"https://api.github.com/repos/sunpy/sunpy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sunpy/sunpy/downloads","issues_url":"https://api.github.com/repos/sunpy/sunpy/issues{/number}","pulls_url":"https://api.github.com/repos/sunpy/sunpy/pulls{/number}","milestones_url":"https://api.github.com/repos/sunpy/sunpy/milestones{/number}","notifications_url":"https://api.github.com/repos/sunpy/sunpy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sunpy/sunpy/labels{/name}","releases_url":"https://api.github.com/repos/sunpy/sunpy/releases{/id}","created_at":"2011-08-06T15:34:08Z","updated_at":"2015-01-26T17:14:27Z","pushed_at":"2015-01-26T17:14:27Z","git_url":"git://github.com/sunpy/sunpy.git","ssh_url":"git@github.com:sunpy/sunpy.git","clone_url":"https://github.com/sunpy/sunpy.git","svn_url":"https://github.com/sunpy/sunpy","homepage":"http://www.sunpy.org","size":141784,"stargazers_count":151,"watchers_count":151,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":107,"mirror_url":null,"open_issues_count":180,"forks":107,"open_issues":180,"watchers":151,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sunpy/sunpy/pulls/1067"},"html":{"href":"https://github.com/sunpy/sunpy/pull/1067"},"issue":{"href":"https://api.github.com/repos/sunpy/sunpy/issues/1067"},"comments":{"href":"https://api.github.com/repos/sunpy/sunpy/issues/1067/comments"},"review_comments":{"href":"https://api.github.com/repos/sunpy/sunpy/pulls/1067/comments"},"review_comment":{"href":"https://api.github.com/repos/sunpy/sunpy/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/sunpy/sunpy/pulls/1067/commits"},"statuses":{"href":"https://api.github.com/repos/sunpy/sunpy/statuses/6b1895bdfe81e6194351a17d97a8e6ab093ee946"}}}}