pep8speaks: Hello @matteobachetti! Thanks for opening this PR. We checked the lines you've touched for [PEP 8](https://www.python.org/dev/peps/pep-0008) issues, and found:





* In the file [`stingray/tests/test_events.py`](https://github.com/StingraySoftware/stingray/blob/6e393fd2a564269b902491ac81e1c96ab5e35f47/stingray/tests/test_events.py):

> [Line 233:61](https://github.com/StingraySoftware/stingray/blob/6e393fd2a564269b902491ac81e1c96ab5e35f47/stingray/tests/test_events.py#L233): [E231](https://duckduckgo.com/?q=pep8%20E231) missing whitespace after ','
> [Line 237:52](https://github.com/StingraySoftware/stingray/blob/6e393fd2a564269b902491ac81e1c96ab5e35f47/stingray/tests/test_events.py#L237): [E231](https://duckduckgo.com/?q=pep8%20E231) missing whitespace after ','




matteobachetti: @dhuppenkothen I rebased to the current master
codecov-commenter: # [Codecov](https://codecov.io/gh/StingraySoftware/stingray/pull/468?src=pr&el=h1) Report
> Merging [#468](https://codecov.io/gh/StingraySoftware/stingray/pull/468?src=pr&el=desc) into [master](https://codecov.io/gh/StingraySoftware/stingray/commit/870f122354d1763b4542640c75d2280bfc2a10c3&el=desc) will **increase** coverage by `0.04%`.
> The diff coverage is `97.50%`.

[![Impacted file tree graph](https://codecov.io/gh/StingraySoftware/stingray/pull/468/graphs/tree.svg?width=650&height=150&src=pr&token=FjWeFfhU9F)](https://codecov.io/gh/StingraySoftware/stingray/pull/468?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master     #468      +/-   ##
==========================================
+ Coverage   95.17%   95.21%   +0.04%     
==========================================
  Files          35       35              
  Lines        5176     5204      +28     
==========================================
+ Hits         4926     4955      +29     
+ Misses        250      249       -1     
```


| [Impacted Files](https://codecov.io/gh/StingraySoftware/stingray/pull/468?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [stingray/gti.py](https://codecov.io/gh/StingraySoftware/stingray/pull/468/diff?src=pr&el=tree#diff-c3RpbmdyYXkvZ3RpLnB5) | `97.89% <95.45%> (-0.23%)` | :arrow_down: |
| [stingray/events.py](https://codecov.io/gh/StingraySoftware/stingray/pull/468/diff?src=pr&el=tree#diff-c3RpbmdyYXkvZXZlbnRzLnB5) | `100.00% <100.00%> (ø)` | |
| [stingray/lightcurve.py](https://codecov.io/gh/StingraySoftware/stingray/pull/468/diff?src=pr&el=tree#diff-c3RpbmdyYXkvbGlnaHRjdXJ2ZS5weQ==) | `97.02% <100.00%> (+0.39%)` | :arrow_up: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/StingraySoftware/stingray/pull/468?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/StingraySoftware/stingray/pull/468?src=pr&el=footer). Last update [870f122...f2794c9](https://codecov.io/gh/StingraySoftware/stingray/pull/468?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

diff --git a/stingray/events.py b/stingray/events.py
index 8c998d4a..e5df3659 100644
--- a/stingray/events.py
+++ b/stingray/events.py
@@ -297,6 +297,10 @@ class EventList(object):
             simon("One of the event lists you are concatenating is empty.")
             other.time = np.asarray([])
 
+        # Tolerance for MJDREF:1 microsecond
+        if not np.isclose(self.mjdref, other.mjdref, atol=1e-6 / 86400):
+            other = other.change_mjdref(self.mjdref)
+
         ev_new.time = np.concatenate([self.time, other.time])
         order = np.argsort(ev_new.time)
         ev_new.time = ev_new.time[order]
@@ -511,3 +515,46 @@ class EventList(object):
             new_ev = [new_ev, retall]
 
         return new_ev
+
+    def change_mjdref(self, new_mjdref):
+        """Change the MJD reference time (MJDREF) of the light curve.
+
+        Times will be now referred to this new MJDREF
+
+        Parameters
+        ----------
+        new_mjdref : float
+            New MJDREF
+
+        Returns
+        -------
+        new_lc : :class:`EventList` object
+            The new LC shifted by MJDREF
+        """
+        time_shift = (self.mjdref - new_mjdref) * 86400
+
+        new_ev = self.shift(time_shift)
+        new_ev.mjdref = new_mjdref
+        return new_ev
+
+    def shift(self, time_shift):
+        """
+        Shift the events and the GTIs in time.
+
+        Parameters
+        ----------
+        time_shift: float
+            The time interval by which the light curve will be shifted (in
+            the same units as the time array in :class:`Lightcurve`
+
+        Returns
+        -------
+        new_ev : lightcurve.Lightcurve object
+            The new event list shifted by ``time_shift``
+
+        """
+        new_ev = copy.deepcopy(self)
+        new_ev.time = new_ev.time + time_shift
+        new_ev.gti = new_ev.gti + time_shift
+
+        return new_ev
diff --git a/stingray/gti.py b/stingray/gti.py
index 90d6de0f..dfedd4ef 100644
--- a/stingray/gti.py
+++ b/stingray/gti.py
@@ -620,6 +620,28 @@ def gti_len(gti):
     return np.sum(gti[:, 1] - gti[:, 0])
 
 
+@jit(nopython=True)
+def _check_separate(gti0, gti1):
+    """Numba-compiled core of ``check_separate``."""
+    gti0_start = gti0[:, 0]
+    gti0_end = gti0[:, 1]
+    gti1_start = gti1[:, 0]
+    gti1_end = gti1[:, 1]
+
+    if (gti0_end[-1] <= gti1_start[0]) or (gti1_end[-1] <= gti0_start[0]):
+        return True
+
+    for g in gti1.flatten():
+        for g0, g1 in zip(gti0[:, 0], gti0[:, 1]):
+            if (g <= g1) and (g >= g0):
+                return False
+    for g in gti0.flatten():
+        for g0, g1 in zip(gti1[:, 0], gti1[:, 1]):
+            if (g <= g1) and (g >= g0):
+                return False
+    return True
+
+
 def check_separate(gti0, gti1):
     """
     Check if two GTIs do not overlap.
@@ -636,6 +658,33 @@ def check_separate(gti0, gti1):
     -------
     separate: bool
         ``True`` if GTIs are mutually exclusive, ``False`` if not
+
+    Examples
+    --------
+    >>> gti0 = [[0, 10]]
+    >>> gti1 = [[20, 30]]
+    >>> check_separate(gti0, gti1)
+    True
+    >>> gti0 = [[0, 10]]
+    >>> gti1 = [[0, 10]]
+    >>> check_separate(gti0, gti1)
+    False
+    >>> gti0 = [[0, 10]]
+    >>> gti1 = [[10, 20]]
+    >>> check_separate(gti0, gti1)
+    True
+    >>> gti0 = [[0, 11]]
+    >>> gti1 = [[10, 20]]
+    >>> check_separate(gti0, gti1)
+    False
+    >>> gti0 = [[0, 11]]
+    >>> gti1 = [[10, 20]]
+    >>> check_separate(gti1, gti0)
+    False
+    >>> gti0 = [[0, 10], [30, 40]]
+    >>> gti1 = [[11, 28]]
+    >>> check_separate(gti0, gti1)
+    True
     """
 
     gti0 = np.asarray(gti0)
@@ -646,16 +695,9 @@ def check_separate(gti0, gti1):
     # Check if independently GTIs are well behaved
     check_gtis(gti0)
     check_gtis(gti1)
-
-    gti0_start = gti0[:, 0][0]
-    gti0_end = gti0[:, 1][-1]
-    gti1_start = gti1[:, 0][0]
-    gti1_end = gti1[:, 1][-1]
-
-    if (gti0_end <= gti1_start) or (gti1_end <= gti0_start):
-        return True
-    else:
-        return False
+    t0 = min(gti0[0, 0], gti1[0, 0])
+    return _check_separate((gti0 - t0).astype(np.double),
+                           (gti1 - t0).astype(np.double))
 
 
 def join_equal_gti_boundaries(gti):
@@ -701,13 +743,15 @@ def append_gtis(gti0, gti1):
     --------
     >>> np.all(append_gtis([[0, 1]], [[2, 3]]) == [[0, 1], [2, 3]])
     True
+    >>> np.allclose(append_gtis([[0, 1], [4, 5]], [[2, 3]]),
+    ...             [[0, 1], [2, 3], [4, 5]])
+    True
     >>> np.all(append_gtis([[0, 1]], [[1, 3]]) == [[0, 3]])
     True
     """
 
     gti0 = np.asarray(gti0)
     gti1 = np.asarray(gti1)
-
     # Check if independently GTIs are well behaved.
     check_gtis(gti0)
     check_gtis(gti1)
@@ -717,9 +761,9 @@ def append_gtis(gti0, gti1):
         raise ValueError('In order to append, GTIs must be mutually'
                          'exclusive.')
 
-    new_gtis = np.sort(np.concatenate([gti0, gti1]))
-
-    return join_equal_gti_boundaries(new_gtis)
+    new_gtis = np.concatenate([gti0, gti1])
+    order = np.argsort(new_gtis[:, 0])
+    return join_equal_gti_boundaries(new_gtis[order])
 
 
 def join_gtis(gti0, gti1):
diff --git a/stingray/lightcurve.py b/stingray/lightcurve.py
index 9ebbca56..238d456e 100644
--- a/stingray/lightcurve.py
+++ b/stingray/lightcurve.py
@@ -4,7 +4,7 @@ Definition of :class::class:`Lightcurve`.
 :class::class:`Lightcurve` is used to create light curves out of photon counting data
 or to save existing light curves in a class that's easy to use.
 """
-
+import warnings
 import logging
 import numpy as np
 import stingray.io as io
@@ -435,7 +435,7 @@ class Lightcurve(object):
         new_lc : lightcurve.Lightcurve object
             The new LC shifted by MJDREF
         """
-        time_shift = (new_mjdref - self.mjdref) * 86400
+        time_shift = -(new_mjdref - self.mjdref) * 86400
 
         new_lc = self.shift(time_shift)
         new_lc.mjdref = new_mjdref
@@ -485,7 +485,8 @@ class Lightcurve(object):
             The new light curve calculated in ``operation``
         """
         if self.mjdref != other.mjdref:
-            raise ValueError("MJDref is different in the two light curves")
+            warnings.warn("MJDref is different in the two light curves")
+            other = other.change_mjdref(self.mjdref)
 
         common_gti = cross_two_gtis(self.gti, other.gti)
         mask_self = create_gti_mask(self.time, common_gti, dt=self.dt)
@@ -924,7 +925,8 @@ class Lightcurve(object):
         array([ 300,  100,  400,  600, 1200,  800])
         """
         if self.mjdref != other.mjdref:
-            raise ValueError("MJDref is different in the two light curves")
+            warnings.warn("MJDref is different in the two light curves")
+            other = other.change_mjdref(self.mjdref)
 
         if self.dt != other.dt:
             utils.simon("The two light curves have different bin widths.")

Allow merging event lists from different instruments
Need to have some `change_mjdref` method in `EventList`, similar to the one in `Lightcurve`. 
diff --git a/stingray/tests/test_events.py b/stingray/tests/test_events.py
index a7e42ca6..0b84f870 100644
--- a/stingray/tests/test_events.py
+++ b/stingray/tests/test_events.py
@@ -226,6 +226,24 @@ class TestEvents(object):
                 np.array([10, 6, 2, 2, 11, 8, 1, 3, 3, 2])).all()
         assert (ev_new.gti == np.array([[5, 6]])).all()
 
+    def test_overlapping_join_change_mjdref(self):
+        """Join two non-overlapping event lists.
+        """
+        ev = EventList(time=[1, 1, 10, 6, 5],
+                       energy=[10, 6, 3, 11, 2], gti=[[1, 3],[5, 6]],
+                       mjdref=57001)
+        ev_other = EventList(time=np.asarray([5, 7, 6, 6, 10]) + 86400,
+                             energy=[2, 3, 8, 1, 2],
+                             gti=np.asarray([[5, 7],[8, 10]]) + 86400,
+                             mjdref=57000)
+        ev_new = ev.join(ev_other)
+
+        assert np.allclose(ev_new.time,
+                           np.array([1, 1, 5, 5, 6, 6, 6, 7, 10, 10]))
+        assert (ev_new.energy ==
+                np.array([10, 6, 2, 2, 11, 8, 1, 3, 3, 2])).all()
+        assert np.allclose(ev_new.gti, np.array([[5, 6]]))
+
     def test_io_with_ascii(self):
         ev = EventList(self.time)
         ev.write('ascii_ev.txt',format_='ascii')
diff --git a/stingray/tests/test_lightcurve.py b/stingray/tests/test_lightcurve.py
index 40b7e62b..52bfde72 100644
--- a/stingray/tests/test_lightcurve.py
+++ b/stingray/tests/test_lightcurve.py
@@ -214,7 +214,7 @@ class TestLightcurve(object):
         cls.times = np.array([1, 2, 3, 4])
         cls.counts = np.array([2, 2, 2, 2])
         cls.dt = 1.0
-        cls.gti = [[0.5, 4.5]]
+        cls.gti = np.array([[0.5, 4.5]])
 
     def test_create(self):
         """
@@ -462,12 +462,6 @@ class TestLightcurve(object):
         lc = lc1 + lc2
         np.testing.assert_almost_equal(lc.gti, self.gti)
 
-    def test_add_with_different_mjdref(self):
-        lc1 = Lightcurve(self.times, self.counts, gti=self.gti, mjdref=57000)
-        lc2 = Lightcurve(self.times, self.counts, gti=self.gti, mjdref=57001)
-        with pytest.raises(ValueError):
-            lc1 + lc2
-
     def test_add_with_different_gtis(self):
         gti = [[0., 3.5]]
         lc1 = Lightcurve(self.times, self.counts, gti=self.gti)
@@ -515,12 +509,6 @@ class TestLightcurve(object):
             assert np.any(["ightcurves have different statistics"
                            in str(wi.message) for wi in w])
 
-    def test_sub_with_different_mjdref(self):
-        lc1 = Lightcurve(self.times, self.counts, gti=self.gti, mjdref=57000)
-        lc2 = Lightcurve(self.times, self.counts, gti=self.gti, mjdref=57001)
-        with pytest.raises(ValueError):
-            lc1 - lc2
-
     def test_subtraction(self):
         _counts = [3, 4, 5, 6]
 
@@ -597,10 +585,37 @@ class TestLightcurve(object):
                            in str(wi.message) for wi in w])
 
     def test_join_with_different_mjdref(self):
-        lc1 = Lightcurve(self.times, self.counts, gti=self.gti, mjdref=57000)
+        shift = 86400.  # day
+        lc1 = Lightcurve(self.times + shift, self.counts, gti=self.gti + shift,
+                         mjdref=57000)
         lc2 = Lightcurve(self.times, self.counts, gti=self.gti, mjdref=57001)
-        with pytest.raises(ValueError):
-            lc1.join(lc2)
+        newlc = lc1.join(lc2)
+        # The join operation *averages* the overlapping arrays
+        assert np.allclose(newlc.counts, lc1.counts)
+
+    def test_sum_with_different_mjdref(self):
+        shift = 86400.  # day
+        lc1 = Lightcurve(self.times + shift, self.counts, gti=self.gti + shift,
+                         mjdref=57000)
+        lc2 = Lightcurve(self.times, self.counts, gti=self.gti, mjdref=57001)
+        with pytest.warns(UserWarning) as record:
+            newlc = lc1 + lc2
+        assert np.any(["MJDref"
+                       in r.message.args[0] for r in record])
+
+        assert np.allclose(newlc.counts, lc1.counts * 2)
+
+    def test_subtract_with_different_mjdref(self):
+        shift = 86400.  # day
+        lc1 = Lightcurve(self.times + shift, self.counts, gti=self.gti + shift,
+                         mjdref=57000)
+        lc2 = Lightcurve(self.times, self.counts, gti=self.gti, mjdref=57001)
+        with pytest.warns(UserWarning) as record:
+            newlc = lc1 - lc2
+        assert np.any(["MJDref"
+                       in r.message.args[0] for r in record])
+
+        assert np.allclose(newlc.counts, 0)
 
     def test_join_disjoint_time_arrays(self):
         _times = [5, 6, 7, 8]

pip install -e .[modeling]
parse_log_pytest
pytest
pytest pytest-astropy h5py tqdm emcee corner statsmodels
apt-get update apt-get install -y gcc
3.8
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
astropy==5.2.2
attrs==25.3.0
contourpy==1.1.1
corner==2.2.1
coverage==7.6.1
cycler==0.12.1
emcee==3.1.6
exceptiongroup @ file:///croot/exceptiongroup_1706031385326/work
fonttools==4.56.0
h5py==3.11.0
hypothesis==6.113.0
importlib_resources==6.4.5
iniconfig @ file:///home/linux1/recipes/ci/iniconfig_1610983019677/work
kiwisolver==1.4.7
matplotlib==3.7.5
numpy==1.24.4
packaging @ file:///croot/packaging_1720101850331/work
pandas==2.0.3
patsy==1.0.1
pillow==10.4.0
pluggy @ file:///tmp/build/80754af9/pluggy_1648042571233/work
pyerfa==2.0.0.3
pyparsing==3.1.4
pytest @ file:///croot/pytest_1717793244625/work
pytest-arraydiff==0.6.1
pytest-astropy==0.11.0
pytest-astropy-header==0.2.2
pytest-cov==5.0.0
pytest-doctestplus==1.3.0
pytest-filter-subpackage==0.2.0
pytest-mock==3.14.0
pytest-remotedata==0.4.1
python-dateutil==2.9.0.post0
pytz==2025.2
PyYAML==6.0.2
scipy==1.10.1
six==1.17.0
sortedcontainers==2.4.0
statsmodels==0.14.1
-e git+https://github.com/StingraySoftware/stingray.git@ecf062aec83c25ddfcd4a17b13dc86e579b81b2a#egg=stingray
tomli @ file:///opt/conda/conda-bld/tomli_1657175507142/work
tqdm==4.67.1
tzdata==2025.2
zipp==3.20.2

name: stingray
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - exceptiongroup=1.2.0=py38h06a4308_0
  - iniconfig=1.1.1=pyhd3eb1b0_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=3.0.16=h5eee18b_0
  - packaging=24.1=py38h06a4308_0
  - pip=24.2=py38h06a4308_0
  - pluggy=1.0.0=py38h06a4308_1
  - pytest=7.4.4=py38h06a4308_0
  - python=3.8.20=he870216_0
  - readline=8.2=h5eee18b_0
  - setuptools=75.1.0=py38h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - tomli=2.0.1=py38h06a4308_0
  - wheel=0.44.0=py38h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - astropy==5.2.2
      - attrs==25.3.0
      - contourpy==1.1.1
      - corner==2.2.1
      - coverage==7.6.1
      - cycler==0.12.1
      - emcee==3.1.6
      - fonttools==4.56.0
      - h5py==3.11.0
      - hypothesis==6.113.0
      - importlib-resources==6.4.5
      - kiwisolver==1.4.7
      - matplotlib==3.7.5
      - numpy==1.24.4
      - pandas==2.0.3
      - patsy==1.0.1
      - pillow==10.4.0
      - pyerfa==2.0.0.3
      - pyparsing==3.1.4
      - pytest-arraydiff==0.6.1
      - pytest-astropy==0.11.0
      - pytest-astropy-header==0.2.2
      - pytest-cov==5.0.0
      - pytest-doctestplus==1.3.0
      - pytest-filter-subpackage==0.2.0
      - pytest-mock==3.14.0
      - pytest-remotedata==0.4.1
      - python-dateutil==2.9.0.post0
      - pytz==2025.2
      - pyyaml==6.0.2
      - scipy==1.10.1
      - six==1.17.0
      - sortedcontainers==2.4.0
      - statsmodels==0.14.1
      - stingray==0.1.4.dev255+gecf062ae
      - tqdm==4.67.1
      - tzdata==2025.2
      - zipp==3.20.2
prefix: /opt/conda/envs/stingray

stingray/tests/test_events.py::TestEvents::test_overlapping_join_change_mjdref
stingray/tests/test_events.py::TestEvents::test_from_lc stingray/tests/test_events.py::TestEvents::test_simulate_times stingray/tests/test_events.py::TestEvents::test_simulate_times_with_spline stingray/tests/test_events.py::TestEvents::test_io_with_ascii stingray/tests/test_events.py::TestEvents::test_io_with_hdf5 stingray/tests/test_lightcurve.py::TestLightcurve::test_create stingray/tests/test_lightcurve.py::TestLightcurve::test_irregular_time_warning stingray/tests/test_lightcurve.py::TestLightcurve::test_unrecognize_err_dist_warning stingray/tests/test_lightcurve.py::TestLightcurve::test_n stingray/tests/test_lightcurve.py::TestLightcurve::test_analyze_lc_chunks stingray/tests/test_lightcurve.py::TestLightcurve::test_bin_edges stingray/tests/test_lightcurve.py::TestLightcurve::test_countrate stingray/tests/test_lightcurve.py::TestLightcurve::test_input_countrate stingray/tests/test_lightcurve.py::TestLightcurve::test_meanrate stingray/tests/test_lightcurve.py::TestLightcurve::test_meancounts stingray/tests/test_lightcurve.py::TestLightcurve::test_lc_gtis stingray/tests/test_lightcurve.py::TestLightcurve::test_add_with_different_time_arrays stingray/tests/test_lightcurve.py::TestLightcurve::test_add_with_different_err_dist stingray/tests/test_lightcurve.py::TestLightcurve::test_add_with_same_gtis stingray/tests/test_lightcurve.py::TestLightcurve::test_add_with_different_gtis stingray/tests/test_lightcurve.py::TestLightcurve::test_add_with_unequal_time_arrays stingray/tests/test_lightcurve.py::TestLightcurve::test_add_with_equal_time_arrays stingray/tests/test_lightcurve.py::TestLightcurve::test_sub_with_diff_time_arrays stingray/tests/test_lightcurve.py::TestLightcurve::test_sub_with_different_err_dist stingray/tests/test_lightcurve.py::TestLightcurve::test_subtraction stingray/tests/test_lightcurve.py::TestLightcurve::test_negation stingray/tests/test_lightcurve.py::TestLightcurve::test_len_function stingray/tests/test_lightcurve.py::TestLightcurve::test_indexing_with_unexpected_type stingray/tests/test_lightcurve.py::TestLightcurve::test_indexing stingray/tests/test_lightcurve.py::TestLightcurve::test_slicing stingray/tests/test_lightcurve.py::TestLightcurve::test_slicing_index_error stingray/tests/test_lightcurve.py::TestLightcurve::test_index stingray/tests/test_lightcurve.py::TestLightcurve::test_join_with_different_dt stingray/tests/test_lightcurve.py::TestLightcurve::test_join_with_different_mjdref stingray/tests/test_lightcurve.py::TestLightcurve::test_sum_with_different_mjdref stingray/tests/test_lightcurve.py::TestLightcurve::test_subtract_with_different_mjdref stingray/tests/test_lightcurve.py::TestLightcurve::test_join_disjoint_time_arrays stingray/tests/test_lightcurve.py::TestLightcurve::test_join_overlapping_time_arrays stingray/tests/test_lightcurve.py::TestLightcurve::test_join_different_err_dist_disjoint_times stingray/tests/test_lightcurve.py::TestLightcurve::test_join_different_err_dist_overlapping_times stingray/tests/test_lightcurve.py::TestLightcurve::test_truncate_by_index stingray/tests/test_lightcurve.py::TestLightcurve::test_truncate_by_time_stop_less_than_start stingray/tests/test_lightcurve.py::TestLightcurve::test_truncate_fails_with_incorrect_method stingray/tests/test_lightcurve.py::TestLightcurve::test_truncate_by_time stingray/tests/test_lightcurve.py::TestLightcurve::test_split_with_two_segments stingray/tests/test_lightcurve.py::TestLightcurve::test_split_has_correct_data_points stingray/tests/test_lightcurve.py::TestLightcurve::test_split_with_three_segments stingray/tests/test_lightcurve.py::TestLightcurve::test_threeway_split_has_correct_data_points stingray/tests/test_lightcurve.py::TestLightcurve::test_split_with_gtis stingray/tests/test_lightcurve.py::TestLightcurve::test_consecutive_gaps stingray/tests/test_lightcurve.py::TestLightcurve::test_sort stingray/tests/test_lightcurve.py::TestLightcurve::test_sort_counts stingray/tests/test_lightcurve.py::TestLightcurve::test_sort_reverse stingray/tests/test_lightcurve.py::TestLightcurve::test_plot_simple stingray/tests/test_lightcurve.py::TestLightcurve::test_plot_wrong_label_type stingray/tests/test_lightcurve.py::TestLightcurve::test_plot_labels_index_error stingray/tests/test_lightcurve.py::TestLightcurve::test_plot_default_filename stingray/tests/test_lightcurve.py::TestLightcurve::test_plot_custom_filename stingray/tests/test_lightcurve.py::TestLightcurve::test_plot_axis stingray/tests/test_lightcurve.py::TestLightcurve::test_plot_title stingray/tests/test_lightcurve.py::TestLightcurve::test_io_with_ascii stingray/tests/test_lightcurve.py::TestLightcurve::test_io_with_pickle stingray/tests/test_lightcurve.py::TestLightcurve::test_io_with_hdf5 stingray/tests/test_lightcurve.py::TestLightcurve::test_split_lc_by_gtis stingray/tests/test_lightcurve.py::TestLightcurve::test_split_lc_by_gtis_minpoints stingray/tests/test_lightcurve.py::TestLightcurve::test_shift
stingray/tests/test_events.py::TestEvents::test_inequal_length stingray/tests/test_events.py::TestEvents::test_to_lc stingray/tests/test_events.py::TestEvents::test_simulate_energies stingray/tests/test_events.py::TestEvents::test_simulate_energies_with_1d_spectrum stingray/tests/test_events.py::TestEvents::test_simulate_energies_with_wrong_spectrum_type stingray/tests/test_events.py::TestEvents::test_simulate_energies_with_counts_not_set stingray/tests/test_events.py::TestEvents::test_compare_energy stingray/tests/test_events.py::TestEvents::test_join_without_times_simulated stingray/tests/test_events.py::TestEvents::test_join_empty_lists stingray/tests/test_events.py::TestEvents::test_join_different_dt stingray/tests/test_events.py::TestEvents::test_join_without_energy stingray/tests/test_events.py::TestEvents::test_join_without_pi stingray/tests/test_events.py::TestEvents::test_join_with_gti_none stingray/tests/test_events.py::TestEvents::test_non_overlapping_join stingray/tests/test_events.py::TestEvents::test_overlapping_join stingray/tests/test_events.py::TestEvents::test_io_with_pickle stingray/tests/test_events.py::TestEvents::test_io_with_fits stingray/tests/test_events.py::TestEvents::test_fits_with_standard_file stingray/tests/test_events.py::TestEvents::test_io_with_wrong_format stingray/tests/test_lightcurve.py::TestLightcurve::test_dummy_err_dist_fail stingray/tests/test_lightcurve.py::TestLightcurve::test_invalid_data stingray/tests/test_lightcurve.py::TestLightcurve::test_lightcurve_from_toa stingray/tests/test_lightcurve.py::TestLightcurve::test_lightcurve_from_toa_halfbin stingray/tests/test_lightcurve.py::TestLightcurve::test_lightcurve_from_toa_random_nums stingray/tests/test_lightcurve.py::TestLightcurve::test_tstart stingray/tests/test_lightcurve.py::TestLightcurve::test_tseg stingray/tests/test_lightcurve.py::TestLightcurve::test_nondivisble_tseg stingray/tests/test_lightcurve.py::TestLightcurve::test_correct_timeresolution stingray/tests/test_lightcurve.py::TestLightcurve::test_bin_correctly stingray/tests/test_lightcurve.py::TestLightcurve::test_creating_lightcurve_raises_type_error_when_input_is_none stingray/tests/test_lightcurve.py::TestLightcurve::test_creating_lightcurve_raises_type_error_when_input_is_inf stingray/tests/test_lightcurve.py::TestLightcurve::test_creating_lightcurve_raises_type_error_when_input_is_nan stingray/tests/test_lightcurve.py::TestLightcurve::test_init_with_diff_array_lengths stingray/tests/test_lightcurve.py::TestLightcurve::test_plot_matplotlib_not_installed
stingray/events.py stingray/lightcurve.py stingray/gti.py
stingray/events.py stingray/lightcurve.py stingray/gti.py