Thanks for the rapid response. I wrote a code using based on your examples. However, I got some issues. First, the minimum RMS is 2.014, second, the MayaVI 3d plot is transposed. I copied a piece of code next. I imported the data as you said xyz.
if __name__ == "__main__":
print '\n---- 3D GRAVITY INVERSION ----'
# upload data
xp, yp, gz = np.loadtxt('local.csv', comments='#', skiprows=1, delimiter=',', unpack=True)
zp = np.empty(len(xp))
zp.fill(-1.0)
xp = xp - min(xp)
yp = yp - min(yp)
bounds = [0, 11000, 0, 11000, 0, 4000]
prism_shape = (20, 40, 40)
mesh = mesher.PrismMesh(bounds, prism_shape)
seeds = harvester.sow(
[(4000, 8689, 2000, {'density': 400}),
(4181.91, 7825, 2000, {'density': -400}),
(2349.18, 6725.36, 2000, {'density': 400}),
(935.351, 4473.71, 2000, {'density': -400}),
(3972.46, 1488.96, 2000, {'density': 400}),
(6590.65, 494.051, 2000, {'density': -400}),
(10177.6, 7458.45, 2000, {'density': -400}),
(6067.01, 3190.79, 2000, {'density': 400}),
(7009.56, 1881.69, 2000, {'density': 400}),
(7978.3, 3374.07, 2000, {'density': -400}),
(4836.46, 5966.08, 2000, {'density': -400}),
(6695.38, 5547.17, 2000, {'density': 400}),
(8449.57, 6227.9, 2000, {'density': -400}),
(9627.76, 8165.36, 2000, {'density': 400}),
(8632.85, 9212.64, 2000, {'density': -400})], mesh)
data = [harvester.Gz(x, y, z, g_obs)]
estimate, predicted = harvester.harvest(data, seeds, mesh,
compactness=0.08,
threshold=0.00001)
mesh.addprop('density', estimate['density'])
bodies = mesher.vremove(0, 'density', cube_mesh)