Add SWPC events support - #211
Conversation
There was a problem hiding this comment.
🟡 Not ready to approve
There are confirmed runtime failure cases (empty archive vstack and empty flare-row handling in the example) plus a few documentation/text issues that should be fixed before merging.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.
Pull request overview
Adds first-class support for NOAA SWPC “Edited Solar Events List” data by introducing a SunPy/Fido client for discovery/download and parsers to convert both daily event files and yearly archives into astropy.table.QTable outputs, plus documentation, examples, and tests.
Changes:
- Added
SWPCEventsClient(Fido client) to search/fetch daily files and archived yearly tarballs from SWPC FTP. - Added parsers for single files and yearly archives, plus a dispatcher helper with optional
TimeRangefiltering. - Added tests, sample SWPC fixtures, Sphinx API docs entry, a comparison example, and a changelog entry.
File summaries
| File | Description |
|---|---|
| sunkit_instruments/swpc/client.py | New Fido client for SWPC Edited Solar Events List discovery/download. |
| sunkit_instruments/swpc/parser.py | New parsers for daily files and yearly tar.gz archives, plus dispatcher/filtering. |
| sunkit_instruments/swpc/init.py | Exposes SWPC client and parsing functions as public API. |
| sunkit_instruments/swpc/tests/test_client.py | Remote-data tests covering Fido search/fetch behavior. |
| sunkit_instruments/swpc/tests/test_parser.py | Unit tests for parsing new/old formats, archives, masks, and day rollover. |
| sunkit_instruments/swpc/tests/init.py | Test package marker. |
| sunkit_instruments/data/test/swpc_20260710events.txt | New-format fixture for parser tests. |
| sunkit_instruments/data/test/swpc_19970121events.txt | Old-format fixture for parser tests. |
| sunkit_instruments/data/test/swpc_19970115events.txt | “No events” fixture for parser tests. |
| examples/compare_swpc_events_hek.py | Example comparing SWPC XRA events with HEK and GOES XRS flux. |
| docs/code_ref/swpc.rst | New API reference page for sunkit_instruments.swpc. |
| docs/code_ref/index.rst | Adds SWPC to the API reference index. |
| changelog/211.feature.rst | Changelog entry announcing SWPC client/parsers + example. |
Review details
- Files reviewed: 12/14 changed files
- Comments generated: 4
- Review effort level: Lite
We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
PR Description
Add an SWPC Event Fido client to search and download the event files/archives.
Add a parser to parse the files/arhcives into and an astropy QTable/s
AI Assistance Disclosure
AI tools were used for: