{"skill":{"slug":"exoplanet-detection-period-lomb-scargle-periodogram","displayName":"lomb-scargle-periodogram","summary":"Lomb-Scargle periodogram for finding periodic signals in unevenly sampled time series data. Use when analyzing light curves, radial velocity data, or any ast...","description":"---\nname: lomb-scargle-periodogram\ndescription: Lomb-Scargle periodogram for finding periodic signals in unevenly sampled time series data. Use when analyzing light curves, radial velocity data, or any astronomical time series to detect periodic variations. Works for stellar rotation, pulsation, eclipsing binaries, and general periodic phenomena. Based on lightkurve library.\n---\n\n# Lomb-Scargle Periodogram\n\nThe Lomb-Scargle periodogram is the standard tool for finding periods in unevenly sampled astronomical time series data. It's particularly useful for detecting periodic signals in light curves from space missions like Kepler, K2, and TESS.\n\n## Overview\n\nThe Lomb-Scargle periodogram extends the classical periodogram to handle unevenly sampled data, which is common in astronomy due to observing constraints, data gaps, and variable cadences.\n\n## Basic Usage with Lightkurve\n\n```python\nimport lightkurve as lk\nimport numpy as np\n\n# Create a light curve object\nlc = lk.LightCurve(time=time, flux=flux, flux_err=error)\n\n# Create periodogram (specify maximum period to search)\npg = lc.to_periodogram(maximum_period=15)  # Search up to 15 days\n\n# Find strongest period\nstrongest_period = pg.period_at_max_power\nmax_power = pg.max_power\n\nprint(f\"Strongest period: {strongest_period:.5f} days\")\nprint(f\"Power: {max_power:.5f}\")\n```\n\n## Plotting Periodograms\n\n```python\nimport matplotlib.pyplot as plt\n\npg.plot(view='period')  # View vs period (not frequency)\nplt.xlabel('Period [days]')\nplt.ylabel('Power')\nplt.show()\n```\n\n**Important**: Use `view='period'` to see periods directly, not frequencies. The default `view='frequency'` shows frequency (1/period).\n\n## Period Range Selection\n\nChoose appropriate period ranges based on your science case:\n\n- **Stellar rotation**: 0.1 - 100 days\n- **Exoplanet transits**: 0.5 - 50 days (most common)\n- **Eclipsing binaries**: 0.1 - 100 days\n- **Stellar pulsations**: 0.001 - 1 day\n\n```python\n# Search specific period range\npg = lc.to_periodogram(minimum_period=2.0, maximum_period=7.0)\n```\n\n## Interpreting Results\n\n### Power Significance\n\nHigher power indicates stronger periodic signal, but be cautious:\n- **High power**: Likely real periodic signal\n- **Multiple peaks**: Could indicate harmonics (period/2, period*2)\n- **Aliasing**: Very short periods may be aliases of longer periods\n\n### Common Patterns\n\n1. **Single strong peak**: Likely the true period\n2. **Harmonics**: Peaks at period/2, period*2 suggest the fundamental period\n3. **Aliases**: Check if period*2 or period/2 also show signals\n\n## Model Fitting\n\nOnce you find a period, you can fit a model:\n\n```python\n# Get the frequency at maximum power\nfrequency = pg.frequency_at_max_power\n\n# Create a model light curve\nmodel = pg.model(time=lc.time, frequency=frequency)\n\n# Plot data and model\nimport matplotlib.pyplot as plt\nlc.plot(label='Data')\nmodel.plot(label='Model')\nplt.legend()\nplt.show()\n```\n\n## Dependencies\n\n```bash\npip install lightkurve numpy matplotlib\n```\n\n## References\n\n- [Lightkurve Tutorials](https://lightkurve.github.io/lightkurve/tutorials/index.html)\n- [Lightkurve Periodogram Documentation](https://docs.lightkurve.org/)\n\n## When to Use This vs. Other Methods\n\n- **Lomb-Scargle**: General periodic signals (rotation, pulsation, eclipsing binaries)\n- **Transit Least Squares (TLS)**: Specifically for exoplanet transits (more sensitive)\n- **Box Least Squares (BLS)**: Alternative transit detection method\n\nFor exoplanet detection, consider using TLS after Lomb-Scargle for initial period search.\n","tags":{"latest":"0.1.0"},"stats":{"comments":0,"downloads":377,"installsAllTime":14,"installsCurrent":0,"stars":0,"versions":1},"createdAt":1776229672074,"updatedAt":1778492594700},"latestVersion":{"version":"0.1.0","createdAt":1776229672074,"changelog":"Bulk publish from all-task-skills-dedup","license":"MIT-0"},"metadata":null,"owner":{"handle":"wu-uk","userId":"s170bfqwae6mtf922jhz299q7s83jb0h","displayName":"wu-uk","image":"https://avatars.githubusercontent.com/u/199610473?v=4"},"moderation":null}