Skip to content
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
cd74dab
Update data and data_tools folders
FasilGibdaw Apr 24, 2026
83d121a
datadownloader script removed and parts of it in separate scripts
FasilGibdaw Apr 28, 2026
80ca26d
deleted datadownloader
FasilGibdaw Apr 28, 2026
40b0b69
example of using the data tools added
FasilGibdaw Apr 28, 2026
8223ee4
cleaning by deleting supermag_api.py
FasilGibdaw Apr 28, 2026
043e5bc
some adjustments
FasilGibdaw May 13, 2026
65f808d
updated supermag
FasilGibdaw May 15, 2026
5895cb1
b_eci versus bmodel_eci in new iridium files handled
FasilGibdaw May 15, 2026
856063e
b_eci versus bmodel_eci in new iridium files handled using if clause
FasilGibdaw May 15, 2026
d37745f
data_tools updated, data_tools_example.ipynb added in the examples f…
FasilGibdaw May 18, 2026
6ea25fa
Merge branch 'main' into update-data-folders
FasilGibdaw May 18, 2026
13cf629
minor fixes on data_tools_example
FasilGibdaw May 18, 2026
a38a69e
Merge branch 'klaundal:main' into update-data-folders
FasilGibdaw May 20, 2026
bab1f44
removing datadownloader anddupilicated data_tools_example.ipynb
FasilGibdaw May 20, 2026
05695a2
Merge branch 'update-data-folders' of https://github.com/FasilGibdaw/…
FasilGibdaw May 20, 2026
6d63d0b
Merge branch 'klaundal:main' into update-data-folders
FasilGibdaw May 21, 2026
4c8e489
Merge branch 'klaundal:main' into update-data-folders
FasilGibdaw May 21, 2026
0f8cacd
supermag download problem fixed
FasilGibdaw May 26, 2026
fa3aa51
Merge branch 'klaundal:main' into update-data-folders
FasilGibdaw Jun 4, 2026
410dac7
supermag data download handling place holder 999999.0 B values
FasilGibdaw Jun 4, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions lompe/data_tools/supermag.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@ def download_supermag(
)
return None

# taking only the geo data, and removing placehoelder values (999999.0) with NaN, then dropping any rows with NaN
Comment thread
klaundal marked this conversation as resolved.
cols = ["Be", "Bn", "Bu", "lat", "lon", "station"]
b_cols = ["Be", "Bn", "Bu"]
Comment thread
klaundal marked this conversation as resolved.

df_final = (
all_data.rename(
columns={
Expand All @@ -122,14 +126,12 @@ def download_supermag(
"E_geo": "Be",
"Z_geo": "Bu",
}
)[["Be", "Bn", "Bu", "lat", "lon", "station"]]
)[cols]
.replace({col: {999999.0: np.nan} for col in b_cols})
Comment thread
klaundal marked this conversation as resolved.
.assign(Bu=lambda df: -df["Bu"]) # SuperMAG Z down -> Lompe up
.dropna()
.sort_index()
)

# SuperMAG Z is positive downward; Lompe wants upward.
df_final["Bu"] = -df_final["Bu"]

if save:
df_final.to_hdf(savefile, key="df_final", mode="w")
print(f"SuperMAG - Download complete: {savefile}")
Expand Down
Loading