Skip to content

Update data folders#68

Merged
klaundal merged 18 commits into
klaundal:mainfrom
FasilGibdaw:update-data-folders
May 26, 2026
Merged

Update data folders#68
klaundal merged 18 commits into
klaundal:mainfrom
FasilGibdaw:update-data-folders

Conversation

@FasilGibdaw

Copy link
Copy Markdown
Contributor

supermag download problem fixed: reading the supermag_stations.csv was the problem. supermag_stations.csv is also updated.

Copilot AI review requested due to automatic review settings May 26, 2026 09:27

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

This PR updates SuperMAG data downloading and station metadata handling, and adjusts Lompe’s data retrieval for Swarm.

Changes:

  • Switch SuperMAG “start” handling to pass the event value through downloader calls and add extra exception logging.
  • Make station CSV loading more tolerant of malformed rows and update supermag_stations.csv entries.
  • Update Swarm download function usage in get_lompe_data.py.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
lompe/data_tools/supermag.py Changes how start is passed to SuperMAG APIs; adds error logging; makes station CSV parsing more permissive.
lompe/data_tools/get_lompe_data.py Removes datadownloader import and switches Swarm download call to download_swarm_mag.
lompe/data/supermag_stations.csv Updates station rows and adds new stations; introduces rows with embedded comma-separated values.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +72 to 76
try:
all_data, failed = _get_supermag_all_stations(
userid=userid,
start=start,
start=event,
inventory_extent=inventory_extent,
return savefile

start = [int(x) for x in event.split("-")] + [0, 0]
# start = [int(x) for x in event.split("-")] + [0, 0]
filepath = os.path.dirname(__file__)
smag_stations = pd.read_csv(filepath + '/../data/supermag_stations.csv')
smag_stations = pd.read_csv(
filepath + '/../data/supermag_stations.csv', engine="python", on_bad_lines=lambda row: row[:7] + [",".join(row[7:])])
TWN,146.82,-19.27,-138.28,-27.99,Townsville,2,AUS,MAGDAS
AMA,129.33,28.17,-157.69,21.14,Amami-Oshima,1,MAGDAS
ANC,282.85,-11.77,-4.48,1.44,Ancon,1,MAGDAS
ANC,282.85,-11.77,-4.48,1.44,Ancon,2,MAGDAS,LISN
@klaundal
klaundal merged commit 1c26c6d into klaundal:main May 26, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants