LANL-Seismoacoustics / pisces

Pisces: A practical seismological database library in Python.
http://lanl-seismoacoustics.github.io/pisces/
Other
17 stars 10 forks source link

request.get_station errors when using stations and channels input parameters #35

Closed klaaur closed 3 years ago

klaaur commented 3 years ago

There are two, likely copy-pasta errors, in the request.py get_stations function.

1) In your if stations statement on line 368 you filter using the variable 'sta' but the user variable input is 'stations', so this results in an error as 'sta' is not defined. Line 368 should change to: q = q.filter(Site.sta.in_(stations))

2) in your if channels statement on line 379 there's an if isinstance(chans, str) check, but the user variable input is 'channels', so this results in an error as 'chans' is not defined. Line 379 should change to: if isinstance(chanels, str)

I'm assuming this happened because there are other functions in request that use sta and chan variables.

jkmacc-LANL commented 3 years ago

@klaaur I'm sorry this slipped past me a few days! I'll look at this today. Thank you for filing an issue.

jkmacc-LANL commented 3 years ago

@klaaur I don't want to hold you up; are you allowed to contribute a PR for this? I'd love to have you on the AUTHORS.rst!

jkmacc-LANL commented 3 years ago

Closed by #36