PESTools / pestools

PESTools
12 stars 10 forks source link

ParSen issues #60

Open pkpatkel opened 8 years ago

pkpatkel commented 8 years ago

I'm having some trouble tracking down the source of this issue:

import sys sys.path.append('../pst_tools') from pestools import ParSen ​ import matplotlib.pyplot as plt % matplotlib inline plt.rcParams.update({'figure.figsize':[14,8]}) ​

parsen = ParSen(\Desktop\lrg_pest_20150917\lrg_pest_20150917')

KeyError Traceback (most recent call last)

in () 7 plt.rcParams.update({'figure.figsize':[14,8]}) 8 ----> 9 parsen = ParSen('\Desktop\lrg_pest_20150917\lrg_pest_20150917') C:\Anaconda\lib\site-packages\pestools\parsen.pyc in **init**(self, basename, parameter_data, res_df, jco_df, drop_regul, drop_groups, keep_groups, keep_obs, remove_obs) 163 164 # Fill DataFrame --> 165 self.df = self.calc_sensitivity() 166 167 def calc_sensitivity(self): C:\Anaconda\lib\site-packages\pestools\parsen.pyc in calc_sensitivity(self) 181 par_groups = [] 182 for par in self.jco_df.columns: --> 183 par_group = self._pars_dict[par] 184 par_groups.append(par_group) 185 KeyError: 'sfrhkrgr' I'm not sure which files to check for the missing column... any ideas?
echristi commented 8 years ago

Not sure. My only thought right now is making sure lrg_pest_20150917.jco was created with PEST using the current version of lrg_pest_20150917.pst. If parameter 'sfrhkgr' was removed from the .pst file after generating the .jco file it would produce this error