You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, Thanks for implementing and sharing these useful package. When I was running it, the eikonal function with one sources like the codes in 'demo' runs smoothly. However, if I try to input the eikonal function with multiple sources following the instruction in the 'src' folder, no matter the grid size, it has the error of 'Segmentation fault'. The same as eikonal_surf function, no matter the grid size i tried, the same error 'Segmentation fault' showed up.
So I was wondering if these two functions work? Could share some examples using these functions in 'demo' folder? That would be very helpful.
Thanks!
Yifan
The text was updated successfully, but these errors were encountered:
Thanks for your feedback. Here is an example.
https://github.com/chenyk1990/pyrfloc/blob/main/demos/test_first.py
Please download data according to the documentation and also uncomment the
following lines to generate traveltime using pyekfmm.
## using pyekfmm to calculate traveltime
# shots=myloc.evlabels.transpose();
# myloc.calc_traveltime(shots);
# myloc.stimes=myloc.fmmtimes;
The function for using pyekfmm to calculate traveltime is copied and pasted
below.
def calc_traveltime(self,shots):
'''
Calculate traveltime using pyekfmm
A substitute of load_traveltime
'''
import pyekfmm as fmm
vp=self.vp; #zxy
vp=np.swapaxes(vp,0,2).reshape([self.nx*self.ny*self.nz,1],order='F');
#transpose to [xyz]
fmmtimes=np.zeros([self.nx,self.ny,self.nevent],dtype='float32')
#x,y,nevent
for ii in range(self.nevent):
fmmtimes[:,:,ii]=fmm.eikonal_surf(vp,
xyz=np.expand_dims(shots[ii,:],0),
ay=[self.minx,self.dx,self.nx],
ax=[self.miny,self.dy,self.ny],
az=[self.minz,self.dz,self.nz
],
order=1,verb=0).reshape(self.nx,self.ny,order='F');
#a little inconsistent here (due to C-version X-Y inconsistency)
if np.mod(ii,50)==0:
print('event id=',ii,' is done\n');
self.fmmtimes=fmmtimes;
On Mon, Jul 24, 2023 at 1:50 PM Yifan Yu ***@***.***> wrote:
Hi, Thanks for implementing and sharing these useful package. When I was
running it, the eikonal function with one sources like the codes in 'demo'
runs smoothly. However, if I try to input the eikonal function with
multiple sources following the instruction in the 'src' folder, no matter
the grid size, it has the error of 'Segmentation fault'. The same as
eikonal_surf function, no matter the grid size i tried, the same error
'Segmentation fault' showed up.
So I was wondering if these two functions work? Could share some examples
using these functions in 'demo' folder? That would be very helpful.
Thanks!
Yifan
—
Reply to this email directly, view it on GitHub
<#1>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADHCWEV5LHYPTRT2KCAVIULXR27YNANCNFSM6AAAAAA2V7VTGM>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
Hi, Thanks for implementing and sharing these useful package. When I was running it, the eikonal function with one sources like the codes in 'demo' runs smoothly. However, if I try to input the eikonal function with multiple sources following the instruction in the 'src' folder, no matter the grid size, it has the error of 'Segmentation fault'. The same as eikonal_surf function, no matter the grid size i tried, the same error 'Segmentation fault' showed up.
So I was wondering if these two functions work? Could share some examples using these functions in 'demo' folder? That would be very helpful.
Thanks!
Yifan
The text was updated successfully, but these errors were encountered: