Skip to content

Commit

Permalink
Renamed grd to gridder
Browse files Browse the repository at this point in the history
--HG--
rename : cookbook/grd_cut.py => cookbook/grid_cut.py
rename : cookbook/grd_scatter.py => cookbook/grid_scatter.py
rename : doc/api/grd.rst => doc/api/gridder.rst
rename : fatiando/grd.py => fatiando/gridder.py
  • Loading branch information
leouieda committed Nov 28, 2012
1 parent 776c4f0 commit d0e508e
Show file tree
Hide file tree
Showing 59 changed files with 84 additions and 88 deletions.
4 changes: 2 additions & 2 deletions cookbook/grd_cut.py → cookbook/grid_cut.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
log.info(__doc__)

# Generate some synthetic data on a regular grid
x, y = ft.grd.regular((-10, 10, -10, 10), (100,100))
x, y = ft.gridder.regular((-10, 10, -10, 10), (100,100))
# Using a 2D Gaussian
z = ft.utils.gaussian2d(x, y, 1, 1)
subarea = [-2, 2, -3, 3]
subx, suby, subscalar = ft.grd.cut(x, y, [z], subarea)
subx, suby, subscalar = ft.gridder.cut(x, y, [z], subarea)

ft.vis.figure(figsize=(12, 5))
ft.vis.subplot(1, 2, 1)
Expand Down
2 changes: 1 addition & 1 deletion cookbook/grd_scatter.py → cookbook/grid_scatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
log.info(__doc__)

# Generate random points
x, y = ft.grd.scatter((-2, 2, -2, 2), n=200)
x, y = ft.gridder.scatter((-2, 2, -2, 2), n=200)
# And calculate a 2D Gaussian on these points
z = ft.utils.gaussian2d(x, y, 1, 1)

Expand Down
2 changes: 1 addition & 1 deletion cookbook/msh_ddd_prismmesh_topo.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
bounds = (x1, x2, y1, y2, -200, 0)

log.info("Generating synthetic topography")
x, y = ft.grd.regular((x1, x2, y1, y2), (50,50))
x, y = ft.gridder.regular((x1, x2, y1, y2), (50,50))
height = (100 +
-50*ft.utils.gaussian2d(x, y, 100, 200, x0=-50, y0=-100, angle=-60) +
100*ft.utils.gaussian2d(x, y, 50, 100, x0=80, y0=170))
Expand Down
6 changes: 3 additions & 3 deletions cookbook/msh_ddd_prismrelief_gz.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@
log.info("Generating synthetic topography")
area = (-150, 150, -300, 300)
shape = (30, 15)
x, y = ft.grd.regular(area, shape)
x, y = ft.gridder.regular(area, shape)
height = (-80*ft.utils.gaussian2d(x, y, 100, 200, x0=-50, y0=-100, angle=-60) +
200*ft.utils.gaussian2d(x, y, 50, 100, x0=80, y0=170))

log.info("Generating the 3D relief")
nodes = (x, y, -1*height)
relief = ft.msh.ddd.PrismRelief(0, ft.grd.spacing(area,shape), nodes)
relief = ft.msh.ddd.PrismRelief(0, ft.gridder.spacing(area,shape), nodes)
relief.addprop('density', (2670 for i in xrange(relief.size)))

log.info("Calculating gz effect")
gridarea = (-80, 80, -220, 220)
gridshape = (100, 100)
xp, yp, zp = ft.grd.regular(gridarea, gridshape, z=-200)
xp, yp, zp = ft.gridder.regular(gridarea, gridshape, z=-200)
gz = ft.pot.prism.gz(xp, yp, zp, relief)

log.info("Plotting")
Expand Down
4 changes: 2 additions & 2 deletions cookbook/msh_ddd_prismrelief_topo.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
log.info("Generating synthetic topography")
area = (-150, 150, -300, 300)
shape = (100, 50)
x, y = ft.grd.regular(area, shape)
x, y = ft.gridder.regular(area, shape)
height = (-80*ft.utils.gaussian2d(x, y, 100, 200, x0=-50, y0=-100, angle=-60) +
100*ft.utils.gaussian2d(x, y, 50, 100, x0=80, y0=170))

log.info("Generating the 3D relief")
nodes = (x, y, -1*height) # -1 is to convert height to z coordinate
reference = 0 # z coordinate of the reference surface
relief = ft.msh.ddd.PrismRelief(reference, ft.grd.spacing(area, shape), nodes)
relief = ft.msh.ddd.PrismRelief(reference, ft.gridder.spacing(area, shape), nodes)
relief.addprop('density', (2670 for i in xrange(relief.size)))

log.info("Plotting")
Expand Down
2 changes: 1 addition & 1 deletion cookbook/potential_euler_classic.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# Generate some data from the model
shape = (200, 200)
area = bounds[0:4]
xp, yp, zp = ft.grd.regular(area, shape, z=-1)
xp, yp, zp = ft.gridder.regular(area, shape, z=-1)
# Add a constant baselevel
baselevel = 10
# Convert from nanoTesla to Tesla because euler and derivatives require things
Expand Down
2 changes: 1 addition & 1 deletion cookbook/potential_euler_classic_expanding_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# Generate some data from the model
shape = (100, 100)
area = bounds[0:4]
xp, yp, zp = ft.grd.regular(area, shape, z=-1)
xp, yp, zp = ft.gridder.regular(area, shape, z=-1)
# Add a constant baselevel
baselevel = 10
# Convert from nanoTesla to Tesla because euler and derivatives require things
Expand Down
2 changes: 1 addition & 1 deletion cookbook/potential_euler_classic_noisy.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# Generate some data from the model
shape = (100, 100)
area = bounds[0:4]
xp, yp, zp = ft.grd.regular(area, shape, z=-1)
xp, yp, zp = ft.gridder.regular(area, shape, z=-1)
# Add a constant baselevel
baselevel = 10
# Convert from nanoTesla to Tesla because euler and derivatives require things
Expand Down
2 changes: 1 addition & 1 deletion cookbook/potential_fourier_deriv.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
area = (-5000, 5000, -5000, 5000)
shape = (51, 51)
z0 = -500
xp, yp, zp = ft.grd.regular(area, shape, z=z0)
xp, yp, zp = ft.gridder.regular(area, shape, z=z0)
gz = ft.utils.contaminate(ft.pot.prism.gz(xp, yp, zp, prisms), 0.001)

log.info("Calculating the x-derivative")
Expand Down
2 changes: 1 addition & 1 deletion cookbook/potential_grav_polyprism.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
depths[i - 1], depths[i], {'density':500}))
# Calculate the effect
shape = (100, 100)
xp, yp, zp = ft.grd.regular(area, shape, z=-1)
xp, yp, zp = ft.gridder.regular(area, shape, z=-1)
gz = ft.pot.polyprism.gz(xp, yp, zp, prisms)
# and plot it
ft.vis.figure()
Expand Down
2 changes: 1 addition & 1 deletion cookbook/potential_grav_prism.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
ft.msh.ddd.Prism(-1000,1000,-1000,1000,0,2000,{'density':-900}),
ft.msh.ddd.Prism(2000,4000,3000,4000,0,2000,{'density':1300})]
shape = (100,100)
xp, yp, zp = ft.grd.regular((-5000, 5000, -5000, 5000), shape, z=-150)
xp, yp, zp = ft.gridder.regular((-5000, 5000, -5000, 5000), shape, z=-150)
log.info("Calculating fileds...")
fields = [ft.pot.prism.pot(xp, yp, zp, prisms),
ft.pot.prism.gx(xp, yp, zp, prisms),
Expand Down
2 changes: 1 addition & 1 deletion cookbook/potential_grav_sphere.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
spheres = [ft.msh.ddd.Sphere(0, 0, -2000, 1000, {'density':1000})]
# Create a set of points at 100m height
area = (-5000, 5000, -5000, 5000)
xp, yp, zp = ft.grd.scatter(area, 500, z=-100)
xp, yp, zp = ft.gridder.scatter(area, 500, z=-100)
# Calculate the anomaly
gz = ft.utils.contaminate(ft.pot.sphere.gz(xp, yp, zp, spheres), 0.1)
# Plot
Expand Down
2 changes: 1 addition & 1 deletion cookbook/potential_harvester_grav.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
shape = (25, 25)
bounds = [0, 1000, 0, 1000, 0, 1000]
area = bounds[0:4]
xp, yp, zp = ft.grd.regular(area, shape, z=-1)
xp, yp, zp = ft.gridder.regular(area, shape, z=-1)
noise = 0.1 # 0.1 mGal noise
gz = ft.utils.contaminate(ft.pot.prism.gz(xp, yp, zp, model), noise)
# plot the data
Expand Down
2 changes: 1 addition & 1 deletion cookbook/potential_harvester_grav2.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
# and generate synthetic data from it
shape = (25, 25)
area = bounds[0:4]
xp, yp, zp = ft.grd.regular(area, shape, z=-1)
xp, yp, zp = ft.gridder.regular(area, shape, z=-1)
noise = 0.1 # 0.1 mGal noise
gz = ft.utils.contaminate(ft.pot.polyprism.gz(xp, yp, zp, model), noise)
# Create a mesh
Expand Down
2 changes: 1 addition & 1 deletion cookbook/potential_harvester_tensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
shape = (51, 51)
area = bounds[0:4]
noise = 2
x, y, z = ft.grd.regular(area, shape, z=-150)
x, y, z = ft.gridder.regular(area, shape, z=-150)
gyy = ft.utils.contaminate(ft.pot.prism.gyy(x, y, z, model), noise)
gyz = ft.utils.contaminate(ft.pot.prism.gyz(x, y, z, model), noise)
gzz = ft.utils.contaminate(ft.pot.prism.gzz(x, y, z, model), noise)
Expand Down
2 changes: 1 addition & 1 deletion cookbook/potential_harvester_tensor2.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
# and use it to generate some tensor data
shape = (25, 25)
area = bounds[0:4]
x, y, z = ft.grd.regular(area, shape, z=-650)
x, y, z = ft.gridder.regular(area, shape, z=-650)
gxy = ft.utils.contaminate(ft.pot.prism.gxy(x, y, z, model), 1)
gzz = ft.utils.contaminate(ft.pot.prism.gzz(x, y, z, model), 1)
# Create a prism mesh
Expand Down
2 changes: 1 addition & 1 deletion cookbook/potential_imaging_compare.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
ft.msh.ddd.PolygonalPrism(polygon, depths[i - 1], depths[i],
{'density':500}))
meshshape = (30, 30, 30)
xp, yp, zp = ft.grd.regular(area, meshshape[1:], z=-10)
xp, yp, zp = ft.gridder.regular(area, meshshape[1:], z=-10)
gz = ft.pot.polyprism.gz(xp, yp, zp, prisms)

# Plot the data
Expand Down
2 changes: 1 addition & 1 deletion cookbook/potential_imaging_geninv.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# Make some synthetic gravity data from a simple prism model
prisms = [ft.msh.ddd.Prism(-1000,1000,-3000,3000,0,5000,{'density':1000})]
shape = (25, 25)
xp, yp, zp = ft.grd.regular((-5000, 5000, -5000, 5000), shape, z=-10)
xp, yp, zp = ft.gridder.regular((-5000, 5000, -5000, 5000), shape, z=-10)
gz = ft.pot.prism.gz(xp, yp, zp, prisms)

# Plot the data
Expand Down
2 changes: 1 addition & 1 deletion cookbook/potential_imaging_geninv2.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
ft.msh.ddd.Prism(-1000,1000,-1000,1000,1000,6000,{'density':-800}),
ft.msh.ddd.Prism(2000,4000,3000,4000,0,4000,{'density':600})]
shape = (25, 25)
xp, yp, zp = ft.grd.regular((-5000, 5000, -5000, 5000), shape, z=-10)
xp, yp, zp = ft.gridder.regular((-5000, 5000, -5000, 5000), shape, z=-10)
gz = ft.utils.contaminate(ft.pot.prism.gz(xp, yp, zp, prisms), 0.1)

# Plot the data
Expand Down
2 changes: 1 addition & 1 deletion cookbook/potential_imaging_migration.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# Make some synthetic gravity data from a simple prism model
prisms = [ft.msh.ddd.Prism(-1000,1000,-2000,2000,2000,4000,{'density':500})]
shape = (50, 50)
xp, yp, zp = ft.grd.regular((-10000, 10000, -10000, 10000), shape, z=-10)
xp, yp, zp = ft.gridder.regular((-10000, 10000, -10000, 10000), shape, z=-10)
gz = ft.pot.prism.gz(xp, yp, zp, prisms)

# Plot the data
Expand Down
2 changes: 1 addition & 1 deletion cookbook/potential_imaging_migration2.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
ft.msh.ddd.Prism(2000,4000,3000,4000,0,2000,{'density':600})]
# Calculate on a scatter of points to show that migration doesn't need gridded
# data
xp, yp, zp = ft.grd.scatter((-6000, 6000, -6000, 6000), 1000, z=-10)
xp, yp, zp = ft.gridder.scatter((-6000, 6000, -6000, 6000), 1000, z=-10)
gz = ft.utils.contaminate(ft.pot.prism.gz(xp, yp, zp, prisms), 0.1)

# Plot the data
Expand Down
2 changes: 1 addition & 1 deletion cookbook/potential_imaging_sandwich.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# Make some synthetic gravity data from a simple prism model
prisms = [ft.msh.ddd.Prism(-1000,1000,-2000,2000,2000,4000,{'density':500})]
shape = (25, 25)
xp, yp, zp = ft.grd.regular((-5000, 5000, -5000, 5000), shape, z=-10)
xp, yp, zp = ft.gridder.regular((-5000, 5000, -5000, 5000), shape, z=-10)
gz = ft.pot.prism.gz(xp, yp, zp, prisms)

# Plot the data
Expand Down
2 changes: 1 addition & 1 deletion cookbook/potential_imaging_sandwich2.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
ft.msh.ddd.Prism(-1000,1000,-1000,1000,1000,7000,{'density':-300}),
ft.msh.ddd.Prism(2000,4000,3000,4000,0,2000,{'density':600})]
shape = (25, 25)
xp, yp, zp = ft.grd.regular((-10000, 10000, -10000, 10000), shape, z=-10)
xp, yp, zp = ft.gridder.regular((-10000, 10000, -10000, 10000), shape, z=-10)
gz = ft.pot.prism.gz(xp, yp, zp, prisms)

# Plot the data
Expand Down
2 changes: 1 addition & 1 deletion cookbook/potential_mag_polyprism.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
0, 2000, {'magnetization':2})]
# Calculate the effect
shape = (100, 100)
xp, yp, zp = ft.grd.regular(area, shape, z=-500)
xp, yp, zp = ft.gridder.regular(area, shape, z=-500)
tf = ft.pot.polyprism.tf(xp, yp, zp, prisms, 30, -15)
# and plot it
ft.vis.figure()
Expand Down
2 changes: 1 addition & 1 deletion cookbook/potential_mag_prism.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# Create a regular grid at 100m height
shape = (200, 200)
area = bounds[:4]
xp, yp, zp = ft.grd.regular(area, shape, z=-500)
xp, yp, zp = ft.gridder.regular(area, shape, z=-500)
# Calculate the anomaly for a given regional field
tf = ft.pot.prism.tf(xp, yp, zp, prisms, 30, -15)
# Plot
Expand Down
2 changes: 1 addition & 1 deletion cookbook/potential_mag_sphere.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# Create a regular grid at 100m height
shape = (100, 100)
area = (-5000, 5000, -5000, 5000)
xp, yp, zp = ft.grd.regular(area, shape, z=-100)
xp, yp, zp = ft.gridder.regular(area, shape, z=-100)
# Calculate the anomaly for a given regional field
tf = ft.pot.sphere.tf(xp, yp, zp, spheres, 30, 0)
# Plot
Expand Down
2 changes: 1 addition & 1 deletion cookbook/potential_prism_irregular_grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
log.info(__doc__)

prisms = [ft.msh.ddd.Prism(-2000, 2000, -2000, 2000, 0, 2000, {'density':1000})]
xp, yp, zp = ft.grd.scatter((-5000, 5000, -5000, 5000), n=100, z=-100)
xp, yp, zp = ft.gridder.scatter((-5000, 5000, -5000, 5000), n=100, z=-100)
gz = ft.pot.prism.gz(xp, yp, zp, prisms)

shape = (100,100)
Expand Down
2 changes: 1 addition & 1 deletion cookbook/potential_tensor_centerofmass.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# Generate some synthetic data
prisms = [ft.msh.ddd.Prism(-1000,1000,-1000,1000,1000,3000,{'density':1000})]
shape = (100, 100)
xp, yp, zp = ft.grd.regular((-5000, 5000, -5000, 5000), shape, z=-150)
xp, yp, zp = ft.gridder.regular((-5000, 5000, -5000, 5000), shape, z=-150)
noise = 2
tensor = [ft.utils.contaminate(ft.pot.prism.gxx(xp, yp, zp, prisms), noise),
ft.utils.contaminate(ft.pot.prism.gxy(xp, yp, zp, prisms), noise),
Expand Down
2 changes: 1 addition & 1 deletion cookbook/potential_tensor_centerofmass2.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
ft.msh.ddd.Prism(-1000,1000,-1000,1000,1000,1500,{'density':1000}),
ft.msh.ddd.Prism(-500,500,-500,500,1500,2000,{'density':1000})]
shape = (100, 100)
xp, yp, zp = ft.grd.regular((-5000, 5000, -5000, 5000), shape, z=-150)
xp, yp, zp = ft.gridder.regular((-5000, 5000, -5000, 5000), shape, z=-150)
noise = 1
tensor = [ft.utils.contaminate(ft.pot.prism.gxx(xp, yp, zp, prisms), noise),
ft.utils.contaminate(ft.pot.prism.gxy(xp, yp, zp, prisms), noise),
Expand Down
2 changes: 1 addition & 1 deletion cookbook/potential_tensor_centerofmass3.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
ft.msh.ddd.Prism(-1000,1000,-1000,1000,1000,1500,{'density':1000}),
ft.msh.ddd.Prism(-2000,2000,-2000,2000,1500,2000,{'density':1000})]
shape = (100, 100)
xp, yp, zp = ft.grd.regular((-5000, 5000, -5000, 5000), shape, z=-150)
xp, yp, zp = ft.gridder.regular((-5000, 5000, -5000, 5000), shape, z=-150)
noise = 1
tensor = [ft.utils.contaminate(ft.pot.prism.gxx(xp, yp, zp, prisms), noise),
ft.utils.contaminate(ft.pot.prism.gxy(xp, yp, zp, prisms), noise),
Expand Down
2 changes: 1 addition & 1 deletion cookbook/potential_tensor_centerofmass4.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# Generate some synthetic data
prisms = [ft.msh.ddd.Prism(-4000,4000,-500,500,500,1000,{'density':1000})]
shape = (100, 100)
xp, yp, zp = ft.grd.regular((-5000, 5000, -5000, 5000), shape, z=-150)
xp, yp, zp = ft.gridder.regular((-5000, 5000, -5000, 5000), shape, z=-150)
noise = 2
tensor = [ft.utils.contaminate(ft.pot.prism.gxx(xp, yp, zp, prisms), noise),
ft.utils.contaminate(ft.pot.prism.gxy(xp, yp, zp, prisms), noise),
Expand Down
2 changes: 1 addition & 1 deletion cookbook/potential_tensor_centerofmass5.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# Generate some synthetic data
prisms = [ft.msh.ddd.Prism(-500,500,-500,500,000,4000,{'density':1000})]
shape = (100, 100)
xp, yp, zp = ft.grd.regular((-5000, 5000, -5000, 5000), shape, z=-150)
xp, yp, zp = ft.gridder.regular((-5000, 5000, -5000, 5000), shape, z=-150)
noise = 1
tensor = [ft.utils.contaminate(ft.pot.prism.gxx(xp, yp, zp, prisms), noise),
ft.utils.contaminate(ft.pot.prism.gxy(xp, yp, zp, prisms), noise),
Expand Down
2 changes: 1 addition & 1 deletion cookbook/potential_tensor_centerofmass6.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# Generate some synthetic data
prisms = [ft.msh.ddd.Prism(-1000,1000,-1000,1000,500,700,{'density':1000})]
shape = (100, 100)
xp, yp, zp = ft.grd.regular((-5000, 5000, -5000, 5000), shape, z=-150)
xp, yp, zp = ft.gridder.regular((-5000, 5000, -5000, 5000), shape, z=-150)
noise = 1
tensor = [ft.utils.contaminate(ft.pot.prism.gxx(xp, yp, zp, prisms), noise),
ft.utils.contaminate(ft.pot.prism.gxy(xp, yp, zp, prisms), noise),
Expand Down
2 changes: 1 addition & 1 deletion cookbook/potential_tensor_centerofmass7.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# Generate some synthetic data
prisms = [ft.msh.ddd.Prism(-3000,3000,-3000,3000,500,1000,{'density':1000})]
shape = (100, 100)
xp, yp, zp = ft.grd.regular((-5000, 5000, -5000, 5000), shape, z=-150)
xp, yp, zp = ft.gridder.regular((-5000, 5000, -5000, 5000), shape, z=-150)
noise = 1
tensor = [ft.utils.contaminate(ft.pot.prism.gxx(xp, yp, zp, prisms), noise),
ft.utils.contaminate(ft.pot.prism.gxy(xp, yp, zp, prisms), noise),
Expand Down
2 changes: 1 addition & 1 deletion cookbook/potential_tensor_centerofmass8.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
prisms = [ft.msh.ddd.Prism(-2500,-500,-1000,1000,500,2500,{'density':1000}),
ft.msh.ddd.Prism(500,2500,-1000,1000,500,2500,{'density':1000})]
shape = (100, 100)
xp, yp, zp = ft.grd.regular((-5000, 5000, -5000, 5000), shape, z=-150)
xp, yp, zp = ft.gridder.regular((-5000, 5000, -5000, 5000), shape, z=-150)
noise = 2
tensor = [ft.utils.contaminate(ft.pot.prism.gxx(xp, yp, zp, prisms), noise),
ft.utils.contaminate(ft.pot.prism.gxy(xp, yp, zp, prisms), noise),
Expand Down
2 changes: 1 addition & 1 deletion cookbook/potential_tensor_invariants.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
0, depth, {'density':500}))
# Calculate the effect
shape = (100, 100)
xp, yp, zp = ft.grd.regular(dataarea, shape, z=-500)
xp, yp, zp = ft.gridder.regular(dataarea, shape, z=-500)
tensor = [
ft.pot.polyprism.gxx(xp, yp, zp, prisms),
ft.pot.polyprism.gxy(xp, yp, zp, prisms),
Expand Down
2 changes: 1 addition & 1 deletion cookbook/potential_tensor_polyprism.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
0, 1000, {'density':500})]
# Calculate the effect
shape = (100, 100)
xp, yp, zp = ft.grd.regular(area, shape, z=-500)
xp, yp, zp = ft.gridder.regular(area, shape, z=-500)
tensor = [
ft.pot.polyprism.gxx(xp, yp, zp, prisms),
ft.pot.polyprism.gxy(xp, yp, zp, prisms),
Expand Down
2 changes: 1 addition & 1 deletion cookbook/potential_tensor_prism_noisy.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

prisms = [ft.msh.ddd.Prism(-1000,1000,-1000,1000,0,2000,{'density':1000})]
shape = (100,100)
xp, yp, zp = ft.grd.regular((-5000, 5000, -5000, 5000), shape, z=-200)
xp, yp, zp = ft.gridder.regular((-5000, 5000, -5000, 5000), shape, z=-200)
components = [ft.pot.prism.gxx, ft.pot.prism.gxy, ft.pot.prism.gxz,
ft.pot.prism.gyy, ft.pot.prism.gyz, ft.pot.prism.gzz]
log.info("Calculate the tensor components and contaminate with 5 Eotvos noise")
Expand Down
4 changes: 2 additions & 2 deletions cookbook/potential_upcontinue.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
area = (-5000, 5000, -5000, 5000)
shape = (50, 50)
z0 = -100
xp, yp, zp = ft.grd.regular(area, shape, z=z0)
xp, yp, zp = ft.gridder.regular(area, shape, z=z0)
gz = ft.utils.contaminate(ft.pot.prism.gz(xp, yp, zp, prisms), 0.5)

# Now do the upward continuation using the analytical formula
height = 2000
dims = ft.grd.spacing(area, shape)
dims = ft.gridder.spacing(area, shape)
gzcont = ft.pot.trans.upcontinue(gz, height, xp, yp, dims)

log.info("Computing true values at new height")
Expand Down
2 changes: 1 addition & 1 deletion cookbook/seismic_epic2d.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@

log.info("Build a map of the goal function")
shape = (100, 100)
xs, ys = ft.grd.regular(area, shape)
xs, ys = ft.gridder.regular(area, shape)
goals = ft.seis.epic2d.mapgoal(xs, ys, ttresiduals, recs, vp, vs)

log.info("Plotting")
Expand Down

0 comments on commit d0e508e

Please sign in to comment.