paudetseis / PyRaysum

Teleseismic body wave modeling through stacks of (dipping/anisotropic) layers
https://paudetseis.github.io/PyRaysum/
MIT License
43 stars 14 forks source link

ValueError: failed in converting 1st argument `thick' of fraysum.run_full to C/Fortran array #21

Closed hubery055 closed 1 year ago

hubery055 commented 1 year ago

I'm encountering an error whenever I set the maxlay parameter to any number other than 15. Here is a snippet of my Python code:


model = Model(
    thickn=[32000, 0],  # m; half-space thickness is irrelevant
    rho=[2800, 3600],  # kg/m^3
    vp=[6400, 8100],  # m/s
    vs=[3600, 4650],  # m/s
    maxlay=1500, # Neither 5 nor any other values work
)
# Set up Geometry
baz = 0
slow = 0.06
geom = prs.Geometry(baz=baz, slow=slow)

# Set up run parameters
phl = ["1P0P", "1P0P0p0P", "1P0P0p0S", "1P0P0s0S", "1P0S"]
ctrl = prs.Control(
    verbose=False,
    rot=1,
    mults=2,
    dt=1 / 100,
    npts=5000,
    align=0,
)

ctrl.set_phaselist(phl, equivalent=True)
result = prs.run(model, geom, ctrl, rf=True)
hubery055 commented 1 year ago

I wanted to update that the issue I was experiencing with the maxlay parameter has been resolved.

The solution was found in #18

wasjabloch commented 1 year ago

If you want to use many (>15) layers, it is best to consider Telewavesim.