Skip to content

Commit

Permalink
renamed write gif to save_animated_gif
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperdoerTrav committed Jul 25, 2024
1 parent 1db35bc commit 64843a2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ssapy/plotUtils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1281,7 +1281,7 @@ def save_plot(figure, save_path, dpi=200):
print(f"Error occurred while saving the figure: {e}")


def write_gif(gif_name, frames, fps=30):
def save_animated_gif(gif_name, frames, fps=30):
"""
Create a GIF from a sequence of image frames.
Expand Down
4 changes: 2 additions & 2 deletions tests/test_plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
i += 1

gif_path = f"{save_folder}/rotate_vectors_{v_unit[0]:.0f}_{v_unit[1]:.0f}_{v_unit[2]:.0f}.gif"
ssapy.plotUtils.write_gif(gif_name=gif_path, frames=ssapy.io.sortbynum(ssapy.io.listdir(f'{temp_directory}*')), fps=20)
ssapy.plotUtils.save_animated_gif(gif_name=gif_path, frames=ssapy.io.sortbynum(ssapy.io.listdir(f'{temp_directory}*')), fps=20)
shutil.rmtree(temp_directory)


Expand Down Expand Up @@ -165,6 +165,6 @@ def DRO(t, delta_r=7.52064e7, delta_v=344):
print(f"Lagrange points were calculated correctly.")
print(f"Rotate vector plot successfully created.")
print(f"save_plot() executed succesfully.")
print(f"write_gif() executed succesfully.")
print(f"save_animated_gif() executed succesfully.")

print(f"\nFinished plot testing!\n")

0 comments on commit 64843a2

Please sign in to comment.