jgomezdans / eoldas_ng

A data assimilation tool for land EO
http://www.eoldas.info
6 stars 8 forks source link

Problem running old examples (the_state.optimize) #9

Closed NPounder closed 9 years ago

NPounder commented 9 years ago

I'm no longer able to run the example notebooks from your workshop (jgomezdans-da_esa_wkshp-a0a1dee). The problem occurs while calling the_state.optimize:

retval = the_state.optimize ( x_dict )

​With the error


UnboundLocalError Traceback (most recent call last)

in () 5 g_list.append ( gamma ) 6 the_smoother.gamma = gamma ----> 7 retval = the_state.optimize ( x_dict ) 8 rmse.append ( np.std( retval['real_map']['magnitude'].reshape((rows,cols)) - ndvi_true ) ) /home/nicola/.local/lib/python2.7/site-packages/eoldas_ng-0.2-py2.7.egg/eoldas_ng/state.pyc in optimize(self, x0, the_bounds, do_unc) 388 jac=True, bounds=the_bounds, options=self.optimisation_options ) 389 retval_dict = {} --> 390 retval_dict['real_map'] = self._unpack_to_dict ( r.x, do_invtransform=True ) 391 retval_dict['transformed_map'] = self._unpack_to_dict ( r.x, \ 392 do_invtransform=False ) UnboundLocalError: local variable 'r' referenced before assignment