In [1]:
%matplotlib inline
import numpy as np
from fatiando import gridder, utils
from fatiando.mesher import PolygonalPrism
from fatiando.gravmag import polyprism, _polyprism_numpy
In [2]:
vertices = utils.circular_points([-3000, 3000, -3000, 3000], 300)[::-1]
props = {'density': 1000, 'magnetization': utils.ang2vec(2, 25, -10)}
model = [PolygonalPrism(vertices, 0, 2000, props)]
inc, dec = -30, 20
shape = (100, 100)
x, y, z = gridder.regular([-5000, 5000, -5000, 5000], shape, z=-1)
In [3]:
%timeit _polyprism_numpy.gz(x, y, z, model)
In [4]:
%timeit polyprism.gz(x, y, z, model)
In [5]:
%timeit _polyprism_numpy.gzz(x, y, z, model)
In [6]:
%timeit polyprism.gzz(x, y, z, model)
In [7]:
%timeit _polyprism_numpy.tf(x, y, z, model, inc, dec)
In [8]:
%timeit polyprism.tf(x, y, z, model, inc, dec)