lwang-astro / PeTar

PeTar is a high-performance N-body code for modelling the evolution of star clusters and tidal streams, including the effect of galactic potential, dynamics of binary and hierarchical system, single and binary stellar evolution.
MIT License
71 stars 19 forks source link

petar.movie: default value of -m not working? #40

Closed kaiwu-astro closed 1 year ago

kaiwu-astro commented 1 year ago

Hi! I am trying petar.movie . I have installed ffmpeg and imageio[ffmpeg] as backend. When I run this command

size_=8; petar.movie -i bse -t galpy --generate-binary 2 --x-min -$size_ --x-max $size_ --y-min -$size_ --y-max $size_ snapList

It gives empty figures and an empty movie like this:

data 1

If I explicitly set -m x-y then it produces figures and movie correctly.

size_=8; petar.movie -m x-y -i bse -t galpy --generate-binary 2 --x-min -$size_ --x-max $size_ --y-min -$size_ --y-max $size_ snapList

iShot_2023-07-11_16 38 27

I noticed that the help message says -m has default value of x-y, but it seems I need to explicitly set this kwarg. Is it my problem or there is something wrong?

kaiwu-astro commented 1 year ago

Another small thing is that: petar.data.process supports both -i and --interrupt-mode; both -t and --external-mode, while only the short form is supported in petar.movie. I personally love the long option form to avoid confusion to myself. It would be nice to add support of the long form in petar.movie as well.

41

lwang-astro commented 1 year ago

I have checked and found this is a bug. Now it is fixed and the default plot is -m x-y

kaiwu-astro commented 1 year ago

Thank you for fixing this, and thank you for considering my suggestions 👍