Example #1
0
def test_sc_pipeline():
    """
    """
    sc = ShortCadence(ticid=TICID,
                      sap_mask="pipeline",
                      quality_bitmask=QUALITY_BITMASK)
    _ = sc.get_lc()
    assert isinstance(sc.lc_pdcsap, lk.LightCurve)
    assert isinstance(sc.lc_sap, lk.LightCurve)
Example #2
0
def test_sc_percentile():
    """
    """
    sc = ShortCadence(
        ticid=TICID,
        sap_mask="percentile",
        percentile=90,
        quality_bitmask=QUALITY_BITMASK,
    )
    _ = sc.make_custom_lc()
    assert isinstance(sc.lc_custom, lk.LightCurve)
Example #3
0
def test_sc_threshold():
    """
    """
    sc = ShortCadence(
        ticid=TICID,
        sap_mask="threshold",
        threshold_sigma=5,
        quality_bitmask=QUALITY_BITMASK,
    )
    _ = sc.make_custom_lc()
    assert isinstance(sc.lc_custom, lk.LightCurve)
Example #4
0
def test_sc_round():
    """
    """
    sc = ShortCadence(
        ticid=TICID,
        sap_mask="round",
        aper_radius=1,
        quality_bitmask=QUALITY_BITMASK,
    )
    _ = sc.make_custom_lc()
    assert isinstance(sc.lc_custom, lk.LightCurve)
Example #5
0
def test_sc_square():
    """
    """
    sc = ShortCadence(
        ticid=TICID,
        sap_mask="square",
        aper_radius=1,
        threshold_sigma=5,
        percentile=95,
        quality_bitmask=QUALITY_BITMASK,
    )
    _ = sc.make_custom_lc()
    assert isinstance(sc.lc_custom, lk.LightCurve)
Example #6
0
def test_sc_triceratops():
    """
    """
    sc = ShortCadence(ticid=TICID, calc_fpp=True)
    # df = sc.get_NEB_depths()
    # df = sc.get_fpp(flat=flat, plot=False)
    assert sc.triceratops is not None
Example #7
0
from matplotlib.axes import Axes
from matplotlib.figure import Figure
import lightkurve as lk
from chronos import ShortCadence
from chronos.plot import (
    plot_archival_images,
    get_dss_data,
    plot_dss_image,
    plot_possible_NEBs,
)

# TICID = 460205581
TOIID = 837

s = ShortCadence(
    # ticid=TICID,
    toiid=TOIID)
lc = s.lc_pdcsap
gaia_sources = s.query_gaia_dr2_catalog(radius=60)


def test_archival():
    fig = plot_archival_images(
        ra=s.target_coord.ra.deg,
        dec=s.target_coord.dec.deg,
        survey1="dss1",
        survey2="poss2ukstu_red",  # or ps1 which requires panstarrs3 library
        return_baseline=False,
    )
    assert isinstance(fig, Figure)