Skip to content

Commit

Permalink
passing
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminpope committed Nov 1, 2019
1 parent 38e3b18 commit 328cb5a
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 16 deletions.
Binary file added data/ktwo205897543-c03_lpd-targ.fits.gz
Binary file not shown.
42 changes: 26 additions & 16 deletions tests/test_k2sc.py
Original file line number Diff line number Diff line change
@@ -1,40 +1,50 @@
import halophot
from halophot.halo_tools import halo_tpf
import lightkurve
import lightkurve as lk

import os
TESTDIR = os.path.abspath(os.path.dirname(__file__))
ddir = os.path.join(TESTDIR,'../data/')


def test_k2sc():
import k2sc
from k2sc import standalone
def test_lk():

fname = ddir+"ktwo200128910-c111_lpd-targ.fits.gz"
fname = ddir+"ktwo205897543-c03_lpd-targ.fits.gz"

tpf = halo_tpf(fname)

lc = tpf.to_lightcurve()
lc.primary_header = tpf.hdu[0].header
lc.data_header = tpf.hdu[1].header

meta, corr_lc = tpf.halo(split_times=[3010],thresh=0.5);

corr_lc.__class__ = standalone.k2sc_lc
meta, corr_lc = tpf.halo(thresh=0.5)

corr_lc.k2sc()
def test_k2sc():
import k2sc
from k2sc import standalone

def test_saturation():
print('testing')
fname = ddir+"ktwo205897543-c03_lpd-targ.fits.gz"

fname = ddir+"ktwo200128910-c111_lpd-targ.fits.gz"

tpf = halo_tpf(fname)
tpf = lk.KeplerTargetPixelFile(fname)

lc = tpf.to_lightcurve()
lc.primary_header = tpf.hdu[0].header
lc.data_header = tpf.hdu[1].header

meta, corr_lc = tpf.halo(thresh=-1);
weightmap = meta['weightmap'][0]
lc.__class__ = standalone.k2sc_lc

lc.k2sc(de_max_time=10)

# def test_saturation():
# print('testing')

# fname = ddir+"ktwo200128910-c111_lpd-targ.fits.gz"

# tpf = halo_tpf(fname)

# lc = tpf.to_lightcurve()
# lc.primary_header = tpf.hdu[0].header
# lc.data_header = tpf.hdu[1].header

# meta, corr_lc = tpf.halo(thresh=-1);
# weightmap = meta['weightmap'][0]

0 comments on commit 328cb5a

Please sign in to comment.