mesa
mesa copied to clipboard
pgbinary
This adds the minimal infrastructure to mesa
for pgbinary
, which mimics functionality to star/pgstar
.
Main feature is that pgstar
plots (including pgstar_grid
s) can be plotted inside pgbinary
.
To achieve this, changes to the code are:
- changed workings of
binary_history
to more closely mimicstar/history
- changed
binary_photos
so restarts work withpgbinary
- made
pgstar_grid
subplottable - All
star/pgstar*
modules are copied toinclude/
with./export
, sopgbinary
can import them
Other changes are mostly large diffs that are just spacing related, introduced by the automatic formatter in my IDE.
Below I showcase the envisioned use of pgbinary
:
I plot a pgbinary_grid
window with 4 panels.
Two of them contain pgstar_grid
s, which show the two stars' information as if pgstar
was used. Note that pgstar_flag == .false.
! This is intended. If pgstar_flag
were true, in this example nothing special would happen as all pgstar
's _win_flag
s or _file_flag
s are .false.
. One can of course create any pgstar
window or file on top of pgbinary
ones by using the appropriate flags.
The two other panels show some binary_history
info, and a new plot, `pgbinary_orbit', giving a visual impression of the orbit of the two objects (be they point masses or not). This plot may not be super interesting from an astrophysics point of view, but it might from an educational/didactical point of view, it also provides a natural sense of the mass ratio of the system.
I would love to hear your feedback! Matthias