def animate(self):
"""
This function ...
:return:
"""
# Inform the user
log.info("Creating an animation of the SED fitting procedure ...")
# Create an Animation instance
self.animation = Animation()
# Loop over the entries of the chi squared table (sorted by decreasing chi squared)
for i in range(len(self.chi_squared)):
# Get the name of the simulation
simulation_name = self.chi_squared["Simulation name"][i]
# Determine the path to the corresponding SED plot file
path = fs.join(self.fit_plot_path, simulation_name, "sed.png")
# Load the image (as a NumPy array)
image = imageio.imread(path)
# Add the image to the animation
self.animation.add_frame(image)
# -----------------------------------------------------------------
评论列表
文章目录