[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6XD20A8DGDQYC7A7SDR54Z2":3,"skill-same:01M6XD20A8DGDQYC7A7SDR54Z2":63},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":37,"linkOnly":38,"markdownContent":39,"markdownBody":40,"frontMatter":41,"refName":42,"commitSha":43,"skillDirectory":44,"forksCount":13,"repositoryHtmlUrl":45,"repositoryHomepageUrl":6,"ownerHtmlUrl":46,"ownerBlogUrl":6,"ownerDescription":47,"updatedAt":48,"install":49,"resources":62},"01M6XD20A8DGDQYC7A7SDR54Z2","light-curve-preprocessing",null,"Preprocessing and cleaning techniques for astronomical light curves. Use when preparing light curve data for period analysis, including outlier removal, trend removal, flattening, and handling data quality flags. Works with lightkurve and general time series data.","Waaaalnut\u002Fskillsbench","Waaaalnut","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F103995656?v=4","01M6XCS9K1V51EY3JMB7DGMX24","01M6XCS9Q4WPW88W62C55G1H44",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002FWaaaalnut\u002Fskillsbench\u002Fblob\u002Fmain\u002Ftasks-no-skills\u002Fexoplanet-detection-period\u002Fenvironment\u002Fskills\u002Flight-curve-preprocessing\u002FSKILL.md",[],[18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36],"light curve preprocessing","curve","preprocessing","curves","time series","when","for","techniques","with","series","trend","time","flags","general","use","quality","data quality","analysis","data","2026-11-10 10:12:30",false,"---\nname: light-curve-preprocessing\ndescription: Preprocessing and cleaning techniques for astronomical light curves. Use when preparing light curve data for period analysis, including outlier removal, trend removal, flattening, and handling data quality flags. Works with lightkurve and general time series data.\n---\n\n# Light Curve Preprocessing\n\nPreprocessing is essential before period analysis. Raw light curves often contain outliers, long-term trends, and instrumental effects that can mask or create false periodic signals.\n\n## Overview\n\nCommon preprocessing steps:\n1. Remove outliers\n2. Remove long-term trends\n3. Handle data quality flags\n4. Remove stellar variability (optional)\n\n## Outlier Removal\n\n### Using Lightkurve\n\n```python\nimport lightkurve as lk\n\n# Remove outliers using sigma clipping\nlc_clean, mask = lc.remove_outliers(sigma=3, return_mask=True)\noutliers = lc[mask]  # Points that were removed\n\n# Common sigma values:\n# sigma=3: Standard (removes ~0.3% of data)\n# sigma=5: Conservative (removes fewer points)\n# sigma=2: Aggressive (removes more points)\n```\n\n### Manual Outlier Removal\n\n```python\nimport numpy as np\n\n# Calculate median and standard deviation\nmedian = np.median(flux)\nstd = np.std(flux)\n\n# Remove points beyond 3 sigma\ngood = np.abs(flux - median) \u003C 3 * std\ntime_clean = time[good]\nflux_clean = flux[good]\nerror_clean = error[good]\n```\n\n## Removing Long-Term Trends\n\n### Flattening with Lightkurve\n\n```python\n# Flatten to remove low-frequency variability\n# window_length: number of cadences to use for smoothing\nlc_flat = lc_clean.flatten(window_length=500)\n\n# Common window lengths:\n# 100-200: Remove short-term trends\n# 300-500: Remove medium-term trends (typical for TESS)\n# 500-1000: Remove long-term trends\n```\n\nThe `flatten()` method uses a Savitzky-Golay filter to remove trends while preserving transit signals.\n\n### Iterative Sine Fitting\n\nFor removing high-frequency stellar variability (rotation, pulsation):\n\n```python\ndef sine_fitting(lc):\n    \"\"\"Remove dominant periodic signal by fitting sine wave.\"\"\"\n    pg = lc.to_periodogram()\n    model = pg.model(time=lc.time, frequency=pg.frequency_at_max_power)\n    lc_new = lc.copy()\n    lc_new.flux = lc_new.flux \u002F model.flux\n    return lc_new, model\n\n# Iterate multiple times to remove multiple periodic components\nlc_processed = lc_clean.copy()\nfor i in range(50):  # Number of iterations\n    lc_processed, model = sine_fitting(lc_processed)\n```\n\n**Warning**: This removes periodic signals, so use carefully if you're searching for periodic transits.\n\n## Handling Data Quality Flags\n\n**IMPORTANT**: Quality flag conventions vary by data source!\n\n### Standard TESS format\n```python\n# For standard TESS files (flag=0 is GOOD):\ngood = flag == 0\ntime_clean = time[good]\nflux_clean = flux[good]\nerror_clean = error[good]\n```\n\n### Alternative formats\n```python\n# For some exported files (flag=0 is BAD):\ngood = flag != 0\ntime_clean = time[good]\nflux_clean = flux[good]\nerror_clean = error[good]\n```\n\n**Always verify your data format!** Check which approach gives cleaner results.\n\n## Preprocessing Pipeline Considerations\n\nWhen building a preprocessing pipeline for exoplanet detection:\n\n### Key Steps (Order Matters!)\n\n1. **Quality filtering**: Apply data quality flags first\n2. **Outlier removal**: Remove bad data points (flares, cosmic rays)\n3. **Trend removal**: Remove long-term variations (stellar rotation, instrumental drift)\n4. **Optional second pass**: Additional outlier removal after detrending\n\n### Important Principles\n\n- **Always include flux_err**: Critical for proper weighting in period search algorithms\n- **Preserve transit shapes**: Use methods like `flatten()` that preserve short-duration dips\n- **Don't over-process**: Too aggressive preprocessing can remove real signals\n- **Verify visually**: Plot each step to ensure quality\n\n### Parameter Selection\n\n- **Outlier removal sigma**: Lower sigma (2-3) is aggressive, higher (5-7) is conservative\n- **Flattening window**: Should be longer than transit duration but shorter than stellar rotation period\n- **When to do two passes**: Remove obvious outliers before detrending, then remove residual outliers after\n\n## Preprocessing for Exoplanet Detection\n\nFor transit detection, be careful not to remove the transit signal:\n\n1. **Remove outliers first**: Use sigma=3 or sigma=5\n2. **Flatten trends**: Use window_length appropriate for your data\n3. **Don't over-process**: Too much smoothing can remove shallow transits\n\n## Visualizing Results\n\nAlways plot your light curve to verify preprocessing quality:\n\n```python\nimport matplotlib.pyplot as plt\n\n# Use .plot() method on LightCurve objects\nlc.plot()\nplt.show()\n```\n\n**Best practice**: Plot before and after each major step to ensure you're improving data quality, not removing real signals.\n\n## Dependencies\n\n```bash\npip install lightkurve numpy matplotlib\n```\n\n## References\n\n- [Lightkurve Preprocessing Tutorials](https:\u002F\u002Flightkurve.github.io\u002Flightkurve\u002Ftutorials\u002Findex.html)\n- [Removing Instrumental Noise](https:\u002F\u002Flightkurve.github.io\u002Flightkurve\u002Ftutorials\u002F2.3-removing-noise.html)\n\n## Best Practices\n\n1. **Always check quality flags first**: Remove bad data before processing\n2. **Remove outliers before flattening**: Outliers can affect trend removal\n3. **Choose appropriate window length**: Too short = doesn't remove trends, too long = removes transits\n4. **Visualize each step**: Make sure preprocessing improves the data\n5. **Don't over-process**: More preprocessing isn't always better\n","# Light Curve Preprocessing\n\nPreprocessing is essential before period analysis. Raw light curves often contain outliers, long-term trends, and instrumental effects that can mask or create false periodic signals.\n\n## Overview\n\nCommon preprocessing steps:\n1. Remove outliers\n2. Remove long-term trends\n3. Handle data quality flags\n4. Remove stellar variability (optional)\n\n## Outlier Removal\n\n### Using Lightkurve\n\n```python\nimport lightkurve as lk\n\n# Remove outliers using sigma clipping\nlc_clean, mask = lc.remove_outliers(sigma=3, return_mask=True)\noutliers = lc[mask]  # Points that were removed\n\n# Common sigma values:\n# sigma=3: Standard (removes ~0.3% of data)\n# sigma=5: Conservative (removes fewer points)\n# sigma=2: Aggressive (removes more points)\n```\n\n### Manual Outlier Removal\n\n```python\nimport numpy as np\n\n# Calculate median and standard deviation\nmedian = np.median(flux)\nstd = np.std(flux)\n\n# Remove points beyond 3 sigma\ngood = np.abs(flux - median) \u003C 3 * std\ntime_clean = time[good]\nflux_clean = flux[good]\nerror_clean = error[good]\n```\n\n## Removing Long-Term Trends\n\n### Flattening with Lightkurve\n\n```python\n# Flatten to remove low-frequency variability\n# window_length: number of cadences to use for smoothing\nlc_flat = lc_clean.flatten(window_length=500)\n\n# Common window lengths:\n# 100-200: Remove short-term trends\n# 300-500: Remove medium-term trends (typical for TESS)\n# 500-1000: Remove long-term trends\n```\n\nThe `flatten()` method uses a Savitzky-Golay filter to remove trends while preserving transit signals.\n\n### Iterative Sine Fitting\n\nFor removing high-frequency stellar variability (rotation, pulsation):\n\n```python\ndef sine_fitting(lc):\n    \"\"\"Remove dominant periodic signal by fitting sine wave.\"\"\"\n    pg = lc.to_periodogram()\n    model = pg.model(time=lc.time, frequency=pg.frequency_at_max_power)\n    lc_new = lc.copy()\n    lc_new.flux = lc_new.flux \u002F model.flux\n    return lc_new, model\n\n# Iterate multiple times to remove multiple periodic components\nlc_processed = lc_clean.copy()\nfor i in range(50):  # Number of iterations\n    lc_processed, model = sine_fitting(lc_processed)\n```\n\n**Warning**: This removes periodic signals, so use carefully if you're searching for periodic transits.\n\n## Handling Data Quality Flags\n\n**IMPORTANT**: Quality flag conventions vary by data source!\n\n### Standard TESS format\n```python\n# For standard TESS files (flag=0 is GOOD):\ngood = flag == 0\ntime_clean = time[good]\nflux_clean = flux[good]\nerror_clean = error[good]\n```\n\n### Alternative formats\n```python\n# For some exported files (flag=0 is BAD):\ngood = flag != 0\ntime_clean = time[good]\nflux_clean = flux[good]\nerror_clean = error[good]\n```\n\n**Always verify your data format!** Check which approach gives cleaner results.\n\n## Preprocessing Pipeline Considerations\n\nWhen building a preprocessing pipeline for exoplanet detection:\n\n### Key Steps (Order Matters!)\n\n1. **Quality filtering**: Apply data quality flags first\n2. **Outlier removal**: Remove bad data points (flares, cosmic rays)\n3. **Trend removal**: Remove long-term variations (stellar rotation, instrumental drift)\n4. **Optional second pass**: Additional outlier removal after detrending\n\n### Important Principles\n\n- **Always include flux_err**: Critical for proper weighting in period search algorithms\n- **Preserve transit shapes**: Use methods like `flatten()` that preserve short-duration dips\n- **Don't over-process**: Too aggressive preprocessing can remove real signals\n- **Verify visually**: Plot each step to ensure quality\n\n### Parameter Selection\n\n- **Outlier removal sigma**: Lower sigma (2-3) is aggressive, higher (5-7) is conservative\n- **Flattening window**: Should be longer than transit duration but shorter than stellar rotation period\n- **When to do two passes**: Remove obvious outliers before detrending, then remove residual outliers after\n\n## Preprocessing for Exoplanet Detection\n\nFor transit detection, be careful not to remove the transit signal:\n\n1. **Remove outliers first**: Use sigma=3 or sigma=5\n2. **Flatten trends**: Use window_length appropriate for your data\n3. **Don't over-process**: Too much smoothing can remove shallow transits\n\n## Visualizing Results\n\nAlways plot your light curve to verify preprocessing quality:\n\n```python\nimport matplotlib.pyplot as plt\n\n# Use .plot() method on LightCurve objects\nlc.plot()\nplt.show()\n```\n\n**Best practice**: Plot before and after each major step to ensure you're improving data quality, not removing real signals.\n\n## Dependencies\n\n```bash\npip install lightkurve numpy matplotlib\n```\n\n## References\n\n- [Lightkurve Preprocessing Tutorials](https:\u002F\u002Flightkurve.github.io\u002Flightkurve\u002Ftutorials\u002Findex.html)\n- [Removing Instrumental Noise](https:\u002F\u002Flightkurve.github.io\u002Flightkurve\u002Ftutorials\u002F2.3-removing-noise.html)\n\n## Best Practices\n\n1. **Always check quality flags first**: Remove bad data before processing\n2. **Remove outliers before flattening**: Outliers can affect trend removal\n3. **Choose appropriate window length**: Too short = doesn't remove trends, too long = removes transits\n4. **Visualize each step**: Make sure preprocessing improves the data\n5. **Don't over-process**: More preprocessing isn't always better\n",{"name":5,"description":7},"main","7eeb258ada72b7f58119b0e7a2c00ea89d9beedd","tasks-no-skills\u002Fexoplanet-detection-period\u002Fenvironment\u002Fskills\u002Flight-curve-preprocessing","https:\u002F\u002Fgithub.com\u002FWaaaalnut\u002Fskillsbench","https:\u002F\u002Fgithub.com\u002FWaaaalnut","student of Zhejiang University","2026-04-21 23:16:23",{"source":8,"skillName":5,"commands":50,"prompt":60,"zipAvailable":61},[51,54,57],{"tool":52,"command":53},"npx","npx skills add Waaaalnut\u002Fskillsbench --skill light-curve-preprocessing",{"tool":55,"command":56},"bunx","bunx skills add Waaaalnut\u002Fskillsbench --skill light-curve-preprocessing",{"tool":58,"command":59},"pnpm","pnpm dlx skills add Waaaalnut\u002Fskillsbench --skill light-curve-preprocessing","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FWaaaalnut\u002Fskillsbench\u002Fblob\u002Fmain\u002Ftasks-no-skills\u002Fexoplanet-detection-period\u002Fenvironment\u002Fskills\u002Flight-curve-preprocessing\u002FSKILL.md",true,[],[64,77,92,118,138,156],{"skillNo":65,"name":66,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":74,"publishedAt":37},"01M6XEWMJ6VY3ZC53MPDCPG3GH","data-reconciliation","https:\u002F\u002Fgithub.com\u002FWaaaalnut\u002Fskillsbench\u002Fblob\u002Fmain\u002Ftasks\u002Fxlsx-recover-data\u002Fenvironment\u002Fskills\u002Fdata-reconciliation\u002FSKILL.md",[69],{"categoryNo":70,"categoryName":71,"taxonomyType":72,"taxonomyTypeDesc":73},"01JBSEEDCAT000000000000033","数据分析师","PROFESSION","适用职业",[75,76,36],"data reconciliation","reconciliation",{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":37},"01M6XEW8MNPMF1KRXV6ATGFRQF","speech-to-text","Transcribe video to timestamped text using Whisper tiny model (pre-installed).","https:\u002F\u002Fgithub.com\u002FWaaaalnut\u002Fskillsbench\u002Fblob\u002Fmain\u002Ftasks\u002Fvideo-tutorial-indexer\u002Fenvironment\u002Fskills\u002Fspeech-to-text\u002FSKILL.md",[],[84,85,86,87,88,89,90,91],"speech","text","speech to text","transcribe video","whisper","model","Video","transcribe",{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":103,"publishedAt":37},"01M6XEW3FQZP0T1RKQQJFXVY9T","video-processor","Process videos by removing segments and concatenating remaining parts. Use when you need to remove detected pauses\u002Fopenings from videos, create highlight reels, or batch process segment removals using ffmpeg filter_complex.","https:\u002F\u002Fgithub.com\u002FWaaaalnut\u002Fskillsbench\u002Fblob\u002Fmain\u002Ftasks\u002Fvideo-silence-remover\u002Fenvironment\u002Fskills\u002Fvideo-processor\u002FSKILL.md",[98],{"categoryNo":99,"categoryName":100,"taxonomyType":101,"taxonomyTypeDesc":102},"01JBSEEDCAT000000000000016","图像与多媒体","SCENARIO","使用场景",[90,104,105,106,107,108,23,109,110,111,112,113,114,115,116,32,117],"processor","video processor","batch","create","reels","parts","segments","process","videos","you","segment","filter","ffmpeg","remove",{"skillNo":119,"name":120,"nameZh":6,"description":121,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":122,"categories":123,"keywords":125,"publishedAt":37},"01M6XEVXJ5KZ0NTY3XZKRY4AS1","silence-detector","Detect initial silence segments in audio\u002Fvideo using energy-based analysis. Use when you need to find low-energy periods at the start of recordings (title slides, setup time, pre-roll silence).","https:\u002F\u002Fgithub.com\u002FWaaaalnut\u002Fskillsbench\u002Fblob\u002Fmain\u002Ftasks\u002Fvideo-silence-remover\u002Fenvironment\u002Fskills\u002Fsilence-detector\u002FSKILL.md",[124],{"categoryNo":99,"categoryName":100,"taxonomyType":101,"taxonomyTypeDesc":102},[126,127,128,129,23,113,29,130,131,132,133,110,134,135,90,35,136,137,32],"detector","silence detector","title","slides","energy","at","recordings","detect","find","Audio","start","setup",{"skillNo":139,"name":140,"nameZh":6,"description":141,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":142,"categories":143,"keywords":144,"publishedAt":37},"01M6XEVT3NGRN1FT7JPMAPXS6M","segment-combiner","Combine multiple segment detection results into a unified list. Use when you need to merge segments from different detectors, prepare removal lists for video processing, or consolidate detection outputs.","https:\u002F\u002Fgithub.com\u002FWaaaalnut\u002Fskillsbench\u002Fblob\u002Fmain\u002Ftasks\u002Fvideo-silence-remover\u002Fenvironment\u002Fskills\u002Fsegment-combiner\u002FSKILL.md",[],[114,145,90,146,147,148,149,24,23,150,151,110,113,152,153,32,154,155],"segment combiner","detection","prepare","merge","video processing","outputs","combine","processing","consolidate","results","list",{"skillNo":157,"name":158,"nameZh":6,"description":159,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":160,"categories":161,"keywords":165,"publishedAt":37},"01M6XEVMPVASGS2KX86QK4FMT7","report-generator","Generate compression reports for video processing. Use when you need to create structured JSON reports with duration statistics, compression ratios, and segment details after video processing.","https:\u002F\u002Fgithub.com\u002FWaaaalnut\u002Fskillsbench\u002Fblob\u002Fmain\u002Ftasks\u002Fvideo-silence-remover\u002Fenvironment\u002Fskills\u002Freport-generator\u002FSKILL.md",[162],{"categoryNo":163,"categoryName":164,"taxonomyType":72,"taxonomyTypeDesc":73},"01JBSEEDCAT000000000000034","行政与办公人员",[166,167,168,114,23,24,113,26,152,169,170,171,32,149,172,90,173,174,107],"generator","report generator","report","statistics","structured","reports","json","compression","generate"]