-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
38e3b18
commit 328cb5a
Showing
2 changed files
with
26 additions
and
16 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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] |