I’m attempting to plot phase arrivals in Matplotlib, using the TaupPyModel.get_travel_times. I’ve managed to extract the arrival times and add them to the event time to get a predicted arrival at a seismometer. These are in a UTC timestamp. The problem I’m having is that I need to convert the UTC time to Matplotlib time, but I can’t seem to get it working. It just states that datetime.date object is not callable.
I’ve added the part of my code I need working below, any suggestions or alternatative way would be a great helpful.
import matplotlib.dates as dates from obspy import UTCDateTime from obspy.taup import TauPyModel ev_time = "2020-07-22 06:12:44" ev_depth = 28 ev_dist = 69.6 t = UTCDateTime(ev_time) model = TauPyModel(model = 'iasp91') arrivals = model.get_travel_times(source_depth_in_km = ev_depth, distance_ in_degree = ev_dist) arr_time = t + arrivals.time arr_time2 = dates.date2num(arr_time) # This is where the error occurs, I believe