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

Select stations #19

Closed
HerrMuellerluedenscheid opened this issue Jun 13, 2019 · 1 comment
Closed

Select stations #19

HerrMuellerluedenscheid opened this issue Jun 13, 2019 · 1 comment
Assignees
Labels

Comments

@HerrMuellerluedenscheid
Copy link
Contributor

HerrMuellerluedenscheid commented Jun 13, 2019

Hi,

The circular region selection of stations appears to be broken. The example here:

>>> client.select_stations('0101', latitude=30, longitude139,
...                        minradius=0, maxradius=2)

produces the following error stack:

Traceback (most recent call last):
  File "download.py", line 285, in <module>
    hinet.download_event_data(events, args.maxradius)
  File "download.py", line 247, in download_event_data
    fn = self.event_to_stations(event, maxradius)
  File "download.py", line 225, in event_to_stations
    minradius=0, maxradius=2)
  File "/home/marius/.local/lib/python3.5/site-packages/HinetPy/client.py", line 1049, in select_stations
    stations_at_server = self.get_station_list(code)
  File "/home/marius/.local/lib/python3.5/site-packages/HinetPy/client.py", line 903, in get_station_list
    latitude, longitude, elevation = items[7], items[8], items[12]
IndexError: list index out of range

Also, there is a typo in the example (longitude139)

@seisman seisman added the bug label Jun 13, 2019
@seisman seisman self-assigned this Jun 13, 2019
@seisman
Copy link
Owner

seisman commented Jun 13, 2019

Hi-net recently changed the CSV format of stations information file. I've made changes, now it should work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants