Skip to content

Commit e93d523

Browse files
author
Andrew Schaeffer
committed
2025-04-01 21:00 PDT
Minor Updates: correct query_fdsn_stdb.py so that chnrank does not interfere with single channel requests. Signed-off-by: Andrew Schaeffer <andrew.schaeffer@nrcan-rncan.gc.ca>
1 parent 79264e5 commit e93d523

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

stdb/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@
109109
110110
"""
111111

112-
__version__ = '0.2.5'
112+
__version__ = '0.2.6'
113113

114114
from . import kml
115115
from .classes import StDbElement

stdb/scripts/query_fdsn_stdb.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,9 @@ def get_options():
9393
SelectGroup.add_option("--channel-rank", action="store", type=str,
9494
dest="chnrank", default="HH,BH,LH", help=("If requesting more than one "
9595
"type of channel, specify a comma separated list of the first two "
96-
"lettres of the desired components to retain. Default is HH > BH > LH: "
97-
"['HH,BH,LH']"))
96+
"lettres of the desired components to retain. If only 1 channel is "
97+
"specified by -C, then chnrank is replaced with that channel. "
98+
"Default is HH > BH > LH: ['HH,BH,LH']"))
9899

99100
# Channel Settings
100101
ChannelGroup=OptionGroup(parser, title="Station-Channel Settings",
@@ -230,7 +231,10 @@ def get_options():
230231
opts.userauth = [None, None]
231232

232233
# Parse Channel Rank to List
233-
opts.chnrank = opts.chnrank.split(',')
234+
if len(opts.chns.split(','))>1:
235+
opts.chnrank = opts.chnrank.split(',')
236+
else:
237+
opts.chnrank=opts.chns.split(',')
234238

235239
# Check Geographic Settings
236240
if (opts.minlat is not None or
@@ -630,8 +634,8 @@ def main(args=None):
630634
stations[key] = StDbElement(network=network,
631635
station=station, channel=chn, location=locs,
632636
latitude=lat, longitude=lon, elevation=elev,
633-
polarity=1., azcorr=0., startdate=stdt, enddate=eddt,
634-
restricted_status=stat)
637+
polarity=1., azcorr=0., startdate=stnchnstdt,
638+
enddate=stnchneddt, restricted_status=stat)
635639
print (" Added as: " + key)
636640
else:
637641
print (" Warning: " + key + " already exists...Skip")

version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.2.5
1+
0.2.6

0 commit comments

Comments
 (0)