Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

started animation of spherical #357

Merged
merged 9 commits into from
Dec 11, 2024
Merged

started animation of spherical #357

merged 9 commits into from
Dec 11, 2024

Conversation

shimwell
Copy link
Member

@shimwell shimwell commented Nov 3, 2024

This PR adds an animation to the example scripts

Todo

  • add pf magnets
  • add tf magnets
  • add divertor

@shimwell
Copy link
Member Author

shimwell commented Dec 6, 2024

def combine_png_files(frames, stem1, stem2, combined_stem):
    for frame in range(frame_count):
        filename1 = f"{stem1}{frame:03d}.png"
        filename2 = f"{stem2}{frame:03d}.png"
        image1 = Image.open(filename1)
        image2 = Image.open(filename2)

        # Assuming both images have the same size
        combined_image = Image.new('RGB', (image1.width + image2.width, image1.height))
        combined_image.paste(image1, (0, 0))
        combined_image.paste(image2, (image1.width, 0))

        combined_image.save(f"{combined_stem}{frame:03d}.png")
        print(f"Combined image saved as {combined_stem}{frame:03d}.png")

@shimwell shimwell merged commit fcdbd13 into main Dec 11, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant