{"action":"created","comment":{"url":"https://api.github.com/repos/astropy/astropy/pulls/comments/63070112","id":63070112,"diff_hunk":"@@ -0,0 +1,338 @@\n+\"\"\"Main Lomb-Scargle Implementation\"\"\"\n+from __future__ import print_function, division\n+\n+import numpy as np\n+\n+from .implementations import lombscargle, available_methods\n+from .implementations.mle import periodic_fit\n+from ... import units\n+from ...utils.compat.numpy import broadcast_arrays\n+\n+\n+def has_units(obj):\n+    return hasattr(obj, 'unit')\n+\n+\n+def get_unit(obj):\n+    return getattr(obj, 'unit', 1)\n+\n+\n+def strip_units(*arrs):\n+    strip = lambda a: None if a is None else np.asarray(a)\n+    if len(arrs) == 1:\n+        return strip(arrs[0])\n+    else:\n+        return map(strip, arrs)\n+\n+\n+class LombScargle(object):\n+    \"\"\"Compute the Lomb-Scargle Periodogram\n+\n+    This implementations here are based on code presented in [1]_ and [2]_;\n+    if you use this functionality in an academic application, citation of\n+    those works would be appreciated.\n+\n+    Parameters\n+    ----------\n+    t : array_like or Quantity\n+        sequence of observation times\n+    y : array_like or Quantity\n+        sequence of observations associated with times t\n+    dy : float, array_like or Quantity (optional)\n+        error or sequence of observational errors associated with times t\n+    fit_bias : bool (optional, default=True)\n+        if True, include a constant offet as part of the model at each\n+        frequency. This can lead to more accurate results, especially in the\n+        case of incomplete phase coverage.\n+    center_data : bool (optional, default=True)\n+        if True, pre-center the data by subtracting the weighted mean\n+        of the input data. This is especially important if fit_bias = False\n+\n+    Examples\n+    --------\n+    Generate noisy periodic data:\n+\n+    >>> rand = np.random.RandomState(42)\n+    >>> t = 100 * rand.rand(100)\n+    >>> y = np.sin(2 * np.pi * t) + rand.randn(100)\n+\n+    Compute the Lomb-Scargle periodogram on an automatically-determined\n+    frequency grid & find the frequency of max power:\n+\n+    >>> frequency, power = LombScargle(t, y).autopower()\n+    >>> frequency[np.argmax(power)]\n+    1.0016662310392956\n+\n+    Compute the Lomb-Scargle periodogram at a user-specified frequency grid:\n+\n+    >>> freq = np.arange(0.8, 1.3, 0.1)\n+    >>> LombScargle(t, y).power(freq)\n+    array([ 0.0204304 ,  0.01393845,  0.35552682,  0.01358029,  0.03083737])\n+\n+    If the inputs are astropy Quantities with units, the units will be\n+    validated and the outputs will also be Quantities with appropriate units:\n+\n+    >>> from astropy import units as u\n+    >>> t = t * u.s\n+    >>> y = y * u.mag\n+    >>> frequency, power = LombScargle(t, y).autopower()\n+    >>> frequency.unit\n+    Unit(\"1 / s\")\n+    >>> power.unit\n+    Unit(dimensionless)\n+\n+    Note here that the Lomb-Scargle power is always a unitless quantity,\n+    because it is related to the :math:`\\\\chi^2` of the best-fit periodic\n+    model at each frequency.\n+\n+    References\n+    ----------\n+    .. [1] Vanderplas, J., Connolly, A. Ivezic, Z. & Gray, A. *Introduction to\n+        astroML: Machine learning for astrophysics*. Proceedings of the\n+        Conference on Intelligent Data Understanding (2012)\n+    .. [2] VanderPlas, J. & Ivezic, Z. *Periodograms for Multiband Astronomical\n+        Time Series*. ApJ 812.1:18 (2015)\n+    \"\"\"\n+    available_methods = available_methods()\n+\n+    def __init__(self, t, y, dy=None, fit_bias=True, center_data=True):\n+        self.t, self.y, self.dy = self._validate_inputs(t, y, dy)\n+        self.fit_bias = fit_bias\n+        self.center_data = center_data\n+\n+    def _validate_inputs(self, t, y, dy):\n+        # Validate shapes of inputs\n+        if dy is None:\n+            t, y = broadcast_arrays(t, y, subok=True)\n+        else:\n+            t, y, dy = broadcast_arrays(t, y, dy, subok=True)\n+        if t.ndim != 1:\n+            raise ValueError(\"Inputs (t, y, dy) must be 1-dimensional\")\n+\n+        # validate units of inputs if any is a Quantity\n+        if any(has_units(arr) for arr in (t, y, dy)):\n+            t, y = map(units.Quantity, (t, y))\n+            if dy is not None:\n+                dy = units.Quantity(dy)\n+                try:\n+                    dy = units.Quantity(dy, unit=y.unit)\n+                except units.UnitConversionError:\n+                    raise ValueError(\"Units of dy not equivalent \"\n+                                     \"to units of y\")\n+        return t, y, dy\n+\n+    def _validate_frequency(self, frequency):\n+        frequency = np.asanyarray(frequency)\n+\n+        if has_units(self.t):\n+            frequency = units.Quantity(frequency)\n+            try:\n+                frequency = units.Quantity(frequency, unit=1./self.t.unit)\n+            except units.UnitConversionError:\n+                raise ValueError(\"Units of frequency not equivalent to \"\n+                                 \"units of 1/t\")\n+        else:\n+            assert not has_units(frequency)\n+        return frequency\n+\n+    def _validate_t(self, t):\n+        t = np.asanyarray(t)\n+\n+        if has_units(self.t):\n+            t = units.Quantity(t)\n+            try:\n+                t = units.Quantity(t, unit=self.t.unit)\n+            except units.UnitConversionError:\n+                raise ValueError(\"Units of t not equivalent to \"\n+                                 \"units of input self.t\")\n+        return t\n+\n+    def _power_unit(self, norm):\n+        if has_units(self.y):\n+            if self.dy is None and norm == 'psd':\n+                return self.y.unit ** 2\n+            else:\n+                return units.dimensionless_unscaled\n+        else:\n+            return 1\n+\n+    def autofrequency(self, samples_per_peak=5, nyquist_factor=5,\n+                      minimum_frequency=None, maximum_frequency=None):\n+        \"\"\"Determine a suitable frequency grid for data.\n+\n+        Note that this assumes the peak width is driven by the observational\n+        baseline, which is generally a good assumption when the baseline is\n+        much larger than the oscillation period.\n+        If you are searching for periods longer than the baseline of your\n+        observations, this may not perform well.\n+\n+        Even with a large baseline, be aware that the maximum frequency\n+        returned is based on the concept of \"average Nyquist frequency\", which\n+        may not be useful for irregularly-sampled data. The maximum frequency\n+        can be adjusted via the nyquist_factor argument, or through the\n+        maximum_frequency argument.\n+\n+        Parameters\n+        ----------\n+        samples_per_peak : float (optional, default=5)\n+            The approximate number of desired samples across the typical peak\n+        nyquist_factor : float (optional, default=5)\n+            The multiple of the average nyquist frequency used to choose the\n+            maximum frequency if maximum_frequency is not provided.\n+        minimum_frequency : float (optional)\n+            If specified, then use this minimum frequency rather than one\n+            chosen based on the size of the baseline.\n+        maximum_frequency : float (optional)\n+            If specified, then use this maximum frequency rather than one\n+            chosen based on the average nyquist frequency.\n+\n+        Returns\n+        -------\n+        frequency : ndarray or Quantity\n+            The heuristically-determined optimal frequency bin\n+        \"\"\"\n+        t = np.asanyarray(self.t)","path":"astropy/stats/lombscargle/core.py","position":194,"original_position":194,"commit_id":"58224497beccd4ebc10a9f54bed0cda495c12fd9","original_commit_id":"58224497beccd4ebc10a9f54bed0cda495c12fd9","user":{"login":"mhvk","id":2789820,"avatar_url":"https://avatars.githubusercontent.com/u/2789820?v=3","gravatar_id":"","url":"https://api.github.com/users/mhvk","html_url":"https://github.com/mhvk","followers_url":"https://api.github.com/users/mhvk/followers","following_url":"https://api.github.com/users/mhvk/following{/other_user}","gists_url":"https://api.github.com/users/mhvk/gists{/gist_id}","starred_url":"https://api.github.com/users/mhvk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhvk/subscriptions","organizations_url":"https://api.github.com/users/mhvk/orgs","repos_url":"https://api.github.com/users/mhvk/repos","events_url":"https://api.github.com/users/mhvk/events{/privacy}","received_events_url":"https://api.github.com/users/mhvk/received_events","type":"User","site_admin":false},"body":"This can just be `t = self.t`, right? `broadcast_arrays` will have ensured this is an array.","created_at":"2016-05-12T18:16:29Z","updated_at":"2016-05-12T18:16:29Z","html_url":"https://github.com/astropy/astropy/pull/4811#discussion_r63070112","pull_request_url":"https://api.github.com/repos/astropy/astropy/pulls/4811","_links":{"self":{"href":"https://api.github.com/repos/astropy/astropy/pulls/comments/63070112"},"html":{"href":"https://github.com/astropy/astropy/pull/4811#discussion_r63070112"},"pull_request":{"href":"https://api.github.com/repos/astropy/astropy/pulls/4811"}}},"pull_request":{"url":"https://api.github.com/repos/astropy/astropy/pulls/4811","id":68136322,"html_url":"https://github.com/astropy/astropy/pull/4811","diff_url":"https://github.com/astropy/astropy/pull/4811.diff","patch_url":"https://github.com/astropy/astropy/pull/4811.patch","issue_url":"https://api.github.com/repos/astropy/astropy/issues/4811","number":4811,"state":"open","locked":false,"title":"ENH: Add Lomb-Scargle Periodogram","user":{"login":"jakevdp","id":781659,"avatar_url":"https://avatars.githubusercontent.com/u/781659?v=3","gravatar_id":"","url":"https://api.github.com/users/jakevdp","html_url":"https://github.com/jakevdp","followers_url":"https://api.github.com/users/jakevdp/followers","following_url":"https://api.github.com/users/jakevdp/following{/other_user}","gists_url":"https://api.github.com/users/jakevdp/gists{/gist_id}","starred_url":"https://api.github.com/users/jakevdp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jakevdp/subscriptions","organizations_url":"https://api.github.com/users/jakevdp/orgs","repos_url":"https://api.github.com/users/jakevdp/repos","events_url":"https://api.github.com/users/jakevdp/events{/privacy}","received_events_url":"https://api.github.com/users/jakevdp/received_events","type":"User","site_admin":false},"body":"The PR contains six complementary implementations of the Lomb-Scargle periodogram, along with full unit tests and documentation. It is adapted from http://github.com/jakevdp/lombscargle/ and from http://astroml.org. \r\n\r\nFor benchmarks of the approaches, see [this notebook](https://gist.github.com/jakevdp/86c20012149e4fe2f7c656145c893df6).\r\n\r\nA build of the docs from this PR can be found [here](http://jakevdp.github.io/astropy/stats/lombscargle.html).\r\n\r\nAlso – I know this is a rather large contribution and adds to the maintenance challenge of the astropy project. If you think this would better serve the community as a standalone affiliated ``lombscargle`` package, I'd be happy to go that route as well!","created_at":"2016-04-27T22:32:46Z","updated_at":"2016-05-12T18:16:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e1e5ae0f6f5ac282f60fb685f8cffedf506b59e5","assignee":null,"milestone":{"url":"https://api.github.com/repos/astropy/astropy/milestones/26","html_url":"https://github.com/astropy/astropy/milestones/v1.2.0","labels_url":"https://api.github.com/repos/astropy/astropy/milestones/26/labels","id":1114049,"number":26,"title":"v1.2.0","description":"","creator":{"login":"astrofrog","id":314716,"avatar_url":"https://avatars.githubusercontent.com/u/314716?v=3","gravatar_id":"","url":"https://api.github.com/users/astrofrog","html_url":"https://github.com/astrofrog","followers_url":"https://api.github.com/users/astrofrog/followers","following_url":"https://api.github.com/users/astrofrog/following{/other_user}","gists_url":"https://api.github.com/users/astrofrog/gists{/gist_id}","starred_url":"https://api.github.com/users/astrofrog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/astrofrog/subscriptions","organizations_url":"https://api.github.com/users/astrofrog/orgs","repos_url":"https://api.github.com/users/astrofrog/repos","events_url":"https://api.github.com/users/astrofrog/events{/privacy}","received_events_url":"https://api.github.com/users/astrofrog/received_events","type":"User","site_admin":false},"open_issues":38,"closed_issues":112,"state":"open","created_at":"2015-05-17T16:11:47Z","updated_at":"2016-05-12T17:40:49Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/astropy/astropy/pulls/4811/commits","review_comments_url":"https://api.github.com/repos/astropy/astropy/pulls/4811/comments","review_comment_url":"https://api.github.com/repos/astropy/astropy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/astropy/astropy/issues/4811/comments","statuses_url":"https://api.github.com/repos/astropy/astropy/statuses/58224497beccd4ebc10a9f54bed0cda495c12fd9","head":{"label":"jakevdp:lombscargle","ref":"lombscargle","sha":"58224497beccd4ebc10a9f54bed0cda495c12fd9","user":{"login":"jakevdp","id":781659,"avatar_url":"https://avatars.githubusercontent.com/u/781659?v=3","gravatar_id":"","url":"https://api.github.com/users/jakevdp","html_url":"https://github.com/jakevdp","followers_url":"https://api.github.com/users/jakevdp/followers","following_url":"https://api.github.com/users/jakevdp/following{/other_user}","gists_url":"https://api.github.com/users/jakevdp/gists{/gist_id}","starred_url":"https://api.github.com/users/jakevdp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jakevdp/subscriptions","organizations_url":"https://api.github.com/users/jakevdp/orgs","repos_url":"https://api.github.com/users/jakevdp/repos","events_url":"https://api.github.com/users/jakevdp/events{/privacy}","received_events_url":"https://api.github.com/users/jakevdp/received_events","type":"User","site_admin":false},"repo":{"id":35127346,"name":"astropy","full_name":"jakevdp/astropy","owner":{"login":"jakevdp","id":781659,"avatar_url":"https://avatars.githubusercontent.com/u/781659?v=3","gravatar_id":"","url":"https://api.github.com/users/jakevdp","html_url":"https://github.com/jakevdp","followers_url":"https://api.github.com/users/jakevdp/followers","following_url":"https://api.github.com/users/jakevdp/following{/other_user}","gists_url":"https://api.github.com/users/jakevdp/gists{/gist_id}","starred_url":"https://api.github.com/users/jakevdp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jakevdp/subscriptions","organizations_url":"https://api.github.com/users/jakevdp/orgs","repos_url":"https://api.github.com/users/jakevdp/repos","events_url":"https://api.github.com/users/jakevdp/events{/privacy}","received_events_url":"https://api.github.com/users/jakevdp/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jakevdp/astropy","description":"Repository for the Astropy core package","fork":true,"url":"https://api.github.com/repos/jakevdp/astropy","forks_url":"https://api.github.com/repos/jakevdp/astropy/forks","keys_url":"https://api.github.com/repos/jakevdp/astropy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jakevdp/astropy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jakevdp/astropy/teams","hooks_url":"https://api.github.com/repos/jakevdp/astropy/hooks","issue_events_url":"https://api.github.com/repos/jakevdp/astropy/issues/events{/number}","events_url":"https://api.github.com/repos/jakevdp/astropy/events","assignees_url":"https://api.github.com/repos/jakevdp/astropy/assignees{/user}","branches_url":"https://api.github.com/repos/jakevdp/astropy/branches{/branch}","tags_url":"https://api.github.com/repos/jakevdp/astropy/tags","blobs_url":"https://api.github.com/repos/jakevdp/astropy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jakevdp/astropy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jakevdp/astropy/git/refs{/sha}","trees_url":"https://api.github.com/repos/jakevdp/astropy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jakevdp/astropy/statuses/{sha}","languages_url":"https://api.github.com/repos/jakevdp/astropy/languages","stargazers_url":"https://api.github.com/repos/jakevdp/astropy/stargazers","contributors_url":"https://api.github.com/repos/jakevdp/astropy/contributors","subscribers_url":"https://api.github.com/repos/jakevdp/astropy/subscribers","subscription_url":"https://api.github.com/repos/jakevdp/astropy/subscription","commits_url":"https://api.github.com/repos/jakevdp/astropy/commits{/sha}","git_commits_url":"https://api.github.com/repos/jakevdp/astropy/git/commits{/sha}","comments_url":"https://api.github.com/repos/jakevdp/astropy/comments{/number}","issue_comment_url":"https://api.github.com/repos/jakevdp/astropy/issues/comments{/number}","contents_url":"https://api.github.com/repos/jakevdp/astropy/contents/{+path}","compare_url":"https://api.github.com/repos/jakevdp/astropy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jakevdp/astropy/merges","archive_url":"https://api.github.com/repos/jakevdp/astropy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jakevdp/astropy/downloads","issues_url":"https://api.github.com/repos/jakevdp/astropy/issues{/number}","pulls_url":"https://api.github.com/repos/jakevdp/astropy/pulls{/number}","milestones_url":"https://api.github.com/repos/jakevdp/astropy/milestones{/number}","notifications_url":"https://api.github.com/repos/jakevdp/astropy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jakevdp/astropy/labels{/name}","releases_url":"https://api.github.com/repos/jakevdp/astropy/releases{/id}","deployments_url":"https://api.github.com/repos/jakevdp/astropy/deployments","created_at":"2015-05-05T22:37:06Z","updated_at":"2016-03-22T00:09:51Z","pushed_at":"2016-05-12T17:52:34Z","git_url":"git://github.com/jakevdp/astropy.git","ssh_url":"git@github.com:jakevdp/astropy.git","clone_url":"https://github.com/jakevdp/astropy.git","svn_url":"https://github.com/jakevdp/astropy","homepage":"www.astropy.org","size":72535,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"astropy:master","ref":"master","sha":"6e25679d81cec2245aa696241c05ca6b7a3f272b","user":{"login":"astropy","id":847984,"avatar_url":"https://avatars.githubusercontent.com/u/847984?v=3","gravatar_id":"","url":"https://api.github.com/users/astropy","html_url":"https://github.com/astropy","followers_url":"https://api.github.com/users/astropy/followers","following_url":"https://api.github.com/users/astropy/following{/other_user}","gists_url":"https://api.github.com/users/astropy/gists{/gist_id}","starred_url":"https://api.github.com/users/astropy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/astropy/subscriptions","organizations_url":"https://api.github.com/users/astropy/orgs","repos_url":"https://api.github.com/users/astropy/repos","events_url":"https://api.github.com/users/astropy/events{/privacy}","received_events_url":"https://api.github.com/users/astropy/received_events","type":"Organization","site_admin":false},"repo":{"id":2081289,"name":"astropy","full_name":"astropy/astropy","owner":{"login":"astropy","id":847984,"avatar_url":"https://avatars.githubusercontent.com/u/847984?v=3","gravatar_id":"","url":"https://api.github.com/users/astropy","html_url":"https://github.com/astropy","followers_url":"https://api.github.com/users/astropy/followers","following_url":"https://api.github.com/users/astropy/following{/other_user}","gists_url":"https://api.github.com/users/astropy/gists{/gist_id}","starred_url":"https://api.github.com/users/astropy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/astropy/subscriptions","organizations_url":"https://api.github.com/users/astropy/orgs","repos_url":"https://api.github.com/users/astropy/repos","events_url":"https://api.github.com/users/astropy/events{/privacy}","received_events_url":"https://api.github.com/users/astropy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/astropy/astropy","description":"Repository for the Astropy core package","fork":false,"url":"https://api.github.com/repos/astropy/astropy","forks_url":"https://api.github.com/repos/astropy/astropy/forks","keys_url":"https://api.github.com/repos/astropy/astropy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/astropy/astropy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/astropy/astropy/teams","hooks_url":"https://api.github.com/repos/astropy/astropy/hooks","issue_events_url":"https://api.github.com/repos/astropy/astropy/issues/events{/number}","events_url":"https://api.github.com/repos/astropy/astropy/events","assignees_url":"https://api.github.com/repos/astropy/astropy/assignees{/user}","branches_url":"https://api.github.com/repos/astropy/astropy/branches{/branch}","tags_url":"https://api.github.com/repos/astropy/astropy/tags","blobs_url":"https://api.github.com/repos/astropy/astropy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/astropy/astropy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/astropy/astropy/git/refs{/sha}","trees_url":"https://api.github.com/repos/astropy/astropy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/astropy/astropy/statuses/{sha}","languages_url":"https://api.github.com/repos/astropy/astropy/languages","stargazers_url":"https://api.github.com/repos/astropy/astropy/stargazers","contributors_url":"https://api.github.com/repos/astropy/astropy/contributors","subscribers_url":"https://api.github.com/repos/astropy/astropy/subscribers","subscription_url":"https://api.github.com/repos/astropy/astropy/subscription","commits_url":"https://api.github.com/repos/astropy/astropy/commits{/sha}","git_commits_url":"https://api.github.com/repos/astropy/astropy/git/commits{/sha}","comments_url":"https://api.github.com/repos/astropy/astropy/comments{/number}","issue_comment_url":"https://api.github.com/repos/astropy/astropy/issues/comments{/number}","contents_url":"https://api.github.com/repos/astropy/astropy/contents/{+path}","compare_url":"https://api.github.com/repos/astropy/astropy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/astropy/astropy/merges","archive_url":"https://api.github.com/repos/astropy/astropy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/astropy/astropy/downloads","issues_url":"https://api.github.com/repos/astropy/astropy/issues{/number}","pulls_url":"https://api.github.com/repos/astropy/astropy/pulls{/number}","milestones_url":"https://api.github.com/repos/astropy/astropy/milestones{/number}","notifications_url":"https://api.github.com/repos/astropy/astropy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/astropy/astropy/labels{/name}","releases_url":"https://api.github.com/repos/astropy/astropy/releases{/id}","deployments_url":"https://api.github.com/repos/astropy/astropy/deployments","created_at":"2011-07-21T01:33:49Z","updated_at":"2016-05-12T13:07:18Z","pushed_at":"2016-05-12T17:50:48Z","git_url":"git://github.com/astropy/astropy.git","ssh_url":"git@github.com:astropy/astropy.git","clone_url":"https://github.com/astropy/astropy.git","svn_url":"https://github.com/astropy/astropy","homepage":"www.astropy.org","size":62395,"stargazers_count":853,"watchers_count":853,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":544,"mirror_url":null,"open_issues_count":706,"forks":544,"open_issues":706,"watchers":853,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/astropy/astropy/pulls/4811"},"html":{"href":"https://github.com/astropy/astropy/pull/4811"},"issue":{"href":"https://api.github.com/repos/astropy/astropy/issues/4811"},"comments":{"href":"https://api.github.com/repos/astropy/astropy/issues/4811/comments"},"review_comments":{"href":"https://api.github.com/repos/astropy/astropy/pulls/4811/comments"},"review_comment":{"href":"https://api.github.com/repos/astropy/astropy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/astropy/astropy/pulls/4811/commits"},"statuses":{"href":"https://api.github.com/repos/astropy/astropy/statuses/58224497beccd4ebc10a9f54bed0cda495c12fd9"}}}}