Methods for scrubbing MESA histories from backsteps etc.

posydon.grids.scrubbing.keep_after_RLO(bh, h1, h2)[source]

Scrub histories from the initial steps without RLO mass transfer.

Parameters
  • bh (array) – The binary_history array.

  • h1 (array) – The history1 array.

  • h2 (array) – The history2 array.

Returns

The binary, history1 and history2 arrays after removing the leading steps without RLO overflow mass transfer from star1 or star2. If an RLO phase is not detected, a warning is raised, and returns None.

Return type

tuple or arrays, or None

posydon.grids.scrubbing.scrub(tables, models, ages)[source]

Scrub binary and star histories of a MESA run in one go.

Parameters
  • tables (list) – All history tables to be returned scrubbed.

  • models (list) – Model number columns corresponding to each table in tables.

  • ages (list) – Age columns corresponding to each table in tables.

Returns

The list of scrubbed tables, ensuring monotonicity in age, and overlap in model numbers.

Return type

list