Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using new and updated Ap and F10.7 source, removed deprecated indexer.get_loc method #7

Closed
wants to merge 5 commits into from

Conversation

sunipkm
Copy link
Contributor

@sunipkm sunipkm commented May 31, 2022

get_indices() method now retrieves indices from the new source (ftp://ftp.gfz-potsdam.de/pub/home/obs/Kp_ap_Ap_SN_F107/) when the newsource input is set (it is set by default).

Replaced dat.index.get_loc() on line 36 of base.py to use the get_indexer method.

….get_loc() method. Updated test case of a previously near-future date
@petermao
Copy link

petermao commented Sep 21, 2022

I second this PR. I'm using Sunip's commit now for my work.

This closes issue #6

…ow be timezone aware. Fixed handling of year boundaries when using smoothdays.
…havior). Set tzaware to use timezone aware datetime
@bharding512
Copy link

I third this PR. I say this because NCAR-GLOW has geomagindices as a dependency. A fresh install of NCAR-GLOW fails because of the dat.index.get_loc() deprecation

bharding512 added a commit to bharding512/NCAR-GLOW that referenced this pull request Apr 20, 2023
This is because geomagindices is not compatible with the latest pandas (see space-physics/geomagindices#7)
@rileytroyer
Copy link

I'll also add my support for this. MSISE00 also has geomagindices as a dependency and fails because of the depreciated pandas.index.get_loc().

@bharding512
Copy link

bharding512 commented Mar 19, 2024

Bumping this and adding a new plot comparing geomagindices with @sunipkm's geomagdata, in case it helps anyone as confused as I was. It appears geomagindices only has ~monthly averages for F10.7 in the post-SWPC era.

geomagindices:
image

geomagdata:
image

import geomagindices as gm
import pandas as pd

times = pd.date_range('2016-01-01','2024-01-01')
ds_gm = gm.get_indices(times)

plt.figure(figsize=(10,3))
plt.plot(times, ds_gm.f107, 'k-', lw=1)
plt.ylabel('F10.7 index [sfu]')
     
plt.tight_layout()

@sunipkm sunipkm closed this Mar 21, 2024
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.

4 participants