I’m curious if there is a quick way to convert an input file to a
GravityDriver_Inv like the
.inp file in this example: http://docs.simpeg.xyz/content/examples/04-grav/plot_laguna_del_maule_inversion.html
I imagine this is definitely possible and have started by reading the topo and mesh files, but how do I set all the other properties programmatically?
FILE LdM_mesh.mesh ! Mesh file FILE LdM_grav_obs.grv ! Obsfile TOPO LdM_topo.topo ! TOPO Topofilename !or! FILE Activecellfilename. ! 0 = air, inactive, 1 = dynamic, -1 = static. VALUE 1E-4 ! Starting model | VALUE 1E-4 VALUE 0.0 ! Reference model DEFAULT ! Cell based weight file VALUE 1 ! target chi factor | DEFAULT=1 VALUE 1 1 1 1 ! alpha s, x ,y ,z VALUE -0.6 0.3 ! Lower and Upper Bounds for p-component in g/cc VALUE 0 1 1 1 2 ! lp-norm for amplitude inversion FILE pqxqyqzr.dat ! Norms VALUE p, qx, qy, qz, r | FILE m-by-5 matrix DEFAULT ! Threshold value for the norm on model and model gradient VALUE eps_p, eps_q | DEFAULT
Normally, you could do:
import SimPEG.PF as PF driver = PF.GravityDriver.GravityDriver_Inv(input_file)
but what if I want to do the same thing with code and not have the file?:
import discretize driver = PF.GravityDriver.GravityDriver_Inv() driver._mesh = discretize.TensorMesh.readUBC("LdM_mesh.mesh") ... # but what about all the other properties?