Example #1
0
def main():

    client = create_client("alertes.roa.es", on_data=handle_data)
    stations = ('WM.AVE', 'WM.CART', 'WM.EMAL')
    #Add the stations to the request
    for i in stations:
        net, sta = i.split('.')
        client.select_stream(net, sta, 'HH?')

    client.run()
Example #2
0
 def __checkStatus(self):
     """
     Function for checking the status of the seedlink location and fetching all station related information from the seedlink server and saving it to station_info.
     """
     try:
         cl = create_client(self.__server_name)
     except:
         return False
     self.__station_info = ET.fromstring(cl.get_info('STREAMS'))
     cl.close()
     return True
Example #3
0
def obspy_worker(network='HV'):
    client = create_client('rtserve.iris.washington.edu', on_data=handle_trace)
    station_xml = client.get_info('STREAMS')  # should be async
    station_xml = ET.fromstring(station_xml)
    stations = station_xml.findall("./*/[@network='{}']".format(network))
    for station in stations[0:3]:
        station_name = station.attrib['name']
        channels = station.getchildren()
        for channel in channels:
            channel_name = channel.attrib['seedname']
            client.select_stream(network, station_name, channel_name)
    client.run()
Example #4
0
    def retrieve_data(self, e):

        self.client = create_client(self.serverAddressForm.text(),
                                    on_data=self.handle_data,
                                    on_seedlink_error=self.seedlink_error,
                                    on_terminate=self.terminate_data)

        pyc.QMetaObject.invokeMethod(self.timer_outdated, 'start')

        for net in self.netForm.text().split(","):
            for sta in self.stationForm.text().split(","):
                for chn in self.channelForm.text().split(","):
                    self.client.select_stream(net, sta, chn)

        # self.client.on_data()
        self.client.run()
def obspy_worker():
    client = create_client('rtserve.iris.washington.edu', on_data=handle_trace)
    client.select_stream('HV', 'WOOD', '???')
    client.run()
from obspy.clients.seedlink.easyseedlink import create_client

def handle_trace(trace):
    print(trace)

client = create_client('rtserve.iris.washington.edu', on_data=handle_trace)
client.select_stream('HV','WOOD','EHZ')
client.run()