method to get a new LinearAnalysis class using a
        subset of parameters and/or observations

        Parameters
        ----------
        par_names : list
            par names for new object
        obs_names : list
            obs names for new object
        astype : pyemu.Schur or pyemu.ErrVar
            type to cast the new object.  If None, return type is
            same as self

        Returns
        -------
        new : LinearAnalysis

def get(self,par_names=None,obs_names=None,astype=None):
        """method to get a new LinearAnalysis class using a
        subset of parameters and/or observations

        Parameters
        ----------
        par_names : list
            par names for new object
        obs_names : list
            obs names for new object
        astype : pyemu.Schur or pyemu.ErrVar
            type to cast the new object.  If None, return type is
            same as self

        Returns
        -------
        new : LinearAnalysis

        """
        # make sure we aren't fooling with unwanted prior information
        self.clean()
        # if there is nothing to do but copy
        if par_names is None and obs_names is None:
            if astype is not None:
                self.logger.warn("LinearAnalysis.get(): astype is not None, " +
                                 "but par_names and obs_names are None so" +
                                 "\n  ->Omitted attributes will not be " +
                                 "propagated to new instance")
            else:
                return copy.deepcopy(self)
        # make sure the args are lists
        if par_names is not None and not isinstance(par_names, list):
            par_names = [par_names]
        if obs_names is not None and not isinstance(obs_names, list):
            obs_names = [obs_names]

        if par_names is None:
            par_names = self.jco.col_names
        if obs_names is None:
            obs_names = self.jco.row_names
        # if possible, get a new parcov
        if self.parcov:
            new_parcov = self.parcov.get(col_names=[pname for pname in\
                                                    par_names if pname in\
                                                    self.parcov.col_names])
        else:
            new_parcov = None
        # if possible, get a new obscov
        if self.obscov_arg is not None:
            new_obscov = self.obscov.get(row_names=obs_names)
        else:
            new_obscov = None
        # if possible, get a new pst
        if self.pst_arg is not None:
            new_pst = self.pst.get(par_names=par_names,obs_names=obs_names)
        else:
            new_pst = None
        new_extract = None
        if self.predictions:
            # new_preds = []
            # for prediction in self.predictions:
            #     new_preds.append(prediction.get(row_names=par_names))
            new_preds = self.predictions.get(row_names=par_names)

        else:
            new_preds = None
        if self.jco_arg is not None:
            new_jco = self.jco.get(row_names=obs_names, col_names=par_names)
        else:
            new_jco = None
        if astype is not None:
            new = astype(jco=new_jco, pst=new_pst, parcov=new_parcov,
                          obscov=new_obscov, predictions=new_preds,
                          verbose=False)
        else:
            # return a new object of the same type
            new = type(self)(jco=new_jco, pst=new_pst, parcov=new_parcov,
                              obscov=new_obscov, predictions=new_preds,
                              verbose=False)
        return new