Skip to content

Commit

Permalink
Example eventlist test
Browse files Browse the repository at this point in the history
Co-authored-by: Matteo Bachetti <[email protected]>
  • Loading branch information
pupperemeritus and matteobachetti committed Sep 18, 2023
1 parent 095e1f1 commit b8acae9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions stingray/tests/test_lombscargle.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ def setup_class(self):
self.lc2 = Lightcurve(t, s2_new, dt=lc2.dt)
self.lscs = LombScargleCrossspectrum(lc1, lc2)

def test_eventlist(self):
ev1 = EventList.from_lc(self.lc1)
ev2 = EventList.from_lc(self.lc2)
ev_lscs = LombScargleCrossspectrum(ev1, ev2, dt=self.lc1.dt)
assert np.allclose(ev_lscs.power, self.lscs.power)
@pytest.mark.parametrize("skip_checks", [True, False])
def test_initialize_empty(self, skip_checks):
lscs = LombScargleCrossspectrum(skip_checks=skip_checks)
Expand Down

0 comments on commit b8acae9

Please sign in to comment.