mesa icon indicating copy to clipboard operation
mesa copied to clipboard

pgbinary

Open matthiasfabry opened this issue 2 years ago • 0 comments

This adds the minimal infrastructure to mesa for pgbinary, which mimics functionality to star/pgstar. Main feature is that pgstar plots (including pgstar_grids) can be plotted inside pgbinary.

To achieve this, changes to the code are:

  • changed workings of binary_history to more closely mimic star/history
  • changed binary_photos so restarts work with pgbinary
  • made pgstar_grid subplottable
  • All star/pgstar* modules are copied to include/ with ./export, so pgbinary 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_grids, 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_flags or _file_flags 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

example png pgbinary.zip

matthiasfabry avatar Oct 10 '22 07:10 matthiasfabry