Ejemplo n.º 1
0
    def execute_dist_stars(self):
        """ execute dist_stats """
        self.info("\n\n\n= Running dist_stars =")

        cmd = (
            "ulimit -s unlimited && "
            #"python3 -u ${MWFITTING_DIR}/dist_stars.py &> mock.log"
            "python3 -u /home/adriano.pieres/mwf_git/mwfitting/dist_stars.py &> dist_stars.log"
        )

        try:
            osutil.OSUtils().run_eups_command(cmd,
                                              mw_fitting_map,
                                              stderrAsErrors=False,
                                              skipErrors=False,
                                              verbose=True)
        finally:
            log = open("dist_stars.log")
            self.info(log.read())
            log.close()

            self.info("--- Partial run time: %s" % self.get_partial_time())
            self.reset_partial_time()
            self.info("--- Comulative run time: %s\n\n" %
                      self.get_total_time())
Ejemplo n.º 2
0
    def execute_multi_make_mock(self):
        """ execute multi_make_mock """
        self.info("\n\n\n= Running multi_make_mock =")

        cmd = (
            "ulimit -s unlimited && "
            #"python -u ${MWFITTING_DIR}/modelfit.py --config mwf.ini --emcee &> emcee.log"
            "python -u /home/adriano.pieres/mwf_git/mwfitting/multi_make_mock.py &> multi_make_mock.log"
        )

        try:
            osutil.OSUtils().run_eups_command(cmd,
                                              mw_fitting_modelfit,
                                              stderrAsErrors=False,
                                              skipErrors=False,
                                              verbose=True)
        finally:
            log = open("multi_make_mock.log")
            self.info(log.read())
            log.close()

            self.info("--- Partial run time: %s" % self.get_partial_time())
            self.reset_partial_time()
            self.info("--- Comulative run time: %s\n\n" %
                      self.get_total_time())