Пример #1
0


#Move surface trace to bottom
delta_x=surface_trace[-1,0]-lon_parabola1[-1]
delta_y=surface_trace[-1,1]-lat_parabola1[-1]
bottom_trace=zeros((len(surface_trace),3))
bottom_trace[:,0]=surface_trace[:,0]-delta_x
bottom_trace[:,1]=surface_trace[:,1]-delta_y
bottom_trace[:,2]=ones(len(surface_trace))*y_parabola[-1]

delta_x=surface_trace[-1,0]-lon_parabola1[-2]
delta_y=surface_trace[-1,1]-lat_parabola1[-2]
bottom_trace2=zeros((len(surface_trace),3))
bottom_trace2[:,0]=surface_trace[:,0]-delta_x
bottom_trace2[:,1]=surface_trace[:,1]-delta_y
bottom_trace2[:,2]=ones(len(surface_trace))*y_parabola[-2]

delta_x=surface_trace[-1,0]-lon_parabola1[-3]
delta_y=surface_trace[-1,1]-lat_parabola1[-3]
bottom_trace3=zeros((len(surface_trace),3))
bottom_trace3[:,0]=surface_trace[:,0]-delta_x
bottom_trace3[:,1]=surface_trace[:,1]-delta_y
bottom_trace3[:,2]=ones(len(surface_trace))*y_parabola[-3]

#Append to fault
fault=r_[fault,bottom_trace,bottom_trace2,bottom_trace3]

#Make gmsh file
gmsh_tools.xyz2gmsh(gmsh_out,fault[:,0],fault[:,1],fault[:,2],coord_type='UTM',projection_zone='33T',point_offset=0)
Пример #2
0
                                    ones(len(deep)) * perp_strike + 180,
                                    ones(len(deep)) * dist * 1000)
deep[:, 3] = deep[:, 3] + (dl / 2.)**sin(deg2rad(deep_dip))
deep = r_[deep[:, :], expand_dims(deep[-1, :], 0), expand_dims(deep[-1, :], 0)]
deep[-1, 2], deep[-1, 1], foo = p.fwd(deep[0, 2], deep[0, 1], strike - 180,
                                      dl * 1000. / 2)
deep[-2, 2], deep[-2, 1], foo = p.fwd(deep[-2, 2], deep[-2, 1], strike,
                                      dl * 1000. / 2)

#left
left = f[0:9, :].copy()
left[:, 2], left[:, 1], foo = p.fwd(left[:, 2], left[:, 1],
                                    ones(len(left)) * strike - 180,
                                    ones(len(left)) * 0.5 * dl * 1000)

#Right
right = f[207:216, :].copy()
right[:, 2], right[:, 1], foo = p.fwd(right[:, 2], right[:, 1],
                                      ones(len(right)) * strike,
                                      ones(len(right)) * 0.5 * dl * 1000)

out = r_[f, shallow, deep, right, left]

#Gmshize

xyz2gmsh(gmsh_out,
         out[:, 2],
         out[:, 1],
         -out[:, 3],
         coord_type='UTM',
         projection_zone='54S')
Пример #3
0
#Now filter things
#By depth
i=where(contours[:,2]>=maxdepth)[0]
contours=contours[i,:]
#By regions
#Equations of the line filters
m1=(L1y1-L1y2)/(L1x1-L1x2)
m2=(L2y1-L2y2)/(L2x1-L2x2)
b1=L1y1-m1*L1x1
b2=L2y1-m2*L2x1
#Get points below line 1
ytest=m1*contours[:,0]+b1
i=where((ytest-contours[:,1])>=0)[0] #Points that lie below the line
contours=contours[i,:]
#Get points above line 2
ytest=m2*contours[:,0]+b2
i=where((ytest-contours[:,1])<=0)[0] #Points that lie below the line
contours=contours[i,:]

#Write gmsh file
xyz2gmsh(gmsh_out,contours[:,0],contours[:,1],contours[:,2],coord_type='UTM')


    
    




Пример #4
0
        if '>' not in line:  #It's not a segment header
            contours = r_[contours, expand_dims(float64(line.split('\t')), 0)]
    f.close()

#Now filter things
#By depth
i = where(contours[:, 2] >= maxdepth)[0]
contours = contours[i, :]
#By regions
#Equations of the line filters
m1 = (L1y1 - L1y2) / (L1x1 - L1x2)
m2 = (L2y1 - L2y2) / (L2x1 - L2x2)
b1 = L1y1 - m1 * L1x1
b2 = L2y1 - m2 * L2x1
#Get points below line 1
ytest = m1 * contours[:, 0] + b1
i = where((ytest - contours[:, 1]) >= 0)[0]  #Points that lie below the line
contours = contours[i, :]
#Get points above line 2
ytest = m2 * contours[:, 0] + b2
i = where((ytest - contours[:, 1]) <= 0)[0]  #Points that lie below the line
contours = contours[i, :]

#Write gmsh file
xyz2gmsh(gmsh_out,
         contours[:, 0],
         contours[:, 1],
         contours[:, 2],
         coord_type='UTM',
         projection_zone='15P')