Skip to content

Commit

Permalink
Remove depenedcy on gatspy
Browse files Browse the repository at this point in the history
Lomb-Scargle periodograms from gatspy are now in astropy.timeseries
  • Loading branch information
mwcraig committed Oct 27, 2023
1 parent e1d9e8d commit 5286d1b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
1 change: 0 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ install_requires =
photutils >=1.9
matplotlib
pandas
gatspy
pyyaml
astrowidgets
ipyfilechooser
Expand Down
14 changes: 8 additions & 6 deletions stellarphot/plotting/multi_night_plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from astropy.stats import mad_std
from astropy.time import Time

from gatspy.periodic import LombScargleFast
from astropy.timeseries import LombScargle


__all__ = ['plot_magnitudes', 'multi_night']
Expand Down Expand Up @@ -201,11 +201,13 @@ def multi_night(sources, unique_nights, night,
np.isinf(mag_err[source.id - 1]))
bads = bad_mags | bad_errs
good_mags = ~bads
model = LombScargleFast().fit(source.bjd_tdb[good_mags],
mags[source.id - 1][good_mags],
mag_err[source.id - 1][good_mags])
periods, power = model.periodogram_auto(nyquist_factor=100,
oversampling=3)
ls = LombScargle(source.bjd_tdb[good_mags],
mags[source.id - 1][good_mags],
mag_err[source.id - 1][good_mags])

freqs, power = ls.autopower(nyquist_factor=100,
samples_per_peak=10)

max_pow = power.max()

# print(source, max_pow)
Expand Down

0 comments on commit 5286d1b

Please sign in to comment.