diff --git a/bezpy/mt/datalogger.py b/bezpy/mt/datalogger.py index 5cc1b08..c0a4612 100644 --- a/bezpy/mt/datalogger.py +++ b/bezpy/mt/datalogger.py @@ -34,13 +34,15 @@ def download_iris_waveforms(self, name, start_time, end_time): # pylint: disable=import-error,import-outside-toplevel from obspy.clients.fdsn import Client _IRIS_CLIENT = Client("IRIS") + from obspy.core import UTCDateTime # Download the stream # The channels are # E: LQN/LQE # B: LFN/LFE/LFZ stream = _IRIS_CLIENT.get_waveforms("EM", name, "*", "*", - start_time, end_time) + UTCDateTime(start_time), + UTCDateTime(end_time)) # Convert the stream to a pandas DataFrame waveforms = _convert_stream_to_df(stream) # Channel conversion factors and renaming diff --git a/bezpy/mt/io.py b/bezpy/mt/io.py index eaa5b73..ce2bb41 100644 --- a/bezpy/mt/io.py +++ b/bezpy/mt/io.py @@ -134,6 +134,12 @@ def read_xml(fname): site.calc_resisitivity() site.datalogger = DataLogger() + try: + site.datalogger.runlist = get_text(xml_site, "RunList").split() + except AttributeError: + # No RunList means no data + return site + try: runinfo, nimsid, samplingrate = read_logger_info(site.xml) # No info about the nimsid from the logger read, so just return