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

get_url_for_time_range function in stereo.py in dataretriever not working correctly. #1619

Closed
sudk1896 opened this issue Dec 10, 2015 · 2 comments

Comments

@sudk1896
Copy link
Contributor

The following query:-

from sunpy.time.timerange import TimeRange
from sunpy.net.vso.attrs import Time, Instrument
from sunpy.net.dataretriever.client import QueryResponse
import sunpy.net.dataretriever.sources.stereo as stereo

LCClient = stereo.HETClient()
urls = LCClient._get_url_for_timerange(TimeRange('2008/12/01','2010/12/01'),'ahead', 15*u.min)

Should return a non-empty list of urls but instead returns an empty list. Possible problem stems from the implementation of scraper.py in sunpy.util. The scraper doesn't work as intended on http://www.srl.caltech.edu/STEREO/DATA/HET.

@dpshelio
Copy link
Member

Thanks @sudk1896!! I can confirm there's a problem with the scraper.

from sunpy.time import TimeRange
from sunpy.util import scraper

het_ahead = scraper.Scraper('http://www.srl.caltech.edu/STEREO/DATA/HET/Ahead/1minute/AeH%y%b.1m')
het_ahead.now
# that works!
tr = TimeRange('2007-08-01', '2007-08-10') # just a few days
het_ahead.filelist(tr)
# this doesn't
tr = TimeRange('2007-08-01', '2007-09-10') # more than a month
het_ahead.filelist(tr)
# neither that.
tr = TimeRange('2007-08-01T00:00:00', '2007-09-10T03:00:00') # with time too
het_ahead.filelist(tr)
# nop, same thing!

I will try to look into it during the weekend.
Please, add any other archive to this issue that you see failing, so I can see if there's a pattern.

Thanks!

@sudk1896
Copy link
Contributor Author

@dpshelio : Will do. Even I am trying to rectify the issue. Keep you posted.

@dpshelio dpshelio self-assigned this Jan 21, 2016
dpshelio added a commit to dpshelio/sunpy that referenced this issue Jul 31, 2016
Fix sunpy#1619 - also tests added for this situation
dpshelio added a commit to dpshelio/sunpy that referenced this issue Jul 31, 2016
Fix sunpy#1619 - also tests added for this situation
dpshelio added a commit to dpshelio/sunpy that referenced this issue Nov 5, 2016
Fix sunpy#1619 - also tests added for this situation
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

No branches or pull requests

2 participants