verify pyEMU Influence class


In [2]:
%matplotlib inline
import os
import shutil
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
import pyemu


setting random seed

instaniate pyemu object and drop prior info. Then reorder the jacobian and save as binary. This is needed because the pest utilities require strict order between the control file and jacobian


In [12]:
pst = pyemu.Pst("freyberg.pst")
pst.pestpp_options = {}
inf = pyemu.Influence(jco="freyberg.jcb",pst=pst,verbose=False)
inf.drop_prior_information()
jco_ord = inf.jco.get(inf.pst.obs_names,inf.pst.par_names)
ord_base = "freyberg_ord_infstat"
jco_ord.to_binary(ord_base + ".jco")  
#inf.pst.control_data.parsaverun = ' '
inf.pst.control_data.noptmax = 0
inf.pst.write(ord_base+".pst")
shutil.copy2("freyberg.rei",ord_base+".res")


Out[12]:
'freyberg_ord_infstat.res'

run pest one time since it is super picky about the format of the .res file


In [ ]:


In [8]:
os.system("infstat freyberg_ord")


Out[8]:
0

In [ ]: