[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7BWZDZCVPYXKX4K6Q2TAT4A":3,"skill-same:01M7BWZDZCVPYXKX4K6Q2TAT4A":45},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":30,"install":31,"resources":44},"01M7BWZDZCVPYXKX4K6Q2TAT4A","matched-filtering",null,"Matched filtering techniques for gravitational wave detection. Use when searching for signals in detector data using template waveforms, including both time-domain and frequency-domain approaches. Works with PyCBC for generating templates and performing matched filtering.","linyouxue\u002Fskill-repair-benchmark","linyouxue","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F216151464?v=4","01M7BJEVCXKD74KH6FG9CBVSQB","林宥学","01M7BJEVE02NP217V93BKZFC0J",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fevaluation\u002Fresults\u002FOpus47-OriginalSkill-79Tasks-20260920\u002Fruns\u002Fopus47-original-skill\u002Fgravitational-wave-detection-opus47-original-skill-r001\u002Finputs\u002Fskills\u002Fmatched-filtering\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: matched-filtering\ndescription: Matched filtering techniques for gravitational wave detection. Use when searching for signals in detector data using template waveforms, including both time-domain and frequency-domain approaches. Works with PyCBC for generating templates and performing matched filtering.\n---\n\n# Matched Filtering for Gravitational Wave Detection\n\nMatched filtering is the primary technique for detecting gravitational wave signals in noisy detector data. It correlates known template waveforms with the detector data to find signals with high signal-to-noise ratio (SNR).\n\n## Overview\n\nMatched filtering requires:\n1. Template waveform (expected signal shape)\n2. Conditioned detector data (preprocessed strain)\n3. Power spectral density (PSD) of the noise\n4. SNR calculation and peak finding\n\nPyCBC supports both time-domain and frequency-domain approaches.\n\n## Time-Domain Waveforms\n\nGenerate templates in time domain using `get_td_waveform`:\n\n```python\nfrom pycbc.waveform import get_td_waveform\nfrom pycbc.filter import matched_filter\n\n# Generate time-domain waveform\nhp, hc = get_td_waveform(\n    approximant='IMRPhenomD',  # or 'SEOBNRv4_opt', 'TaylorT4'\n    mass1=25,                  # Primary mass (solar masses)\n    mass2=20,                  # Secondary mass (solar masses)\n    delta_t=conditioned.delta_t,  # Must match data sampling\n    f_lower=20                 # Lower frequency cutoff (Hz)\n)\n\n# Resize template to match data length\nhp.resize(len(conditioned))\n\n# Align template: cyclic shift so merger is at the start\ntemplate = hp.cyclic_time_shift(hp.start_time)\n\n# Perform matched filtering\nsnr = matched_filter(\n    template,\n    conditioned,\n    psd=psd,\n    low_frequency_cutoff=20\n)\n\n# Crop edges corrupted by filtering\n# Remove 4 seconds for PSD + 4 seconds for template length at start\n# Remove 4 seconds at end for PSD\nsnr = snr.crop(4 + 4, 4)\n\n# Find peak SNR\nimport numpy as np\npeak_idx = np.argmax(abs(snr).numpy())\npeak_snr = abs(snr[peak_idx])\n```\n\n### Why Cyclic Shift?\n\nWaveforms from `get_td_waveform` have the merger at time zero. For matched filtering, we typically want the merger aligned at the start of the template. `cyclic_time_shift` rotates the waveform appropriately.\n\n## Frequency-Domain Waveforms\n\nGenerate templates in frequency domain using `get_fd_waveform`:\n\n```python\nfrom pycbc.waveform import get_fd_waveform\nfrom pycbc.filter import matched_filter\n\n# Calculate frequency resolution\ndelta_f = 1.0 \u002F conditioned.duration\n\n# Generate frequency-domain waveform\nhp, hc = get_fd_waveform(\n    approximant='IMRPhenomD',\n    mass1=25,\n    mass2=20,\n    delta_f=delta_f,           # Frequency resolution (must match data)\n    f_lower=20                 # Lower frequency cutoff (Hz)\n)\n\n# Resize template to match PSD length\nhp.resize(len(psd))\n\n# Perform matched filtering\nsnr = matched_filter(\n    hp,\n    conditioned,\n    psd=psd,\n    low_frequency_cutoff=20\n)\n\n# Find peak SNR\nimport numpy as np\npeak_idx = np.argmax(abs(snr).numpy())\npeak_snr = abs(snr[peak_idx])\n```\n\n## Key Differences: Time vs Frequency Domain\n\n### Time Domain (`get_td_waveform`)\n- **Pros**: Works for all approximants, simpler to understand\n- **Cons**: Can be slower for long waveforms\n- **Use when**: Approximant doesn't support frequency domain, or you need time-domain manipulation\n\n### Frequency Domain (`get_fd_waveform`)\n- **Pros**: Faster for matched filtering, directly in frequency space\n- **Cons**: Not all approximants support it (e.g., SEOBNRv4_opt may not be available)\n- **Use when**: Approximant supports it and you want computational efficiency\n\n## Approximants\n\nCommon waveform approximants:\n\n```python\n# Phenomenological models (fast, good accuracy)\n'IMRPhenomD'      # Good for most binary black hole systems\n'IMRPhenomPv2'    # More accurate for precessing systems\n\n# Effective One-Body models (very accurate, slower)\n'SEOBNRv4_opt'    # Optimized EOB model (time-domain only typically)\n\n# Post-Newtonian models (approximate, fast)\n'TaylorT4'        # Post-Newtonian expansion\n```\n\n**Note**: Some approximants may not be available in frequency domain. If `get_fd_waveform` fails, use `get_td_waveform` instead.\n\n## Matched Filter Parameters\n\n### `low_frequency_cutoff`\n- Should match your high-pass filter cutoff (typically 15-20 Hz)\n- Templates are only meaningful above this frequency\n- Lower values = more signal, but more noise\n\n### Template Resizing\n- **Time domain**: `hp.resize(len(conditioned))` - match data length\n- **Frequency domain**: `hp.resize(len(psd))` - match PSD length\n- Critical for proper correlation\n\n### Crop Amounts\nAfter matched filtering, crop edges corrupted by:\n- **PSD filtering**: 4 seconds at both ends\n- **Template length**: Additional 4 seconds at start (for time-domain)\n- **Total**: `snr.crop(8, 4)` for time-domain, `snr.crop(4, 4)` for frequency-domain\n\n## Best Practices\n\n1. **Match sampling\u002Ffrequency resolution**: Template `delta_t`\u002F`delta_f` must match data\n2. **Resize templates correctly**: Time-domain → data length, Frequency-domain → PSD length\n3. **Crop after filtering**: Always crop edges corrupted by filtering\n4. **Use `abs()` for SNR**: Matched filter returns complex SNR; use magnitude\n5. **Handle failures gracefully**: Some approximants may not work for certain mass combinations\n\n## Common Issues\n\n**Problem**: \"Approximant not available\" error\n- **Solution**: Try time-domain instead of frequency-domain, or use different approximant\n\n**Problem**: Template size mismatch\n- **Solution**: Ensure template is resized to match data length (TD) or PSD length (FD)\n\n**Problem**: Poor SNR even with correct masses\n- **Solution**: Check that PSD low_frequency_cutoff matches your high-pass filter, verify data conditioning\n\n**Problem**: Edge artifacts in SNR time series\n- **Solution**: Increase crop amounts or verify filtering pipeline order\n\n## Dependencies\n\n```bash\npip install pycbc numpy\n```\n\n## References\n\n- [PyCBC Tutorial: Waveform & Matched Filter](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Fgwastro\u002Fpycbc-tutorials\u002Fblob\u002Fmaster\u002Ftutorial\u002F3_WaveformMatchedFilter.ipynb) - Comprehensive tutorial demonstrating waveform generation, matched filtering in both time and frequency domains, and SNR analysis\n- [PyCBC Waveform Documentation](https:\u002F\u002Fpycbc.org\u002Fpycbc\u002Flatest\u002Fhtml\u002Fpycbc.waveform.html)\n- [PyCBC Filter Documentation](https:\u002F\u002Fpycbc.org\u002Fpycbc\u002Flatest\u002Fhtml\u002Fpycbc.filter.html)\n","# Matched Filtering for Gravitational Wave Detection\n\nMatched filtering is the primary technique for detecting gravitational wave signals in noisy detector data. It correlates known template waveforms with the detector data to find signals with high signal-to-noise ratio (SNR).\n\n## Overview\n\nMatched filtering requires:\n1. Template waveform (expected signal shape)\n2. Conditioned detector data (preprocessed strain)\n3. Power spectral density (PSD) of the noise\n4. SNR calculation and peak finding\n\nPyCBC supports both time-domain and frequency-domain approaches.\n\n## Time-Domain Waveforms\n\nGenerate templates in time domain using `get_td_waveform`:\n\n```python\nfrom pycbc.waveform import get_td_waveform\nfrom pycbc.filter import matched_filter\n\n# Generate time-domain waveform\nhp, hc = get_td_waveform(\n    approximant='IMRPhenomD',  # or 'SEOBNRv4_opt', 'TaylorT4'\n    mass1=25,                  # Primary mass (solar masses)\n    mass2=20,                  # Secondary mass (solar masses)\n    delta_t=conditioned.delta_t,  # Must match data sampling\n    f_lower=20                 # Lower frequency cutoff (Hz)\n)\n\n# Resize template to match data length\nhp.resize(len(conditioned))\n\n# Align template: cyclic shift so merger is at the start\ntemplate = hp.cyclic_time_shift(hp.start_time)\n\n# Perform matched filtering\nsnr = matched_filter(\n    template,\n    conditioned,\n    psd=psd,\n    low_frequency_cutoff=20\n)\n\n# Crop edges corrupted by filtering\n# Remove 4 seconds for PSD + 4 seconds for template length at start\n# Remove 4 seconds at end for PSD\nsnr = snr.crop(4 + 4, 4)\n\n# Find peak SNR\nimport numpy as np\npeak_idx = np.argmax(abs(snr).numpy())\npeak_snr = abs(snr[peak_idx])\n```\n\n### Why Cyclic Shift?\n\nWaveforms from `get_td_waveform` have the merger at time zero. For matched filtering, we typically want the merger aligned at the start of the template. `cyclic_time_shift` rotates the waveform appropriately.\n\n## Frequency-Domain Waveforms\n\nGenerate templates in frequency domain using `get_fd_waveform`:\n\n```python\nfrom pycbc.waveform import get_fd_waveform\nfrom pycbc.filter import matched_filter\n\n# Calculate frequency resolution\ndelta_f = 1.0 \u002F conditioned.duration\n\n# Generate frequency-domain waveform\nhp, hc = get_fd_waveform(\n    approximant='IMRPhenomD',\n    mass1=25,\n    mass2=20,\n    delta_f=delta_f,           # Frequency resolution (must match data)\n    f_lower=20                 # Lower frequency cutoff (Hz)\n)\n\n# Resize template to match PSD length\nhp.resize(len(psd))\n\n# Perform matched filtering\nsnr = matched_filter(\n    hp,\n    conditioned,\n    psd=psd,\n    low_frequency_cutoff=20\n)\n\n# Find peak SNR\nimport numpy as np\npeak_idx = np.argmax(abs(snr).numpy())\npeak_snr = abs(snr[peak_idx])\n```\n\n## Key Differences: Time vs Frequency Domain\n\n### Time Domain (`get_td_waveform`)\n- **Pros**: Works for all approximants, simpler to understand\n- **Cons**: Can be slower for long waveforms\n- **Use when**: Approximant doesn't support frequency domain, or you need time-domain manipulation\n\n### Frequency Domain (`get_fd_waveform`)\n- **Pros**: Faster for matched filtering, directly in frequency space\n- **Cons**: Not all approximants support it (e.g., SEOBNRv4_opt may not be available)\n- **Use when**: Approximant supports it and you want computational efficiency\n\n## Approximants\n\nCommon waveform approximants:\n\n```python\n# Phenomenological models (fast, good accuracy)\n'IMRPhenomD'      # Good for most binary black hole systems\n'IMRPhenomPv2'    # More accurate for precessing systems\n\n# Effective One-Body models (very accurate, slower)\n'SEOBNRv4_opt'    # Optimized EOB model (time-domain only typically)\n\n# Post-Newtonian models (approximate, fast)\n'TaylorT4'        # Post-Newtonian expansion\n```\n\n**Note**: Some approximants may not be available in frequency domain. If `get_fd_waveform` fails, use `get_td_waveform` instead.\n\n## Matched Filter Parameters\n\n### `low_frequency_cutoff`\n- Should match your high-pass filter cutoff (typically 15-20 Hz)\n- Templates are only meaningful above this frequency\n- Lower values = more signal, but more noise\n\n### Template Resizing\n- **Time domain**: `hp.resize(len(conditioned))` - match data length\n- **Frequency domain**: `hp.resize(len(psd))` - match PSD length\n- Critical for proper correlation\n\n### Crop Amounts\nAfter matched filtering, crop edges corrupted by:\n- **PSD filtering**: 4 seconds at both ends\n- **Template length**: Additional 4 seconds at start (for time-domain)\n- **Total**: `snr.crop(8, 4)` for time-domain, `snr.crop(4, 4)` for frequency-domain\n\n## Best Practices\n\n1. **Match sampling\u002Ffrequency resolution**: Template `delta_t`\u002F`delta_f` must match data\n2. **Resize templates correctly**: Time-domain → data length, Frequency-domain → PSD length\n3. **Crop after filtering**: Always crop edges corrupted by filtering\n4. **Use `abs()` for SNR**: Matched filter returns complex SNR; use magnitude\n5. **Handle failures gracefully**: Some approximants may not work for certain mass combinations\n\n## Common Issues\n\n**Problem**: \"Approximant not available\" error\n- **Solution**: Try time-domain instead of frequency-domain, or use different approximant\n\n**Problem**: Template size mismatch\n- **Solution**: Ensure template is resized to match data length (TD) or PSD length (FD)\n\n**Problem**: Poor SNR even with correct masses\n- **Solution**: Check that PSD low_frequency_cutoff matches your high-pass filter, verify data conditioning\n\n**Problem**: Edge artifacts in SNR time series\n- **Solution**: Increase crop amounts or verify filtering pipeline order\n\n## Dependencies\n\n```bash\npip install pycbc numpy\n```\n\n## References\n\n- [PyCBC Tutorial: Waveform & Matched Filter](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Fgwastro\u002Fpycbc-tutorials\u002Fblob\u002Fmaster\u002Ftutorial\u002F3_WaveformMatchedFilter.ipynb) - Comprehensive tutorial demonstrating waveform generation, matched filtering in both time and frequency domains, and SNR analysis\n- [PyCBC Waveform Documentation](https:\u002F\u002Fpycbc.org\u002Fpycbc\u002Flatest\u002Fhtml\u002Fpycbc.waveform.html)\n- [PyCBC Filter Documentation](https:\u002F\u002Fpycbc.org\u002Fpycbc\u002Flatest\u002Fhtml\u002Fpycbc.filter.html)\n",{"name":5,"description":7},"main","cdcb6d230f3b15c3c33f8a2bdd16439f43602cbe","evaluation\u002Fresults\u002FOpus47-OriginalSkill-79Tasks-20260920\u002Fruns\u002Fopus47-original-skill\u002Fgravitational-wave-detection-opus47-original-skill-r001\u002Finputs\u002Fskills\u002Fmatched-filtering",1,"https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark","https:\u002F\u002Fgithub.com\u002Flinyouxue","2026-11-14 20:28:35",{"source":8,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add linyouxue\u002Fskill-repair-benchmark --skill matched-filtering",{"tool":37,"command":38},"bunx","bunx skills add linyouxue\u002Fskill-repair-benchmark --skill matched-filtering",{"tool":40,"command":41},"pnpm","pnpm dlx skills add linyouxue\u002Fskill-repair-benchmark --skill matched-filtering","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fevaluation\u002Fresults\u002FOpus47-OriginalSkill-79Tasks-20260920\u002Fruns\u002Fopus47-original-skill\u002Fgravitational-wave-detection-opus47-original-skill-r001\u002Finputs\u002Fskills\u002Fmatched-filtering\u002FSKILL.md",true,[],[46,53,60,67,72,77],{"skillNo":47,"name":48,"nameZh":6,"description":49,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":50,"categories":51,"keywords":52,"publishedAt":19},"01M7E1HGVRY73NBJ022CJG13X6","video-frame-extraction","Extract frames from video files and save them as images using OpenCV","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_03\u002Finputs\u002Fskills\u002Fvideo-frame-extraction\u002FSKILL.md",[],[],{"skillNo":54,"name":55,"nameZh":6,"description":56,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":57,"categories":58,"keywords":59,"publishedAt":19},"01M7E1HAG5R7CJ9C8NYJS771MB","openai-vision","Analyze images and multi-frame sequences using OpenAI GPT vision models","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_03\u002Finputs\u002Fskills\u002Fopenai-vision\u002FSKILL.md",[],[],{"skillNo":61,"name":62,"nameZh":6,"description":63,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":66,"publishedAt":19},"01M7E1H7DADKB6QBWKC2KQ63SZ","image-ocr","Extract text content from images using Tesseract OCR via Python, including structured field extraction from receipts and forms","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_03\u002Finputs\u002Fskills\u002Fimage-ocr\u002FSKILL.md",[],[],{"skillNo":68,"name":48,"nameZh":6,"description":49,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":19},"01M7E1H0WBNT43TENGQY7AVZHD","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_02\u002Finputs\u002Fskills\u002Fvideo-frame-extraction\u002FSKILL.md",[],[],{"skillNo":73,"name":55,"nameZh":6,"description":56,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":19},"01M7E1GTC7D4N4Q2EF03875J9E","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_02\u002Finputs\u002Fskills\u002Fopenai-vision\u002FSKILL.md",[],[],{"skillNo":78,"name":62,"nameZh":6,"description":63,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":19},"01M7E1GQ92CWFMGH53KSSE4WER","https:\u002F\u002Fgithub.com\u002Flinyouxue\u002Fskill-repair-benchmark\u002Fblob\u002Fmain\u002Fjpg-ocr-stat\u002Fresult\u002Fskilltta-claude4.7\u002Fgroup_03\u002Frun_02\u002Finputs\u002Fskills\u002Fimage-ocr\u002FSKILL.md",[],[]]