""" import pickle import pylab import numpy from enthought.mayavi import mlab from fatiando.grav import synthetic, io from fatiando import utils, vis, geometry # Get a logger for the script log = utils.get_logger() # Set logging to a file utils.set_logfile('make_data.log') # Log a header with the current version info log.info(utils.header()) # Make the prism model prisms = [] prisms.append( geometry.prism(x1=600, x2=1200, y1=200, y2=4200, z1=100, z2=600, props={'value': 1300})) prisms.append(
import cPickle as pickle import pylab import numpy from enthought.mayavi import mlab import fatiando.inv.gplant as gplant import fatiando.grav.synthetic as synthetic import fatiando.mesh import fatiando.utils as utils import fatiando.vis as vis # Get a logger log = utils.get_logger() # Set logging to a file utils.set_logfile('interp-model-gen.log') # Log a header with the current version info log.info(utils.header()) # GENERATE SYNTHETIC DATA ################################################################################ # Make the prism model model = [] model.append({'x1':1000, 'x2':2000, 'y1':1000, 'y2':2000, 'z1':1000, 'z2':2000, 'value':1000}) model = numpy.array(model) x1, x2 = 0, 3000 y1, y2 = 0, 3000 z1, z2 = 0, 3000 extent = [x1, x2, y1, y2, -z2, -z1]
import pylab import numpy from enthought.mayavi import mlab import fatiando.inv.gplant as gplant import fatiando.grav.io as io import fatiando.grav.synthetic as synthetic import fatiando.mesh import fatiando.utils as utils import fatiando.vis as vis # Get a logger #log = utils.get_logger(logging.WARNING) log = utils.get_logger() # Set logging to a file utils.set_logfile('synthetic.log') # Log a header with the current version info log.info(utils.header()) # GENERATE SYNTHETIC DATA ################################################################################ # Make the prism model model = [] model.append({ 'x1': 15000, 'x2': 85000, 'y1': 15000, 'y2': 35000, 'z1': 0, 'z2': 8000, 'value': 300
import pylab import numpy from enthought.mayavi import mlab import fatiando.inv.gplant as gplant import fatiando.grav.io as io import fatiando.grav.synthetic as synthetic import fatiando.mesh import fatiando.utils as utils import fatiando.vis as vis # Get a logger log = utils.get_logger() # Set logging to a file utils.set_logfile('synthetic.log') # Log a header with the current version info log.info(utils.header()) # GENERATE SYNTHETIC DATA ################################################################################ # Make the prism model model = [] model.append({'x1':500, 'x2':4500, 'y1':3000, 'y2':3500, 'z1':200, 'z2':700, 'value':1000}) model.append({'x1':3000, 'x2':4500, 'y1':1800, 'y2':2300, 'z1':200, 'z2':700, 'value':1000}) model.append({'x1':500, 'x2':1500, 'y1':500, 'y2':1500, 'z1':0, 'z2':800, 'value':600}) model.append({'x1':300, 'x2':2500, 'y1':1800, 'y2':2700, 'z1':500, 'z2':1000, 'value':-1000})
import cPickle as pickle import pylab import numpy from enthought.mayavi import mlab import fatiando.inv.gplant as gplant import fatiando.grav.synthetic as synthetic import fatiando.mesh import fatiando.utils as utils import fatiando.vis as vis log = utils.get_logger() utils.set_logfile('run.log') log.info(utils.header()) # GENERATE SYNTHETIC DATA ################################################################################ # Make the prism model model = [] model.append({'x1':600, 'x2':1600, 'y1':1000, 'y2':2000, 'z1':800, 'z2':1800, 'value':500}) model.append({'x1':3400, 'x2':4400, 'y1':1000, 'y2':2000, 'z1':1600, 'z2':2600, 'value':1000}) model = numpy.array(model) with open("model.pickle", 'w') as f: pickle.dump(model, f) x1, x2 = 0, 5000 y1, y2 = 0, 3000 z1, z2 = 0, 3000 extent = [x1, x2, y1, y2, -z2, -z1]
import pickle import pylab import numpy from enthought.mayavi import mlab from fatiando.inv import gplant from fatiando.grav import io import fatiando.mesh from fatiando import utils, vis # Get a logger log = utils.get_logger() # Set logging to a file utils.set_logfile('plant.log') # Log a header with the current version info log.info(utils.header()) # Load the synthetic data gzz = io.load('gzz.txt') #gxx = io.load('gxx.txt') #gxy = io.load('gxy.txt') #gxz = io.load('gxz.txt') #gyy = io.load('gyy.txt') #gyz = io.load('gyz.txt') topo = io.load_topo('topo.txt') data = {}
""" import pickle import pylab import numpy from enthought.mayavi import mlab from fatiando.grav import synthetic, io from fatiando import utils, vis, geometry # Get a logger for the script log = utils.get_logger() # Set logging to a file utils.set_logfile('make_data.log') # Log a header with the current version info log.info(utils.header()) # Make the prism model prisms = [] prisms.append(geometry.prism(x1=600, x2=1200, y1=200, y2=4200, z1=100, z2=600, props={'value':1300})) prisms.append(geometry.prism(x1=3000, x2=4000, y1=1000, y2=2000, z1=200, z2=800, props={'value':1000})) prisms.append(geometry.prism(x1=2700, x2=3200, y1=3700, y2=4200, z1=0, z2=900, props={'value':1200})) prisms.append(geometry.prism(x1=1500, x2=4500, y1=2500, y2=3000, z1=100, z2=500, props={'value':1500}))