/[escript]/branches/doubleplusgood/doc/examples/inversion/mag_netcdf.py
ViewVC logotype

Diff of /branches/doubleplusgood/doc/examples/inversion/mag_netcdf.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 4157 by caltinay, Wed Jan 23 03:52:07 2013 UTC revision 4158 by caltinay, Wed Jan 23 07:02:21 2013 UTC
# Line 24  __url__="https://launchpad.net/escript-f Line 24  __url__="https://launchpad.net/escript-f
24    
25  # Import required modules  # Import required modules
26  from esys.downunder import *  from esys.downunder import *
27    from esys.downunder.minimizers import MinimizerMaxIterReached
28  from esys.escript import unitsSI as U  from esys.escript import unitsSI as U
29  from esys.weipa import saveSilo  from esys.weipa import saveSilo
30    
# Line 54  inv.setup(db) Line 55  inv.setup(db)
55  inv.getCostFunction().setTradeOffFactorsModels(mu)  inv.getCostFunction().setTradeOffFactorsModels(mu)
56    
57  print("Starting inversion, please stand by...")  print("Starting inversion, please stand by...")
58  susceptibility = inv.run()  try:
59        susceptibility = inv.run()
60    except MinimizerMaxIterReached as e:
61        print(e)
62        susceptibility = inv.p
63    
64  print("susceptibility = %s"%susceptibility)  print("susceptibility = %s"%susceptibility)
65    
66  # Save results  # Save results

Legend:
Removed from v.4157  
changed lines
  Added in v.4158

  ViewVC Help
Powered by ViewVC 1.1.26