def __init__(self, type='Smoother', iterate=False, pst=None, mode='stochastic', options={}):
        """
        A clase to implement one or multiple update cycle. For the Ensemble smoother (ES), the update cycle includes all available
        observations. Ror Ensemble Kalman Filter (EnKF), the update is acheived on multiple cycles (time windows); and finally the nsemble Kalman Smoother (EnKS)
        updat parameters given all observations available up to a certain time
        """
        self.mode_options = ['Stochastic', 'Deterministic']
        self.type_options = ['Smoother', 'Kalman Filter', 'Kalman Smoother']

        if not isinstance(iterate, bool):
            raise ValueError("Error, 'iterate' must be boolian")  # I think warning would better
        self.iterate = iterate  # If true Chen-Oliver scheme will be used, otherwise classical data assimilation will used.

        if type not in self.type_options:
            raise ValueError("Assimilation type [{}] specified is not supported".format(type))
        self.type = type

        if mode not in self.mode_options:
            raise ValueError("Assimilation mode [{}] specified is not supported".format(mode))
        self.mode = mode

        # Obtain problem setting from the pst object.
        if isinstance(pst, pyemu):
            self.pst = pst
        else:  # TODO: it is better if we check if this is a file, throw exception otherwise
            self.pst = pyemu.Pst(pst)

        # Time Cycle info. example
        # {[ ['file_1.tpl', 'file_1.dat'],
        #    ['file_2.tpl', 'file_2.dat'],
        #    ['out_file.ins', 'out_file.out']}

        self.cycle_update_files = {}
def __init__ ( self , type = 'Smoother' , iterate = False , pst = None , mode = 'stochastic' , options = { } ) : self . mode_options = [ 'Stochastic' , 'Deterministic' ] self . type_options = [ 'Smoother' , 'Kalman Filter' , 'Kalman Smoother' ] if not isinstance ( iterate , bool ) : raise ValueError ( "Error, 'iterate' must be boolian" ) self . iterate = iterate if type not in self . type_options : raise ValueError ( "Assimilation type [{}] specified is not supported" . format ( type ) ) self . type = type if mode not in self . mode_options : raise ValueError ( "Assimilation mode [{}] specified is not supported" . format ( mode ) ) self . mode = mode if isinstance ( pst , pyemu ) : self . pst = pst else : self . pst = pyemu . Pst ( pst ) self . cycle_update_files = { }
A clase to implement one or multiple update cycle. For the Ensemble smoother (ES), the update cycle includes all available
        observations. Ror Ensemble Kalman Filter (EnKF), the update is acheived on multiple cycles (time windows); and finally the nsemble Kalman Smoother (EnKS)
        updat parameters given all observations available up to a certain time