def doCompute(): inlFactor = xa.SI['zstep'] / xa.SI['inldist'] * xa.SI['dipFactor'] crlFactor = xa.SI['zstep'] / xa.SI['crldist'] * xa.SI['dipFactor'] zw = xa.params['ZSampMargin']['Value'][1] - xa.params['ZSampMargin'][ 'Value'][0] + 1 filt = xa.params['Select']['Selection'] filtFunc = jit(xl.vecmean) if filt == 0 else jit( xl.vmf_l1) if filt == 1 else jit(xl.vmf_l2) while True: xa.doInput() dx = -xa.Input['Inl_dip'] / inlFactor dy = -xa.Input['Crl_dip'] / crlFactor dz = np.ones(dx.shape) s = np.sqrt(dx * dx + dy * dy + dz * dz) # # Apply the Vector Filter out = np.empty((3, xa.TI['nrsamp'])) xl.vecFilter(np.array([dx / s, dy / s, dz / s]), zw, filtFunc, out) # # Get the output xa.Output['Crl_dip'] = -out[1, :] / out[2, :] * crlFactor xa.Output['Inl_dip'] = -out[0, :] / out[2, :] * inlFactor xa.Output['True Dip'] = np.sqrt( xa.Output['Crl_dip'] * xa.Output['Crl_dip'] + xa.Output['Inl_dip'] * xa.Output['Inl_dip']) xa.Output['Dip Azimuth'] = np.degrees( np.arctan2(xa.Output['Inl_dip'], xa.Output['Crl_dip'])) xa.doOutput()
def doCompute(): xs = xa.SI['nrinl'] ys = xa.SI['nrcrl'] zs = xa.params['ZSampMargin']['Value'][1] - xa.params['ZSampMargin']['Value'][0] + 1 filt = xa.params['Select']['Selection'] filtFunc = autojit(xl.vecmean) if filt==0 else autojit(xl.vmf_l1) if filt==1 else autojit(xl.vmf_l2) inlFactor = xa.SI['zstep']/xa.SI['inldist'] * xa.SI['dipFactor'] crlFactor = xa.SI['zstep']/xa.SI['crldist'] * xa.SI['dipFactor'] band = xa.params['Par_1']['Value'] zw = min(2*int(xa.params['Par_0']['Value'])+1,3) N = xa.params['ZSampMargin']['Value'][1] kernel = xl.hilbert_kernel(N, band) while True: xa.doInput() indata = xa.Input['Input'] # # Analytic Signal # ansig = np.apply_along_axis(np.convolve,-1, indata, kernel, mode="same") sr = np.real(ansig) si = np.imag(ansig) # # Compute partial derivatives sx = xl.kroon3( sr, axis=0 ) sy = xl.kroon3( sr, axis=1 ) sz = xl.kroon3( sr, axis=2 ) shx = xl.kroon3( si, axis=0 ) shy = xl.kroon3( si, axis=1 ) shz = xl.kroon3( si, axis=2 ) px = sr[1:xs-1,1:ys-1,:] * shx[1:xs-1,1:ys-1,:] - si[1:xs-1,1:ys-1,:] * sx[1:xs-1,1:ys-1,:] py = sr[1:xs-1,1:ys-1,:] * shy[1:xs-1,1:ys-1,:] - si[1:xs-1,1:ys-1,:] * sy[1:xs-1,1:ys-1,:] pz = sr[1:xs-1,1:ys-1,:] * shz[1:xs-1,1:ys-1,:] - si[1:xs-1,1:ys-1,:] * sz[1:xs-1,1:ys-1,:] # # Normalise the gradients so Z component is positive p = np.sign(pz)/np.sqrt(px*px+py*py+pz*pz) px *= p py *= p pz *= p # # Filter out = np.empty((3,xa.TI['nrsamp'])) xl.vecFilter(np.array([px,py,pz]), zw, filtFunc, out) # # Get the output xa.Output['Crl_dip'] = -out[1,:]/out[2,:]*crlFactor xa.Output['Inl_dip'] = -out[0,:]/out[2,:]*inlFactor xa.Output['True Dip'] = np.sqrt(xa.Output['Crl_dip']*xa.Output['Crl_dip']+xa.Output['Inl_dip']*xa.Output['Inl_dip']) xa.Output['Dip Azimuth'] = np.degrees(np.arctan2(xa.Output['Inl_dip'],xa.Output['Crl_dip'])) xa.doOutput()
def doCompute(): xs = xa.SI['nrinl'] ys = xa.SI['nrcrl'] zs = xa.params['ZSampMargin']['Value'][1] - xa.params['ZSampMargin']['Value'][0] + 1 zw = zs-2 filt = xa.params['Select']['Selection'] filtFunc = autojit(xl.vecmean) if filt==0 else autojit(xl.vmf_l1) if filt==1 else autojit(xl.vmf_l2) inlFactor = xa.SI['zstep']/xa.SI['inldist'] * xa.SI['dipFactor'] crlFactor = xa.SI['zstep']/xa.SI['crldist'] * xa.SI['dipFactor'] while True: xa.doInput() s = xa.Input['Input'] sh = np.imag( hilbert(s) ) # # Compute partial derivatives sx = xl.kroon3( s, axis=0 ) sy = xl.kroon3( s, axis=1 ) sz = xl.kroon3( s, axis=2 ) shx = xl.kroon3( sh, axis=0 ) shy = xl.kroon3( sh, axis=1 ) shz = xl.kroon3( sh, axis=2 ) px = s[1:xs-1,1:ys-1,:] * shx[1:xs-1,1:ys-1,:] - sh[1:xs-1,1:ys-1,:] * sx[1:xs-1,1:ys-1,:] py = s[1:xs-1,1:ys-1,:] * shy[1:xs-1,1:ys-1,:] - sh[1:xs-1,1:ys-1,:] * sy[1:xs-1,1:ys-1,:] pz = s[1:xs-1,1:ys-1,:] * shz[1:xs-1,1:ys-1,:] - sh[1:xs-1,1:ys-1,:] * sz[1:xs-1,1:ys-1,:] # # Normalise the gradients so Z component is positive p = np.sign(pz)/np.sqrt(px*px+py*py+pz*pz) px *= p py *= p pz *= p # # Filter out = np.empty((3,xa.TI['nrsamp'])) xl.vecFilter(np.array([px,py,pz]), zw, filtFunc, out) # # Get the output xa.Output['Crl_dip'] = -out[1,:]/out[2,:]*crlFactor xa.Output['Inl_dip'] = -out[0,:]/out[2,:]*inlFactor xa.Output['True Dip'] = np.sqrt(xa.Output['Crl_dip']*xa.Output['Crl_dip']+xa.Output['Inl_dip']*xa.Output['Inl_dip']) xa.Output['Dip Azimuth'] = np.degrees(np.arctan2(xa.Output['Inl_dip'],xa.Output['Crl_dip'])) xa.doOutput()
def doCompute(): xs = xa.SI['nrinl'] ys = xa.SI['nrcrl'] zs = xa.params['ZSampMargin']['Value'][1] - xa.params['ZSampMargin'][ 'Value'][0] + 1 zw = zs - 2 filt = xa.params['Select']['Selection'] filtFunc = autojit(xl.vecmean) if filt == 0 else autojit( xl.vmf_l1) if filt == 1 else autojit( xl.vmf_l2) if filt == 2 else autojit(xl.vmf_x3) inlFactor = xa.SI['zstep'] / xa.SI['inldist'] * xa.SI['dipFactor'] crlFactor = xa.SI['zstep'] / xa.SI['crldist'] * xa.SI['dipFactor'] while True: xa.doInput() p = xa.Input['Input'] # # Compute partial derivatives px = xl.kroon3(p, axis=0)[1:xs - 1, 1:ys - 1, :] py = xl.kroon3(p, axis=1)[1:xs - 1, 1:ys - 1, :] pz = xl.kroon3(p, axis=2)[1:xs - 1, 1:ys - 1, :] # # Normalise the gradients so Z component is positive p = np.sign(pz) / np.sqrt(px * px + py * py + pz * pz) px *= p py *= p pz *= p # # Filter out = np.empty((3, xa.TI['nrsamp'])) xl.vecFilter(np.array([px, py, pz]), zw, filtFunc, out) # # Get the output xa.Output['Crl_dip'] = -out[1, :] / out[2, :] * crlFactor xa.Output['Inl_dip'] = -out[0, :] / out[2, :] * inlFactor xa.Output['True Dip'] = np.sqrt( xa.Output['Crl_dip'] * xa.Output['Crl_dip'] + xa.Output['Inl_dip'] * xa.Output['Inl_dip']) xa.Output['Dip Azimuth'] = np.degrees( np.arctan2(xa.Output['Inl_dip'], xa.Output['Crl_dip'])) xa.doOutput()
def doCompute(): inlFactor = xa.SI['zstep']/xa.SI['inldist'] * xa.SI['dipFactor'] crlFactor = xa.SI['zstep']/xa.SI['crldist'] * xa.SI['dipFactor'] zw = xa.params['ZSampMargin']['Value'][1] - xa.params['ZSampMargin']['Value'][0] + 1 filt = xa.params['Select']['Selection'] filtFunc = autojit(xl.vecmean) if filt==0 else autojit(xl.vmf_l1) if filt==1 else autojit(xl.vmf_l2) while True: xa.doInput() dx = -xa.Input['Inl_dip']/inlFactor dy = -xa.Input['Crl_dip']/crlFactor dz = np.ones(dx.shape) s = np.sqrt(dx*dx+dy*dy+dz*dz) # # Apply the Vector Filter out = np.empty((3,xa.TI['nrsamp'])) xl.vecFilter(np.array([dx/s,dy/s,dz/s]), zw, filtFunc, out) # # Get the output xa.Output['Crl_dip'] = -out[1,:]/out[2,:]*crlFactor xa.Output['Inl_dip'] = -out[0,:]/out[2,:]*inlFactor xa.Output['True Dip'] = np.sqrt(xa.Output['Crl_dip']*xa.Output['Crl_dip']+xa.Output['Inl_dip']*xa.Output['Inl_dip']) xa.Output['Dip Azimuth'] = np.degrees(np.arctan2(xa.Output['Inl_dip'],xa.Output['Crl_dip'])) xa.doOutput()