{"action":"created","comment":{"url":"https://api.github.com/repos/StingraySoftware/stingray/pulls/comments/73220766","id":73220766,"diff_hunk":"@@ -0,0 +1,467 @@\n+# -*- coding: utf-8 -*-\n+from __future__ import division\n+import collections\n+import numpy as np\n+\n+from stingray import Lightcurve\n+import stingray.utils as utils\n+\n+__all__ = ['Covariancespectrum', 'AveragedCovariancespectrum']\n+\n+\n+class Covariancespectrum(object):\n+\n+    def __init__(self, event_list, dt, band_interest=None,\n+                 ref_band_interest=None, std=None):\n+        \"\"\"\n+        Parameters\n+        ----------\n+        event_list : numpy 2D array\n+            A numpy 2D array with first column as time of arrival and second\n+            column as photon energies associated.\n+            Note : The event list must be in sorted order with respect to the\n+            times of arrivals.\n+\n+        dt : float\n+            The time resolution of the Lightcurve formed from the energy bin.\n+\n+        band_interest : iterable of tuples, default All\n+            An iterable of tuples with minimum and maximum values of the range\n+            in the band of interest. e.g list of tuples, tuple of tuples.\n+\n+        ref_band_interest : tuple of reference band range, default All\n+            A tuple with minimum and maximum values of the range in the band\n+            of interest in reference channel.\n+\n+        std : float or np.array or list of numbers\n+            The term std is used to cacluate the excess variance of a band.\n+            If std is set to None, default Poisson case is taken and the\n+            std is calculated as `mean(lc)**0.5`. In the case of a single\n+            float as input, the same is used as the standard deviation which\n+            is also used as the std. And if the std is an iterable of\n+            numbers, their mean is used for the same purpose.\n+\n+\n+        Attributes\n+        ----------\n+        energy_events : dictionary\n+            A dictionary with energy bins as keys and time of arrivals of\n+            photons with the same energy as value.\n+\n+        energy_covar : dictionary\n+            A dictionary with mid point of band_interest and their covariance\n+            computed with their individual reference band. The covaraince\n+            values are normalized.\n+\n+        unnorm_covar : np.ndarray\n+            An array of arrays with mid point band_interest and their\n+            covariance. It is the array-form of the dictionary `energy_covar`.\n+            The covariance values are unnormalized.\n+\n+        covar : np.ndarray\n+            Normalized covaraiance spectrum.\n+\n+        covar_error : np.ndarray\n+            Errors of the normalized covariance spectrum.\n+\n+        min_time : int\n+            Time of arrival of the earliest photon.\n+\n+        max_time : int\n+            Time of arrival of the last photon.\n+\n+        min_energy : float\n+            Energy of the photon with the minimum energy.\n+\n+        max_energy : float\n+            Energy of the photon with the maximum energy.\n+\n+        Reference\n+        ---------\n+        [1] Wilkinson, T. and Uttley, P. (2009), Accretion disc variability\n+            in the hard state of black hole X-ray binaries. Monthly Notices\n+            of the Royal Astronomical Society, 397: 666–676.\n+            doi: 10.1111/j.1365-2966.2009.15008.x\n+\n+        Examples\n+        --------\n+        See https://github.com/StingraySoftware/notebooks repository for\n+        detailed notebooks on the code.\n+        \"\"\"\n+\n+        # This parameter is used to identify whether the current object is\n+        # an instance of Covariancespectrum or AveragedCovariancespectrum.\n+        self.avg_covar = False\n+\n+        self._init_vars(event_list, dt, band_interest,\n+                        ref_band_interest, std)\n+\n+        # A dictionary with energy bin as key and events as value of the key\n+        self.energy_events = {}\n+\n+        self._construct_energy_events(self.energy_events)\n+\n+        self._update_energy_events(self.energy_events)\n+\n+        # The dictionary with covariance spectrum for each energy bin\n+        self.energy_covar = {}\n+\n+        self._construct_energy_covar(self.energy_events, self.energy_covar)\n+\n+    def _init_vars(self, event_list, dt, band_interest,\n+                   ref_band_interest, std):\n+        \"\"\"\n+        Check for consistency with input variables and declare public ones.\n+        \"\"\"\n+        if not np.all(np.diff(event_list, axis=0).T[0] >= 0):\n+            utils.simon(\"The event list must be sorted with respect to \"\n+                        \"times of arrivals.\")\n+            event_list = event_list[event_list[:, 0].argsort()]\n+\n+        self.event_list = event_list\n+\n+        self.event_list_T = event_list.T\n+\n+        self._init_special_vars()\n+\n+        if ref_band_interest is None:\n+            ref_band_interest = (self.min_energy, self.max_energy)\n+\n+        assert type(ref_band_interest) in (list, tuple), \"Ref Band interest \" \\\n+                                                         \"should be either \" \\\n+                                                         \"tuple or list.\"\n+\n+        assert len(ref_band_interest) == 2, \"Band interest should be a tuple\" \\\n+                                            \" with min and max energy value \" \\\n+                                            \"for the reference band.\"\n+        self.ref_band_interest = ref_band_interest\n+\n+        if band_interest is not None:\n+            for element in list(band_interest):\n+                assert type(element) in (list, tuple), \\\n+                    \"band_interest should be iterable of either tuple or list.\"\n+                assert len(element) == 2, \"Band interest should be a tuple \" \\\n+                                          \"with min and max energy values.\"\n+\n+        self.band_interest = band_interest\n+        self.dt = dt\n+\n+        self.std = std\n+\n+    def _init_special_vars(self, T_start=None, T_end=None):\n+        \"\"\"\n+        Method to set mininum and maximum time and energy parameters. It has\n+        been separated from the main init method due to multiple calls from\n+        AveragedCovariancespectrum.\n+        \"\"\"\n+        self.min_energy = np.min(self.event_list_T[1][T_start:T_end])\n+        self.max_energy = np.max(self.event_list_T[1][T_start:T_end])\n+        self.min_time = np.min(self.event_list_T[0][T_start:T_end])\n+        self.max_time = np.max(self.event_list_T[0][T_start:T_end])\n+\n+    def _construct_energy_events(self, energy_events, T_start=None, T_end=None):\n+        # The T_start and T_end parameters are for the purpose of\n+        # AveragedCovariancespectrum where the range of consideration\n+        # is defined.\n+        event_list_T = np.array([self.event_list_T[0][T_start: T_end],\n+                                 self.event_list_T[1][T_start: T_end]])\n+        least_count = np.diff(np.unique(event_list_T[1])).min()\n+\n+        # An array of unique energy values\n+        unique_energy = np.unique(event_list_T[1])\n+\n+        for i in range(len(unique_energy) - 1):\n+            energy_events[unique_energy[i] + least_count*0.5] = []\n+\n+        # Add time of arrivals to corresponding energy bins\n+        # For each bin except the last one, the lower bound is included and\n+        # the upper bound is excluded.\n+        for energy in energy_events.keys():\n+            # The last energy bin\n+            if energy == self.max_energy - least_count*0.5:\n+                toa = event_list_T[0][np.logical_and(\n+                    event_list_T[1] >= energy - least_count*0.5,\n+                    event_list_T[1] <= energy + least_count*0.5)]\n+                energy_events[energy] = sorted(toa)\n+            else:\n+                toa = event_list_T[0][np.logical_and(\n+                    event_list_T[1] >= energy - least_count*0.5,\n+                    event_list_T[1] < energy + least_count*0.5)]\n+                energy_events[energy] = sorted(toa)\n+\n+    def _update_energy_events(self, energy_events):\n+        \"\"\"\n+        In case of a specific band interest, merge the required energy bins\n+        into one with the new key as the mid-point of the band interest.\n+        \"\"\"\n+        if self.band_interest is not None:\n+            energy_events_ = {}\n+            for band in list(self.band_interest):\n+                mid_bin = (band[0] + band[1]) / 2\n+                energy_events_[mid_bin] = []\n+\n+                # Modify self.energy_events to form a band with one key\n+                for key in list(energy_events.keys()):\n+                    if key >= band[0] and key <= band[1]:\n+                        energy_events_[mid_bin] += energy_events[key]\n+                        del energy_events[key]\n+\n+            energy_events.update(energy_events_)\n+\n+    def _init_energy_covar(self, energy_events, energy_covar):\n+        \"\"\"\n+        Initialize the energy_covar dictionary for further computations.\n+        \"\"\"\n+        # Initialize it with empty mapping\n+        if self.band_interest is None:\n+            for key in energy_events.keys():\n+                energy_covar[key] = []\n+        else:\n+            for band in list(self.band_interest):\n+                mid_bin = (band[0] + band[1]) / 2\n+                energy_covar[mid_bin] = []\n+\n+        if not self.avg_covar:\n+            # Error in covariance\n+            self.covar_error = {}\n+\n+    def _construct_energy_covar(self, energy_events, energy_covar,\n+                                covar_error=None, xs_var=None):\n+        \"\"\"Form the actual output covaraince dictionary and array.\"\"\"\n+        self._init_energy_covar(energy_events, energy_covar)\n+\n+        if not self.avg_covar:\n+            xs_var = dict()\n+\n+        for energy in energy_covar.keys():\n+            lc = Lightcurve.make_lightcurve(\n+                    energy_events[energy], self.dt, tstart=self.min_time,\n+                    tseg=self.max_time - self.min_time)\n+\n+            # Calculating timestamps for lc_ref\n+            toa_ref = []\n+            for key, value in energy_events.items():\n+                if key >= self.ref_band_interest[0] and \\\n+                        key <= self.ref_band_interest[1]:\n+                    if key != energy:\n+                        toa_ref.extend(value)\n+\n+            toa_ref = np.array(sorted(toa_ref))\n+\n+            lc_ref = Lightcurve.make_lightcurve(\n+                    toa_ref, self.dt, tstart=self.min_time,\n+                    tseg=self.max_time - self.min_time)\n+\n+            assert len(lc.time) == len(lc_ref.time)\n+\n+            covar = self._compute_covariance(lc, lc_ref)\n+\n+            energy_covar[energy] = covar\n+            if not self.avg_covar:\n+                self.covar_error[energy] = self._calculate_covariance_error(\n+                                                lc, lc_ref)\n+            else:\n+                covar_error[energy] = self._calculate_covariance_error(\n+                                           lc, lc_ref)\n+            # Excess variance in ref band\n+            xs_var[energy] = self._calculate_excess_variance(lc_ref)\n+\n+        for key, value in energy_covar.items():\n+            if not xs_var[key] > 0:\n+                utils.simon(\"The excess variance in the reference band is \"\n+                            \"negative. This implies that the reference \"\n+                            \"band was badly chosen. Beware that the \"\n+                            \"covariance spectra will have NaNs!\")\n+\n+        if not self.avg_covar:\n+            self.unnorm_covar = np.vstack(energy_covar.items())\n+            energy_covar[key] = value / (xs_var[key])**0.5\n+\n+            self.covar = np.vstack(energy_covar.items())\n+\n+            self.covar_error = np.vstack(self.covar_error.items())\n+\n+    def _calculate_excess_variance(self, lc):\n+        \"\"\"Calculate excess variance in a band with the standard deviation.\"\"\"\n+        std = self._calculate_std(lc)\n+        return np.var(lc) - std**2\n+\n+    def _calculate_std(self, lc):\n+        \"\"\"Return std calculated for the possible types of `std`\"\"\"\n+        if self.std is None:\n+            std = np.mean(lc)**0.5\n+        elif isinstance(self.std, collections.Iterable):\n+            std = np.mean(self.std)  # Iterable of numbers\n+        else:  # Single float number\n+            std = self.std\n+\n+        return std\n+\n+    def _compute_covariance(self, lc1, lc2):\n+        \"\"\"Calculate and return the covariance between two time series.\"\"\"\n+        return np.cov(lc1.counts, lc2.counts)[0][1]\n+\n+    def _calculate_covariance_error(self, lc_x, lc_y):\n+        \"\"\"Calculate the error of the normalized covariance spectrum.\"\"\"\n+        # Excess Variance of reference band\n+        xs_x = self._calculate_excess_variance(lc_x)\n+        # Standard deviation of light curve\n+        err_y = self._calculate_std(lc_y)\n+        # Excess Variance of reference band\n+        xs_y = self._calculate_excess_variance(lc_y)\n+        # Standard deviation of light curve\n+        err_x = self._calculate_std(lc_x)\n+        # Number of time bins in lightcurve\n+        N = lc_x.ncounts\n+        # Number of segments averaged\n+        if not self.avg_covar:\n+            M = 1\n+        else:\n+            M = self.segment_size","path":"stingray/covariancespectrum.py","position":320,"original_position":320,"commit_id":"5ead7beadd17a4be1e2db1b5bb7e1ffb4aef8527","original_commit_id":"5ead7beadd17a4be1e2db1b5bb7e1ffb4aef8527","user":{"login":"dhuppenkothen","id":5237391,"avatar_url":"https://avatars.githubusercontent.com/u/5237391?v=3","gravatar_id":"","url":"https://api.github.com/users/dhuppenkothen","html_url":"https://github.com/dhuppenkothen","followers_url":"https://api.github.com/users/dhuppenkothen/followers","following_url":"https://api.github.com/users/dhuppenkothen/following{/other_user}","gists_url":"https://api.github.com/users/dhuppenkothen/gists{/gist_id}","starred_url":"https://api.github.com/users/dhuppenkothen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhuppenkothen/subscriptions","organizations_url":"https://api.github.com/users/dhuppenkothen/orgs","repos_url":"https://api.github.com/users/dhuppenkothen/repos","events_url":"https://api.github.com/users/dhuppenkothen/events{/privacy}","received_events_url":"https://api.github.com/users/dhuppenkothen/received_events","type":"User","site_admin":false},"body":"This should be `self.nbins`, not `self.segment_size`. `M` is the number of averaged segments.","created_at":"2016-08-02T19:26:54Z","updated_at":"2016-08-02T19:26:54Z","html_url":"https://github.com/StingraySoftware/stingray/pull/111#discussion_r73220766","pull_request_url":"https://api.github.com/repos/StingraySoftware/stingray/pulls/111","_links":{"self":{"href":"https://api.github.com/repos/StingraySoftware/stingray/pulls/comments/73220766"},"html":{"href":"https://github.com/StingraySoftware/stingray/pull/111#discussion_r73220766"},"pull_request":{"href":"https://api.github.com/repos/StingraySoftware/stingray/pulls/111"}}},"pull_request":{"url":"https://api.github.com/repos/StingraySoftware/stingray/pulls/111","id":75209775,"html_url":"https://github.com/StingraySoftware/stingray/pull/111","diff_url":"https://github.com/StingraySoftware/stingray/pull/111.diff","patch_url":"https://github.com/StingraySoftware/stingray/pull/111.patch","issue_url":"https://api.github.com/repos/StingraySoftware/stingray/issues/111","number":111,"state":"open","locked":false,"title":"Add covariance spectra","user":{"login":"OrkoHunter","id":8065913,"avatar_url":"https://avatars.githubusercontent.com/u/8065913?v=3","gravatar_id":"","url":"https://api.github.com/users/OrkoHunter","html_url":"https://github.com/OrkoHunter","followers_url":"https://api.github.com/users/OrkoHunter/followers","following_url":"https://api.github.com/users/OrkoHunter/following{/other_user}","gists_url":"https://api.github.com/users/OrkoHunter/gists{/gist_id}","starred_url":"https://api.github.com/users/OrkoHunter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OrkoHunter/subscriptions","organizations_url":"https://api.github.com/users/OrkoHunter/orgs","repos_url":"https://api.github.com/users/OrkoHunter/repos","events_url":"https://api.github.com/users/OrkoHunter/events{/privacy}","received_events_url":"https://api.github.com/users/OrkoHunter/received_events","type":"User","site_admin":false},"body":"Currently, this PR adds a basic functionality to create a covariance spectra for full range of event list.\r\nTo do :\r\n\r\n- [x] Add band of interest for reference spectrum\r\n- [x] Add band of interest for base light curve\r\n\r\nA working example :-\r\n```python\r\n>>> event_list = np.array([[1, 2],\r\n                       [1, 4],\r\n                       [1, 8],\r\n                       [3, 6],\r\n                       [3, 1],\r\n                       [4, 2],\r\n                       [4, 4],\r\n                       [4, 6],\r\n                       [4, 7],\r\n                       [4, 5],\r\n                       [4, 9],\r\n                       [5, 1],\r\n                       [5, 6],\r\n                       [5, 7],\r\n                       [5, 9],\r\n                       [5, 3],\r\n                       [5, 8],\r\n                       [6, 1],\r\n                       [6, 3],\r\n                       [7, 3],\r\n                       [7, 4],\r\n                       [7, 5],\r\n                       [7, 7],\r\n                       [8, 8],\r\n                       [9, 2],\r\n                       [9, 5],\r\n                       [9, 9]])\r\n\r\n>>> c = Covariancespectrum(event_list, 1)\r\n\r\n>>> c.energy_covar\r\n{1.5: -0.2857142857142857,\r\n 2.5: 0.14285714285714285,\r\n 3.5: 0.0,\r\n 4.5: 0.14285714285714285,\r\n 5.5: 0.2857142857142857,\r\n 6.5: 0.2857142857142857,\r\n 7.5: 0.5714285714285714,\r\n 8.5: 0.46428571428571425}\r\n```\r\n\r\nThe format and technique are all open to discussion. I've ignored a little of pep8, which I intend to fix soon.\r\n\r\n<!-- Reviewable:start -->\r\n---\r\nThis change is [<img src=\"https://reviewable.io/review_button.svg\" height=\"35\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.io/reviews/stingraysoftware/stingray/111)\r\n<!-- Reviewable:end -->\r\n","created_at":"2016-06-25T17:21:08Z","updated_at":"2016-08-02T19:26:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2cf60e274051c4ea643530b234cd7d8d8cb61993","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/StingraySoftware/stingray/pulls/111/commits","review_comments_url":"https://api.github.com/repos/StingraySoftware/stingray/pulls/111/comments","review_comment_url":"https://api.github.com/repos/StingraySoftware/stingray/pulls/comments{/number}","comments_url":"https://api.github.com/repos/StingraySoftware/stingray/issues/111/comments","statuses_url":"https://api.github.com/repos/StingraySoftware/stingray/statuses/5ead7beadd17a4be1e2db1b5bb7e1ffb4aef8527","head":{"label":"OrkoHunter:covar_spectra","ref":"covar_spectra","sha":"5ead7beadd17a4be1e2db1b5bb7e1ffb4aef8527","user":{"login":"OrkoHunter","id":8065913,"avatar_url":"https://avatars.githubusercontent.com/u/8065913?v=3","gravatar_id":"","url":"https://api.github.com/users/OrkoHunter","html_url":"https://github.com/OrkoHunter","followers_url":"https://api.github.com/users/OrkoHunter/followers","following_url":"https://api.github.com/users/OrkoHunter/following{/other_user}","gists_url":"https://api.github.com/users/OrkoHunter/gists{/gist_id}","starred_url":"https://api.github.com/users/OrkoHunter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OrkoHunter/subscriptions","organizations_url":"https://api.github.com/users/OrkoHunter/orgs","repos_url":"https://api.github.com/users/OrkoHunter/repos","events_url":"https://api.github.com/users/OrkoHunter/events{/privacy}","received_events_url":"https://api.github.com/users/OrkoHunter/received_events","type":"User","site_admin":false},"repo":{"id":52942813,"name":"stingray","full_name":"OrkoHunter/stingray","owner":{"login":"OrkoHunter","id":8065913,"avatar_url":"https://avatars.githubusercontent.com/u/8065913?v=3","gravatar_id":"","url":"https://api.github.com/users/OrkoHunter","html_url":"https://github.com/OrkoHunter","followers_url":"https://api.github.com/users/OrkoHunter/followers","following_url":"https://api.github.com/users/OrkoHunter/following{/other_user}","gists_url":"https://api.github.com/users/OrkoHunter/gists{/gist_id}","starred_url":"https://api.github.com/users/OrkoHunter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OrkoHunter/subscriptions","organizations_url":"https://api.github.com/users/OrkoHunter/orgs","repos_url":"https://api.github.com/users/OrkoHunter/repos","events_url":"https://api.github.com/users/OrkoHunter/events{/privacy}","received_events_url":"https://api.github.com/users/OrkoHunter/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/OrkoHunter/stingray","description":"Time Series Methods For Astronomical X-ray Data That Aren''t Fishy At All!","fork":true,"url":"https://api.github.com/repos/OrkoHunter/stingray","forks_url":"https://api.github.com/repos/OrkoHunter/stingray/forks","keys_url":"https://api.github.com/repos/OrkoHunter/stingray/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OrkoHunter/stingray/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OrkoHunter/stingray/teams","hooks_url":"https://api.github.com/repos/OrkoHunter/stingray/hooks","issue_events_url":"https://api.github.com/repos/OrkoHunter/stingray/issues/events{/number}","events_url":"https://api.github.com/repos/OrkoHunter/stingray/events","assignees_url":"https://api.github.com/repos/OrkoHunter/stingray/assignees{/user}","branches_url":"https://api.github.com/repos/OrkoHunter/stingray/branches{/branch}","tags_url":"https://api.github.com/repos/OrkoHunter/stingray/tags","blobs_url":"https://api.github.com/repos/OrkoHunter/stingray/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OrkoHunter/stingray/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OrkoHunter/stingray/git/refs{/sha}","trees_url":"https://api.github.com/repos/OrkoHunter/stingray/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OrkoHunter/stingray/statuses/{sha}","languages_url":"https://api.github.com/repos/OrkoHunter/stingray/languages","stargazers_url":"https://api.github.com/repos/OrkoHunter/stingray/stargazers","contributors_url":"https://api.github.com/repos/OrkoHunter/stingray/contributors","subscribers_url":"https://api.github.com/repos/OrkoHunter/stingray/subscribers","subscription_url":"https://api.github.com/repos/OrkoHunter/stingray/subscription","commits_url":"https://api.github.com/repos/OrkoHunter/stingray/commits{/sha}","git_commits_url":"https://api.github.com/repos/OrkoHunter/stingray/git/commits{/sha}","comments_url":"https://api.github.com/repos/OrkoHunter/stingray/comments{/number}","issue_comment_url":"https://api.github.com/repos/OrkoHunter/stingray/issues/comments{/number}","contents_url":"https://api.github.com/repos/OrkoHunter/stingray/contents/{+path}","compare_url":"https://api.github.com/repos/OrkoHunter/stingray/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OrkoHunter/stingray/merges","archive_url":"https://api.github.com/repos/OrkoHunter/stingray/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OrkoHunter/stingray/downloads","issues_url":"https://api.github.com/repos/OrkoHunter/stingray/issues{/number}","pulls_url":"https://api.github.com/repos/OrkoHunter/stingray/pulls{/number}","milestones_url":"https://api.github.com/repos/OrkoHunter/stingray/milestones{/number}","notifications_url":"https://api.github.com/repos/OrkoHunter/stingray/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OrkoHunter/stingray/labels{/name}","releases_url":"https://api.github.com/repos/OrkoHunter/stingray/releases{/id}","deployments_url":"https://api.github.com/repos/OrkoHunter/stingray/deployments","created_at":"2016-03-02T07:25:13Z","updated_at":"2016-03-02T07:25:14Z","pushed_at":"2016-08-02T19:13:23Z","git_url":"git://github.com/OrkoHunter/stingray.git","ssh_url":"git@github.com:OrkoHunter/stingray.git","clone_url":"https://github.com/OrkoHunter/stingray.git","svn_url":"https://github.com/OrkoHunter/stingray","homepage":null,"size":1519,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"StingraySoftware:master","ref":"master","sha":"9015d7e506ac680c5afc3f586abefdff71a64f5f","user":{"login":"StingraySoftware","id":17048750,"avatar_url":"https://avatars.githubusercontent.com/u/17048750?v=3","gravatar_id":"","url":"https://api.github.com/users/StingraySoftware","html_url":"https://github.com/StingraySoftware","followers_url":"https://api.github.com/users/StingraySoftware/followers","following_url":"https://api.github.com/users/StingraySoftware/following{/other_user}","gists_url":"https://api.github.com/users/StingraySoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/StingraySoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StingraySoftware/subscriptions","organizations_url":"https://api.github.com/users/StingraySoftware/orgs","repos_url":"https://api.github.com/users/StingraySoftware/repos","events_url":"https://api.github.com/users/StingraySoftware/events{/privacy}","received_events_url":"https://api.github.com/users/StingraySoftware/received_events","type":"Organization","site_admin":false},"repo":{"id":43449839,"name":"stingray","full_name":"StingraySoftware/stingray","owner":{"login":"StingraySoftware","id":17048750,"avatar_url":"https://avatars.githubusercontent.com/u/17048750?v=3","gravatar_id":"","url":"https://api.github.com/users/StingraySoftware","html_url":"https://github.com/StingraySoftware","followers_url":"https://api.github.com/users/StingraySoftware/followers","following_url":"https://api.github.com/users/StingraySoftware/following{/other_user}","gists_url":"https://api.github.com/users/StingraySoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/StingraySoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StingraySoftware/subscriptions","organizations_url":"https://api.github.com/users/StingraySoftware/orgs","repos_url":"https://api.github.com/users/StingraySoftware/repos","events_url":"https://api.github.com/users/StingraySoftware/events{/privacy}","received_events_url":"https://api.github.com/users/StingraySoftware/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/StingraySoftware/stingray","description":"Time Series Methods For Astronomical X-ray Data That Aren''t Fishy At All!","fork":false,"url":"https://api.github.com/repos/StingraySoftware/stingray","forks_url":"https://api.github.com/repos/StingraySoftware/stingray/forks","keys_url":"https://api.github.com/repos/StingraySoftware/stingray/keys{/key_id}","collaborators_url":"https://api.github.com/repos/StingraySoftware/stingray/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/StingraySoftware/stingray/teams","hooks_url":"https://api.github.com/repos/StingraySoftware/stingray/hooks","issue_events_url":"https://api.github.com/repos/StingraySoftware/stingray/issues/events{/number}","events_url":"https://api.github.com/repos/StingraySoftware/stingray/events","assignees_url":"https://api.github.com/repos/StingraySoftware/stingray/assignees{/user}","branches_url":"https://api.github.com/repos/StingraySoftware/stingray/branches{/branch}","tags_url":"https://api.github.com/repos/StingraySoftware/stingray/tags","blobs_url":"https://api.github.com/repos/StingraySoftware/stingray/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/StingraySoftware/stingray/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/StingraySoftware/stingray/git/refs{/sha}","trees_url":"https://api.github.com/repos/StingraySoftware/stingray/git/trees{/sha}","statuses_url":"https://api.github.com/repos/StingraySoftware/stingray/statuses/{sha}","languages_url":"https://api.github.com/repos/StingraySoftware/stingray/languages","stargazers_url":"https://api.github.com/repos/StingraySoftware/stingray/stargazers","contributors_url":"https://api.github.com/repos/StingraySoftware/stingray/contributors","subscribers_url":"https://api.github.com/repos/StingraySoftware/stingray/subscribers","subscription_url":"https://api.github.com/repos/StingraySoftware/stingray/subscription","commits_url":"https://api.github.com/repos/StingraySoftware/stingray/commits{/sha}","git_commits_url":"https://api.github.com/repos/StingraySoftware/stingray/git/commits{/sha}","comments_url":"https://api.github.com/repos/StingraySoftware/stingray/comments{/number}","issue_comment_url":"https://api.github.com/repos/StingraySoftware/stingray/issues/comments{/number}","contents_url":"https://api.github.com/repos/StingraySoftware/stingray/contents/{+path}","compare_url":"https://api.github.com/repos/StingraySoftware/stingray/compare/{base}...{head}","merges_url":"https://api.github.com/repos/StingraySoftware/stingray/merges","archive_url":"https://api.github.com/repos/StingraySoftware/stingray/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/StingraySoftware/stingray/downloads","issues_url":"https://api.github.com/repos/StingraySoftware/stingray/issues{/number}","pulls_url":"https://api.github.com/repos/StingraySoftware/stingray/pulls{/number}","milestones_url":"https://api.github.com/repos/StingraySoftware/stingray/milestones{/number}","notifications_url":"https://api.github.com/repos/StingraySoftware/stingray/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/StingraySoftware/stingray/labels{/name}","releases_url":"https://api.github.com/repos/StingraySoftware/stingray/releases{/id}","deployments_url":"https://api.github.com/repos/StingraySoftware/stingray/deployments","created_at":"2015-09-30T18:04:33Z","updated_at":"2016-07-27T19:48:51Z","pushed_at":"2016-08-02T19:13:31Z","git_url":"git://github.com/StingraySoftware/stingray.git","ssh_url":"git@github.com:StingraySoftware/stingray.git","clone_url":"https://github.com/StingraySoftware/stingray.git","svn_url":"https://github.com/StingraySoftware/stingray","homepage":null,"size":1211,"stargazers_count":14,"watchers_count":14,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":34,"mirror_url":null,"open_issues_count":38,"forks":34,"open_issues":38,"watchers":14,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/StingraySoftware/stingray/pulls/111"},"html":{"href":"https://github.com/StingraySoftware/stingray/pull/111"},"issue":{"href":"https://api.github.com/repos/StingraySoftware/stingray/issues/111"},"comments":{"href":"https://api.github.com/repos/StingraySoftware/stingray/issues/111/comments"},"review_comments":{"href":"https://api.github.com/repos/StingraySoftware/stingray/pulls/111/comments"},"review_comment":{"href":"https://api.github.com/repos/StingraySoftware/stingray/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/StingraySoftware/stingray/pulls/111/commits"},"statuses":{"href":"https://api.github.com/repos/StingraySoftware/stingray/statuses/5ead7beadd17a4be1e2db1b5bb7e1ffb4aef8527"}}}}
{"actor":{"display_login":"dhuppenkothen"}}