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

Add movie tutorial with xmovie package #452

Merged
merged 8 commits into from
Sep 1, 2024
Merged

Add movie tutorial with xmovie package #452

merged 8 commits into from
Sep 1, 2024

Conversation

navidcy
Copy link
Collaborator

@navidcy navidcy commented Aug 31, 2024

A tutorial for how to create movies using xmovie package.

Supersedes #427

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@navidcy navidcy linked an issue Aug 31, 2024 that may be closed by this pull request
@navidcy navidcy changed the title Add movie tutorial with movie Add movie tutorial with xmovie package Aug 31, 2024
@@ -0,0 +1,1515 @@
{
Copy link
Collaborator

@adele-morrison adele-morrison Sep 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line #18.        ax.set_title(f"time: {str(da['time'][timestamp].values)}")

Could get rid of a bunch of zeros in the title? e.g.

ax.set_title(f"time: {str(da['time'][timestamp].values)[:-19]}")

Though better if there was a nicer way to do that than arbitrary indexing.


Reply via ReviewNB

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True, I didn't bother I admit. I thought it goes beyond the aim of the tutorial. I don't want to hardcode [:-19] which might work for this case but not for something else....

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll add an issue for this and we can tackle in the future.

Tutorials/Animations_with_xmovie.ipynb Show resolved Hide resolved
Tutorials/Animations_with_xmovie.ipynb Show resolved Hide resolved
@@ -0,0 +1,1515 @@
{
Copy link
Collaborator

@adele-morrison adele-morrison Sep 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about adding overwrite_existing=True ? Otherwise this will throw an error if the file already exists and the testing might have trouble?


Reply via ReviewNB

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking about it, but also I thought it's better that the default does not have the overwrite_existing=True so that people don't accidentally delete something they didn't want to. We can add it later if this creates issue for tests?

@navidcy navidcy merged commit f93ec3c into main Sep 1, 2024
3 checks passed
@navidcy navidcy deleted the ncc/animation branch September 1, 2024 10:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tutorial: Making animations
2 participants