Closed jsomeara closed 1 year ago
Two options, first is seedlink allows wildcards, so
reader.select("UW", "LYNC", "", "HN?")
Second option if wildcards are not sufficient is repeating the select command, like:
reader.select("UW", "LYNC", "", "HNE")
reader.select("UW", "LYNC", "", "HNN")
reader.select("UW", "LYNC", "", "HNZ")
Next version will have a couple of util methods to make this a bit easier.
Not 100% sure, but I recall trying the method with multiple .select statements and that only returned data from the last statement (ie. reader.select("UW", "LYNC", "", "HNZ"))
Once again, correct me if I'm wrong here.
Digging in a bit more, the issue is with the empty location code. The code tries to put in a default wildcard of "??" for empty location codes, but this prevents channels with no location code from matching. Seedlink seems to not allow * as a wildcard for location. Defaulting to empty spaces then doesn't match channels where location code is something like 00, so seems no good answer. If I had a dime for every time I have been bitten by empty location codes I would be a rich man...the worst idea in the history of seismic data formats. :(
For now you can do this:
reader.select("UW", "LYNC", " ", "HNE");
reader.select("UW", "LYNC", " ", "HNN");
reader.select("UW", "LYNC", " ", "HNZ");
eg, set location code to two spaces. Tested and it will get data for LYNC.
Next version will allow you to do this, which generates commands that will avoid repeating the station command and allows explicit setting of the missing location code, which is probably better anyway.
reader.sendStation("UW","LYNC");
reader.sendSelect("HNZ");
reader.sendSelect("HNN");
reader.sendSelect("HNE");
Looks good. Thanks for the help!
This works fine:
However, this does not:
The above code returns:
Is it possible to select multiple channels?