upper=Ubound, maxIterLS=10, maxIterCG=20, tolCG=1e-3, LSalwaysPass=True, stepOffBoundsFact=1e-8) invProb = InvProblem.BaseInvProblem(dmis, reg, opt) # LIST OF DIRECTIVES # betaest = Directives.BetaEstimate_ByEig() IRLS = Directives.Update_IRLS(f_min_change=1e-6, minGNiter=2, beta_tol=1e-2, coolingRate=2) update_SensWeight = Directives.UpdateSensWeighting() update_Jacobi = Directives.UpdatePreCond() ProjSpherical = Directives.ProjSpherical() JointAmpMVI = Directives.JointAmpMVI() betaest = Directives.BetaEstimate_ByEig(beta0_ratio = 1e+3) saveModel = Directives.SaveUBCModelEveryIteration(mapping=actvMap, saveComp=True) saveModel.fileName = work_dir+out_dir + 'JOINT_MVIC_A' inv = Inversion.BaseInversion(invProb, directiveList=[betaest, IRLS, update_SensWeight, update_Jacobi, saveModel]) # Run JOINT mrec = inv.run(mstart) #NOTE - Would like to have dpred working on both surveys
invProb = InvProblem.BaseInvProblem(dmis, reg, opt) # Here is the list of directives betaest = Directives.BetaEstimate_ByEig() # Specify the sparse norms IRLS = Directives.Update_IRLS(f_min_change=1e-3, minGNiter=3, coolingRate=1, chifact_target=0.25, maxIRLSiter=3) # Special directive specific to the mag amplitude problem. The sensitivity # weights are update between each iteration. update_SensWeight = Directives.UpdateSensWeighting(everyIter=True) update_Jacobi = Directives.UpdatePreCond(epsilon=1e-3) saveModel = Directives.SaveUBCModelEveryIteration(mapping=actvMap) saveModel.fileName = work_dir + out_dir + 'AmpInv' # Put all together inv = Inversion.BaseInversion( invProb, directiveList=[betaest, IRLS, update_SensWeight, update_Jacobi, saveModel]) # Invert mrec = inv.run(mstart) # Outputs Mesh.TensorMesh.writeModelUBC(mesh, work_dir + out_dir + "AmpInv_l2l2.sus", actvMap * invProb.l2model)