paudetseis / PyRaysum

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

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

Closed hubery055 closed 10 months ago

hubery055 commented 10 months 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 10 months 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 10 months ago

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