POSYDON-code / POSYDON

POSYDON is a next-generation single and binary-star population synthesis code incorporating full stellar structure and evolution modeling with the use of MESA.
BSD 3-Clause "New" or "Revised" License
25 stars 19 forks source link

Add extra hooks columns to binary.restore() #306

Closed celiotine closed 1 month ago

celiotine commented 1 month ago

This PR adds extra columns associated with hooks in the SimulationProperties (e.g. step names, step times) to the BinaryStar and SingleStar restore() functions. It looks for any hooks classes in the simulation properties and checks if they add extra binary or star columns to the evolution. These column names now must defined in the hooks constructors as shown.

NOTE: Currently, the hooks columns can only be restored if a binary is initialized and evolved with the desired simulation properties/hooks. The binary cannot be restored with these columns, for example, if the user reads a binary from an hdf file. If we want this functionality, the dev is more involved and I would suggest a separate PR.

maxbriel commented 1 month ago

This solved Issue #291 🔱