From 46289a6813f38a51fce6c8ad8ae3aee951accdd1 Mon Sep 17 00:00:00 2001 From: Kyle Conroy Date: Fri, 19 Jan 2024 13:37:54 -0500 Subject: [PATCH] remote data test via searchtargetpixelfile --- lcviz/tests/test_parser.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lcviz/tests/test_parser.py b/lcviz/tests/test_parser.py index c4585e4f..4bac62dc 100644 --- a/lcviz/tests/test_parser.py +++ b/lcviz/tests/test_parser.py @@ -3,7 +3,7 @@ from glue.core.roi import XRangeROI, YRangeROI from astropy.time import Time from astropy.utils.data import download_file -from lightkurve import LightCurve +from lightkurve import LightCurve, search_targetpixelfile from lightkurve.io import kepler import astropy.units as u @@ -50,6 +50,16 @@ def test_kepler_via_mast_preparsed(helper): assert flux.unit.is_equivalent(u.electron / u.s) +@pytest.mark.remote_data +def test_kepler_tpf_via_lightkurve(helper): + tpf = search_targetpixelfile("KIC 001429092", + mission="Kepler", + cadence="long", + quarter=10).download() + helper.load_data(tpf) + assert helper.get_data().shape == (4447, 4, 6) # (time, x, y) + + def test_synthetic_lc(helper): time = Time(np.linspace(2460050, 2460060), format='jd') flux = np.ones(len(time)) * u.electron / u.s