コード例 #1
0
ファイル: widget_windows.py プロジェクト: miha-skalic/ITEKA
    def make_ss_outpust(self, savefolder, sel_eq):
        """
        Creates outputs for single substrate
        """
        # calculate parameters
        calc_result = calculations.find_fit(sel_eq,
                                            sel_eq.initializations,
                                            np.hstack(self.alldata.concentrations),
                                            np.hstack(self.alldata.rates))
        plotfolder = make_file_path([savefolder, sel_eq.name])

        # make fit plots
        reaction_plots.plotoutput(self.alldata, plotfolder, plot_fun=calc_result.function)

        # make residuals plot
        reaction_plots.resi_to_file(self.alldata, plotfolder, equation=calc_result.function)

        # make excel report
        xls_file = make_file_path([plotfolder], '{} fit report.xlsx'.format(sel_eq.name))
        calculations.fit_to_xls(self.alldata, calc_result, xls_file)
コード例 #2
0
ファイル: widget_windows.py プロジェクト: miha-skalic/ITEKA
    def make_ds_output(self, savefolder, sel_eq):
        """
        Creates outputs for double substrate
        """
        plotfolder = make_file_path([savefolder, sel_eq.name])

        # make fits
        sub_a_fits = [calculations.find_fit(sel_eq,
                      sel_eq.initializations, x, y, x2)
                      for x, y, x2 in self.alldata.get_points(True)]
        sub_b_fits = [calculations.find_fit(sel_eq,
                      sel_eq.initializations, x, y, x2)
                      for x, y, x2 in self.alldata.get_points(False)]
        fits = {True: sub_a_fits, False: sub_b_fits}

        # write xls
        xls_file = make_file_path([plotfolder], '{} fit report.xlsx'.format(sel_eq.name))
        calculations.fit_to_xls(self.alldata, fits, xls_file)

        # make fit plots
        plotfolder = make_file_path([savefolder, sel_eq.name])
        reaction_plots.plotoutput(self.alldata, plotfolder, plot_fun=fits)
        reaction_plots.resi_to_file(self.alldata, plotfolder, equations=fits)