{"action":"created","issue":{"url":"https://api.github.com/repos/KeplerGO/lightkurve/issues/210","repository_url":"https://api.github.com/repos/KeplerGO/lightkurve","labels_url":"https://api.github.com/repos/KeplerGO/lightkurve/issues/210/labels{/name}","comments_url":"https://api.github.com/repos/KeplerGO/lightkurve/issues/210/comments","events_url":"https://api.github.com/repos/KeplerGO/lightkurve/issues/210/events","html_url":"https://github.com/KeplerGO/lightkurve/issues/210","id":344907166,"node_id":"MDU6SXNzdWUzNDQ5MDcxNjY=","number":210,"title":"KeplerTargetPixelFile.get_model docstring is a bit unclear","user":{"login":"mirca","id":13077051,"node_id":"MDQ6VXNlcjEzMDc3MDUx","avatar_url":"https://avatars1.githubusercontent.com/u/13077051?v=4","gravatar_id":"","url":"https://api.github.com/users/mirca","html_url":"https://github.com/mirca","followers_url":"https://api.github.com/users/mirca/followers","following_url":"https://api.github.com/users/mirca/following{/other_user}","gists_url":"https://api.github.com/users/mirca/gists{/gist_id}","starred_url":"https://api.github.com/users/mirca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mirca/subscriptions","organizations_url":"https://api.github.com/users/mirca/orgs","repos_url":"https://api.github.com/users/mirca/repos","events_url":"https://api.github.com/users/mirca/events{/privacy}","received_events_url":"https://api.github.com/users/mirca/received_events","type":"User","site_admin":false},"labels":[{"id":875544334,"node_id":"MDU6TGFiZWw4NzU1NDQzMzQ=","url":"https://api.github.com/repos/KeplerGO/lightkurve/labels/documentation","name":"documentation","color":"f7a0a7","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-07-26T16:02:29Z","updated_at":"2018-07-26T16:06:33Z","closed_at":null,"author_association":"MEMBER","body":"From the docstring of ``KeplerTargetPixelFile.get_model``, it's a bit a unclear what the argument ``star_priors`` should be.\r\n\r\nThis bit of code is also confusing:\r\n```\r\nif 'star_priors' not in kwargs:\r\n    centr_col, centr_row = self.centroids()\r\n    star_priors = [StarPrior(col=GaussianPrior(mean=np.nanmedian(centr_col),\r\n                                               var=np.nanstd(centr_col)**2),\r\n                             row=GaussianPrior(mean=np.nanmedian(centr_row),\r\n                                               var=np.nanstd(centr_row)**2),\r\n                             flux=UniformPrior(lb=0.5*np.nanmax(self.flux[0]),\r\n                                               ub=2*np.nansum(self.flux[0]) + 1e-10),\r\n                             targetid=self.targetid)]\r\n    kwargs['star_priors'] = star_priors\r\n```\r\n\r\nFrom the method signature,  ``get_model(self, star_priors=None, **kwargs)``, ``start_priors`` is a separate argument anyway, so I guess that if statement will always evaluate to true?\r\n\r\nI think it would be nice to have a docstring example on the usage of this method. Something like:\r\n```\r\nExamples\r\n----------\r\ntpf = KeplerTargetPixelFile(...)\r\nmodel = tpf.get_model(star_priors=..., other_possible_args=...)\r\n```"},"comment":{"url":"https://api.github.com/repos/KeplerGO/lightkurve/issues/comments/408149466","html_url":"https://github.com/KeplerGO/lightkurve/issues/210#issuecomment-408149466","issue_url":"https://api.github.com/repos/KeplerGO/lightkurve/issues/210","id":408149466,"node_id":"MDEyOklzc3VlQ29tbWVudDQwODE0OTQ2Ng==","user":{"login":"barentsen","id":817669,"node_id":"MDQ6VXNlcjgxNzY2OQ==","avatar_url":"https://avatars3.githubusercontent.com/u/817669?v=4","gravatar_id":"","url":"https://api.github.com/users/barentsen","html_url":"https://github.com/barentsen","followers_url":"https://api.github.com/users/barentsen/followers","following_url":"https://api.github.com/users/barentsen/following{/other_user}","gists_url":"https://api.github.com/users/barentsen/gists{/gist_id}","starred_url":"https://api.github.com/users/barentsen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/barentsen/subscriptions","organizations_url":"https://api.github.com/users/barentsen/orgs","repos_url":"https://api.github.com/users/barentsen/repos","events_url":"https://api.github.com/users/barentsen/events{/privacy}","received_events_url":"https://api.github.com/users/barentsen/received_events","type":"User","site_admin":false},"created_at":"2018-07-26T16:06:33Z","updated_at":"2018-07-26T16:06:33Z","author_association":"MEMBER","body":"Owww, this is a bug!  (And yes, we need examples in that docstring ... and perhaps in docstrings overall.)"}}
{"actor":{"display_login":"barentsen"}}