Skip to content

Commit

Permalink
changed demo target
Browse files Browse the repository at this point in the history
  • Loading branch information
christinahedges committed Dec 1, 2020
1 parent 5d81045 commit aeed053
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 75 deletions.
Binary file removed demo.png
Binary file not shown.
93 changes: 19 additions & 74 deletions docs/TESS-SIP.ipynb

Large diffs are not rendered by default.

Binary file added docs/demo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 26 additions & 0 deletions docs/demo.py
@@ -0,0 +1,26 @@
import sys
sys.path.append('/Users/ch/K2/requests/ruth/tess-long-period-tools/TESS-SIP/src/')
from tess_sip import SIP
import lightkurve as lk
import numpy as np
import matplotlib.pyplot as plt

print(lk.__file__)

# Download target pixel files
# We're using TOI-700
tpfs = lk.search_targetpixelfile('TIC 150428135', mission='tess', sector=np.arange(14)).download_all()

# Run SIP
r = SIP(tpfs, min_period=10, max_period=80)

# Example plotting
fig, axs = plt.subplots(2, figsize=(4, 6))
axs[0].plot(r['periods'], r['power'], c='k')
axs[0].set(xlabel='Period [d]', ylabel='Power', title='Periodogram')
axs[0].axvline(r['period_at_max_power'], color='r', ls='--', label=f"{r['period_at_max_power']:0.2f} days")
axs[0].legend()
r['raw_lc'].plot(ax=axs[1], c='r', label='Raw', alpha=0.5)
r['corr_lc'].plot(ax=axs[1], c='k', label='Corrected', lw=0.1)
axs[1].set(ylim=(0.9, 1.1))
plt.savefig('demo.png', dpi=200, bbox_inches='tight')
2 changes: 1 addition & 1 deletion src/tess_sip/tess_sip.py
@@ -1,7 +1,7 @@
import lightkurve as lk
import numpy as np
from scipy import sparse
from tqdm.notebook import tqdm
from tqdm import tqdm
import warnings

from astropy.timeseries import lombscargle
Expand Down

0 comments on commit aeed053

Please sign in to comment.