Ejemplo n.º 1
0
    def to_parfiles(self, prefix):
        """
            write the parameter ensemble to pest-style parameter files

        Parameters:
        ----------
            prefix: (str) file prefix for par files

        Note:
        ----
            this function back-transforms before writing

        """

        if self.istransformed:
            self._back_transform(inplace=True)

        par_df = self.pst.parameter_data.loc[:, [
            "parnme", "parval1", "scale", "offset"
        ]].copy()

        for real in self.index:
            par_file = prefix + real + ".par"
            par_df.loc[:, "parval1"] = self.loc[real, :]
            write_parfile(par_df, par_file)
Ejemplo n.º 2
0
    def to_parfiles(self, prefix):
        """
            write the parameter ensemble to PEST-style parameter files

        Parameters
        ----------
        prefix: str
            file prefix for par files

        Note
        ----
        this function back-transforms inplace with respect to
        log10 before writing

        """

        if self.istransformed:
            self._back_transform(inplace=True)

        par_df = self.pst.parameter_data.loc[:, [
            "parnme", "parval1", "scale", "offset"
        ]].copy()

        for real in self.index:
            par_file = "{0}{1}.par".format(prefix, real)
            par_df.loc[:, "parval1"] = self.loc[real, :]
            write_parfile(par_df, par_file)
Ejemplo n.º 3
0
Archivo: en.py Proyecto: wk1984/pyemu
    def to_parfiles(self,prefix):
        """
            write the parameter ensemble to pest-style parameter files

        Parameters:
        ----------
            prefix: (str) file prefix for par files

        Note:
        ----
            this function back-transforms before writing

        """

        if self.istransformed:
            self._back_transform(inplace=True)

        par_df = self.pst.parameter_data.loc[:,
                 ["parnme","parval1","scale","offset"]].copy()

        for real in self.index:
            par_file = prefix+real+".par"
            par_df.loc[:,"parval1"] =self.loc[real,:]
            write_parfile(par_df,par_file)