{"action":"created","comment":{"url":"https://api.github.com/repos/GalSim-developers/GalSim/pulls/comments/87464023","pull_request_review_id":8076164,"id":87464023,"diff_hunk":"@@ -818,6 +818,49 @@ def calculateSeeingMomentRatio(self, bandpass, alpha=-0.2, base_wavelength=500):\n             return galsim.integ.int1d(lambda w: weight(w) * kernel(w),\n                                       bandpass.blue_limit, bandpass.red_limit) / flux\n \n+    def sampleWavelength(self, nphotons, bandpass, seed=0, npoints=256):\n+        \"\"\" Sample 'nphoton' random wavelengths from the SED (and bandpass).\n+\n+        @param nphotons  Number of samples (photons) to randomly draw.\n+        @param bandpass  Bandpass through which object is being imaged.\n+        @param seed      Something that can seed a BaseDeviate: a long int seed or another","path":"galsim/sed.py","position":9,"original_position":9,"commit_id":"97b2afb63ab960dc78b5215d44bfd6853934349f","original_commit_id":"97b2afb63ab960dc78b5215d44bfd6853934349f","user":{"login":"rmandelb","id":1454906,"avatar_url":"https://avatars.githubusercontent.com/u/1454906?v=3","gravatar_id":"","url":"https://api.github.com/users/rmandelb","html_url":"https://github.com/rmandelb","followers_url":"https://api.github.com/users/rmandelb/followers","following_url":"https://api.github.com/users/rmandelb/following{/other_user}","gists_url":"https://api.github.com/users/rmandelb/gists{/gist_id}","starred_url":"https://api.github.com/users/rmandelb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rmandelb/subscriptions","organizations_url":"https://api.github.com/users/rmandelb/orgs","repos_url":"https://api.github.com/users/rmandelb/repos","events_url":"https://api.github.com/users/rmandelb/events{/privacy}","received_events_url":"https://api.github.com/users/rmandelb/received_events","type":"User","site_admin":false},"body":"You can see an example of how this is done in real.py, in the RealGalaxy constructor.","created_at":"2016-11-10T19:08:34Z","updated_at":"2016-11-10T19:25:25Z","html_url":"https://github.com/GalSim-developers/GalSim/pull/826#discussion_r87464023","pull_request_url":"https://api.github.com/repos/GalSim-developers/GalSim/pulls/826","_links":{"self":{"href":"https://api.github.com/repos/GalSim-developers/GalSim/pulls/comments/87464023"},"html":{"href":"https://github.com/GalSim-developers/GalSim/pull/826#discussion_r87464023"},"pull_request":{"href":"https://api.github.com/repos/GalSim-developers/GalSim/pulls/826"}}},"pull_request":{"url":"https://api.github.com/repos/GalSim-developers/GalSim/pulls/826","id":92978076,"html_url":"https://github.com/GalSim-developers/GalSim/pull/826","diff_url":"https://github.com/GalSim-developers/GalSim/pull/826.diff","patch_url":"https://github.com/GalSim-developers/GalSim/pull/826.patch","issue_url":"https://api.github.com/repos/GalSim-developers/GalSim/issues/826","number":826,"state":"open","locked":false,"title":"#822 Adding SED wavelength sampling","user":{"login":"kadrlica","id":5605123,"avatar_url":"https://avatars.githubusercontent.com/u/5605123?v=3","gravatar_id":"","url":"https://api.github.com/users/kadrlica","html_url":"https://github.com/kadrlica","followers_url":"https://api.github.com/users/kadrlica/followers","following_url":"https://api.github.com/users/kadrlica/following{/other_user}","gists_url":"https://api.github.com/users/kadrlica/gists{/gist_id}","starred_url":"https://api.github.com/users/kadrlica/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kadrlica/subscriptions","organizations_url":"https://api.github.com/users/kadrlica/orgs","repos_url":"https://api.github.com/users/kadrlica/repos","events_url":"https://api.github.com/users/kadrlica/events{/privacy}","received_events_url":"https://api.github.com/users/kadrlica/received_events","type":"User","site_admin":false},"body":"Added `SED.SampleWavelength` to randomly sample wavelengths from an SED. Additional changes from Mike to add the `BaseDeviate.generate` function to create arrays of random variates. Some tests for each new functionality.","created_at":"2016-11-09T14:59:50Z","updated_at":"2016-11-10T19:25:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d45246476c6a3a63636eae2c1437ae25caf6e21d","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/GalSim-developers/GalSim/pulls/826/commits","review_comments_url":"https://api.github.com/repos/GalSim-developers/GalSim/pulls/826/comments","review_comment_url":"https://api.github.com/repos/GalSim-developers/GalSim/pulls/comments{/number}","comments_url":"https://api.github.com/repos/GalSim-developers/GalSim/issues/826/comments","statuses_url":"https://api.github.com/repos/GalSim-developers/GalSim/statuses/97b2afb63ab960dc78b5215d44bfd6853934349f","head":{"label":"GalSim-developers:#822","ref":"#822","sha":"97b2afb63ab960dc78b5215d44bfd6853934349f","user":{"login":"GalSim-developers","id":1462196,"avatar_url":"https://avatars.githubusercontent.com/u/1462196?v=3","gravatar_id":"","url":"https://api.github.com/users/GalSim-developers","html_url":"https://github.com/GalSim-developers","followers_url":"https://api.github.com/users/GalSim-developers/followers","following_url":"https://api.github.com/users/GalSim-developers/following{/other_user}","gists_url":"https://api.github.com/users/GalSim-developers/gists{/gist_id}","starred_url":"https://api.github.com/users/GalSim-developers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GalSim-developers/subscriptions","organizations_url":"https://api.github.com/users/GalSim-developers/orgs","repos_url":"https://api.github.com/users/GalSim-developers/repos","events_url":"https://api.github.com/users/GalSim-developers/events{/privacy}","received_events_url":"https://api.github.com/users/GalSim-developers/received_events","type":"Organization","site_admin":false},"repo":{"id":3510804,"name":"GalSim","full_name":"GalSim-developers/GalSim","owner":{"login":"GalSim-developers","id":1462196,"avatar_url":"https://avatars.githubusercontent.com/u/1462196?v=3","gravatar_id":"","url":"https://api.github.com/users/GalSim-developers","html_url":"https://github.com/GalSim-developers","followers_url":"https://api.github.com/users/GalSim-developers/followers","following_url":"https://api.github.com/users/GalSim-developers/following{/other_user}","gists_url":"https://api.github.com/users/GalSim-developers/gists{/gist_id}","starred_url":"https://api.github.com/users/GalSim-developers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GalSim-developers/subscriptions","organizations_url":"https://api.github.com/users/GalSim-developers/orgs","repos_url":"https://api.github.com/users/GalSim-developers/repos","events_url":"https://api.github.com/users/GalSim-developers/events{/privacy}","received_events_url":"https://api.github.com/users/GalSim-developers/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/GalSim-developers/GalSim","description":"The modular galaxy image simulation toolkit","fork":false,"url":"https://api.github.com/repos/GalSim-developers/GalSim","forks_url":"https://api.github.com/repos/GalSim-developers/GalSim/forks","keys_url":"https://api.github.com/repos/GalSim-developers/GalSim/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GalSim-developers/GalSim/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GalSim-developers/GalSim/teams","hooks_url":"https://api.github.com/repos/GalSim-developers/GalSim/hooks","issue_events_url":"https://api.github.com/repos/GalSim-developers/GalSim/issues/events{/number}","events_url":"https://api.github.com/repos/GalSim-developers/GalSim/events","assignees_url":"https://api.github.com/repos/GalSim-developers/GalSim/assignees{/user}","branches_url":"https://api.github.com/repos/GalSim-developers/GalSim/branches{/branch}","tags_url":"https://api.github.com/repos/GalSim-developers/GalSim/tags","blobs_url":"https://api.github.com/repos/GalSim-developers/GalSim/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GalSim-developers/GalSim/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GalSim-developers/GalSim/git/refs{/sha}","trees_url":"https://api.github.com/repos/GalSim-developers/GalSim/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GalSim-developers/GalSim/statuses/{sha}","languages_url":"https://api.github.com/repos/GalSim-developers/GalSim/languages","stargazers_url":"https://api.github.com/repos/GalSim-developers/GalSim/stargazers","contributors_url":"https://api.github.com/repos/GalSim-developers/GalSim/contributors","subscribers_url":"https://api.github.com/repos/GalSim-developers/GalSim/subscribers","subscription_url":"https://api.github.com/repos/GalSim-developers/GalSim/subscription","commits_url":"https://api.github.com/repos/GalSim-developers/GalSim/commits{/sha}","git_commits_url":"https://api.github.com/repos/GalSim-developers/GalSim/git/commits{/sha}","comments_url":"https://api.github.com/repos/GalSim-developers/GalSim/comments{/number}","issue_comment_url":"https://api.github.com/repos/GalSim-developers/GalSim/issues/comments{/number}","contents_url":"https://api.github.com/repos/GalSim-developers/GalSim/contents/{+path}","compare_url":"https://api.github.com/repos/GalSim-developers/GalSim/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GalSim-developers/GalSim/merges","archive_url":"https://api.github.com/repos/GalSim-developers/GalSim/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GalSim-developers/GalSim/downloads","issues_url":"https://api.github.com/repos/GalSim-developers/GalSim/issues{/number}","pulls_url":"https://api.github.com/repos/GalSim-developers/GalSim/pulls{/number}","milestones_url":"https://api.github.com/repos/GalSim-developers/GalSim/milestones{/number}","notifications_url":"https://api.github.com/repos/GalSim-developers/GalSim/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GalSim-developers/GalSim/labels{/name}","releases_url":"https://api.github.com/repos/GalSim-developers/GalSim/releases{/id}","deployments_url":"https://api.github.com/repos/GalSim-developers/GalSim/deployments","created_at":"2012-02-22T02:51:45Z","updated_at":"2016-10-04T13:55:55Z","pushed_at":"2016-11-10T19:17:27Z","git_url":"git://github.com/GalSim-developers/GalSim.git","ssh_url":"git@github.com:GalSim-developers/GalSim.git","clone_url":"https://github.com/GalSim-developers/GalSim.git","svn_url":"https://github.com/GalSim-developers/GalSim","homepage":"","size":133396,"stargazers_count":56,"watchers_count":56,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":39,"mirror_url":null,"open_issues_count":68,"forks":39,"open_issues":68,"watchers":56,"default_branch":"releases/1.4"}},"base":{"label":"GalSim-developers:master","ref":"master","sha":"a6e94d1a782aeb6009f7c1d933106fe358612e75","user":{"login":"GalSim-developers","id":1462196,"avatar_url":"https://avatars.githubusercontent.com/u/1462196?v=3","gravatar_id":"","url":"https://api.github.com/users/GalSim-developers","html_url":"https://github.com/GalSim-developers","followers_url":"https://api.github.com/users/GalSim-developers/followers","following_url":"https://api.github.com/users/GalSim-developers/following{/other_user}","gists_url":"https://api.github.com/users/GalSim-developers/gists{/gist_id}","starred_url":"https://api.github.com/users/GalSim-developers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GalSim-developers/subscriptions","organizations_url":"https://api.github.com/users/GalSim-developers/orgs","repos_url":"https://api.github.com/users/GalSim-developers/repos","events_url":"https://api.github.com/users/GalSim-developers/events{/privacy}","received_events_url":"https://api.github.com/users/GalSim-developers/received_events","type":"Organization","site_admin":false},"repo":{"id":3510804,"name":"GalSim","full_name":"GalSim-developers/GalSim","owner":{"login":"GalSim-developers","id":1462196,"avatar_url":"https://avatars.githubusercontent.com/u/1462196?v=3","gravatar_id":"","url":"https://api.github.com/users/GalSim-developers","html_url":"https://github.com/GalSim-developers","followers_url":"https://api.github.com/users/GalSim-developers/followers","following_url":"https://api.github.com/users/GalSim-developers/following{/other_user}","gists_url":"https://api.github.com/users/GalSim-developers/gists{/gist_id}","starred_url":"https://api.github.com/users/GalSim-developers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GalSim-developers/subscriptions","organizations_url":"https://api.github.com/users/GalSim-developers/orgs","repos_url":"https://api.github.com/users/GalSim-developers/repos","events_url":"https://api.github.com/users/GalSim-developers/events{/privacy}","received_events_url":"https://api.github.com/users/GalSim-developers/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/GalSim-developers/GalSim","description":"The modular galaxy image simulation toolkit","fork":false,"url":"https://api.github.com/repos/GalSim-developers/GalSim","forks_url":"https://api.github.com/repos/GalSim-developers/GalSim/forks","keys_url":"https://api.github.com/repos/GalSim-developers/GalSim/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GalSim-developers/GalSim/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GalSim-developers/GalSim/teams","hooks_url":"https://api.github.com/repos/GalSim-developers/GalSim/hooks","issue_events_url":"https://api.github.com/repos/GalSim-developers/GalSim/issues/events{/number}","events_url":"https://api.github.com/repos/GalSim-developers/GalSim/events","assignees_url":"https://api.github.com/repos/GalSim-developers/GalSim/assignees{/user}","branches_url":"https://api.github.com/repos/GalSim-developers/GalSim/branches{/branch}","tags_url":"https://api.github.com/repos/GalSim-developers/GalSim/tags","blobs_url":"https://api.github.com/repos/GalSim-developers/GalSim/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GalSim-developers/GalSim/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GalSim-developers/GalSim/git/refs{/sha}","trees_url":"https://api.github.com/repos/GalSim-developers/GalSim/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GalSim-developers/GalSim/statuses/{sha}","languages_url":"https://api.github.com/repos/GalSim-developers/GalSim/languages","stargazers_url":"https://api.github.com/repos/GalSim-developers/GalSim/stargazers","contributors_url":"https://api.github.com/repos/GalSim-developers/GalSim/contributors","subscribers_url":"https://api.github.com/repos/GalSim-developers/GalSim/subscribers","subscription_url":"https://api.github.com/repos/GalSim-developers/GalSim/subscription","commits_url":"https://api.github.com/repos/GalSim-developers/GalSim/commits{/sha}","git_commits_url":"https://api.github.com/repos/GalSim-developers/GalSim/git/commits{/sha}","comments_url":"https://api.github.com/repos/GalSim-developers/GalSim/comments{/number}","issue_comment_url":"https://api.github.com/repos/GalSim-developers/GalSim/issues/comments{/number}","contents_url":"https://api.github.com/repos/GalSim-developers/GalSim/contents/{+path}","compare_url":"https://api.github.com/repos/GalSim-developers/GalSim/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GalSim-developers/GalSim/merges","archive_url":"https://api.github.com/repos/GalSim-developers/GalSim/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GalSim-developers/GalSim/downloads","issues_url":"https://api.github.com/repos/GalSim-developers/GalSim/issues{/number}","pulls_url":"https://api.github.com/repos/GalSim-developers/GalSim/pulls{/number}","milestones_url":"https://api.github.com/repos/GalSim-developers/GalSim/milestones{/number}","notifications_url":"https://api.github.com/repos/GalSim-developers/GalSim/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GalSim-developers/GalSim/labels{/name}","releases_url":"https://api.github.com/repos/GalSim-developers/GalSim/releases{/id}","deployments_url":"https://api.github.com/repos/GalSim-developers/GalSim/deployments","created_at":"2012-02-22T02:51:45Z","updated_at":"2016-10-04T13:55:55Z","pushed_at":"2016-11-10T19:17:27Z","git_url":"git://github.com/GalSim-developers/GalSim.git","ssh_url":"git@github.com:GalSim-developers/GalSim.git","clone_url":"https://github.com/GalSim-developers/GalSim.git","svn_url":"https://github.com/GalSim-developers/GalSim","homepage":"","size":133396,"stargazers_count":56,"watchers_count":56,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":39,"mirror_url":null,"open_issues_count":68,"forks":39,"open_issues":68,"watchers":56,"default_branch":"releases/1.4"}},"_links":{"self":{"href":"https://api.github.com/repos/GalSim-developers/GalSim/pulls/826"},"html":{"href":"https://github.com/GalSim-developers/GalSim/pull/826"},"issue":{"href":"https://api.github.com/repos/GalSim-developers/GalSim/issues/826"},"comments":{"href":"https://api.github.com/repos/GalSim-developers/GalSim/issues/826/comments"},"review_comments":{"href":"https://api.github.com/repos/GalSim-developers/GalSim/pulls/826/comments"},"review_comment":{"href":"https://api.github.com/repos/GalSim-developers/GalSim/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/GalSim-developers/GalSim/pulls/826/commits"},"statuses":{"href":"https://api.github.com/repos/GalSim-developers/GalSim/statuses/97b2afb63ab960dc78b5215d44bfd6853934349f"}}}}
{"actor":{"display_login":"rmandelb"}}