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("--------------------------------------------------")
评论列表
文章目录