TauModel to TauPyModel

Hi!

I am trying to calculate some arrival times for the model I am using. I created the model using build_taup_model() and then I read it in with TauModel.from_file(“mymodel.npz”)

How do I change this now to TauPyModel so I can use .get_travel_times? Am I missing something in docs?

Thanks!

Blaž

Hi Blaz,

Just using

from obspy.taup import TauPyModel

m = TauPyModel(“mymodel.npz”)

should do the trick.

Otherwise you could do

m = TauPyModel()

m.model = TauModel.from_file(“mymodel.npz”)

but this is slower as the TauPyModel() call would already initialize the default model if no arguments are passed.

Cheers!

Lion

Thanks, you are right. It works.

blaž