foregrounds.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:fg21sim 作者: liweitianux 项目源码 文件源码
def simulate_component(self, compID):
        """
        Do simulation for the specified foreground component.
        """
        logger.info("==================================================")
        logger.info(">>> Simulate component: %s <<<" % compID)
        logger.info("==================================================")
        t1_start = time.perf_counter()
        t2_start = time.process_time()

        comp_cls = COMPONENTS_ALL[compID]
        comp_obj = comp_cls(self.configs)
        comp_obj.preprocess()
        skyfiles = comp_obj.simulate()
        if self.products:
            self.products.add_component(compID, skyfiles)
        comp_obj.postprocess()

        t1_stop = time.perf_counter()
        t2_stop = time.process_time()
        logger.info("--------------------------------------------------")
        logger.info("Elapsed time: %.1f [min]" % ((t1_stop-t1_start)/60))
        logger.info("CPU process time: %.1f [min]" % ((t2_stop-t2_start)/60))
        logger.info("--------------------------------------------------")
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号