Module for post-processing POSYDON grids.

posydon.grids.post_processing.add_post_processed_quantities(grid, MESA_dirs_EXTRA_COLUMNS, EXTRA_COLUMNS, verbose=False)[source]

Append post processed quantity to a grid.

This function appends the quantities computed in post_process_grid to any grid. Note that this function ensures you can append the quantities only if the grid follows the order of MESA_dirs_EXTRA_COLUMNS.

Parameters
  • grid (PSyGrid) – MESA grid in PSyGrid format.

  • MESA_dirs (list) – List containing the path to each run corresponding to the post processed values. This is used to ensure one to one mapping when appending the extra columns back to a grid.

  • EXTRA_COLUMNS (dict) – Dictionary containing all post processed quantities.

  • verbose (bool) – If True print the results of each core collapse on screen.

posydon.grids.post_processing.post_process_grid(grid, index=None, star_2_CO=True, MODEL={'ECSN': 'Podsiadlowksi+04', 'PISN': 'Marchant+19', 'approx_at_he_depletion': False, 'engine': None, 'kick': True, 'max_NS_mass': 2.5, 'max_neutrino_mass_loss': 0.5, 'mechanism': None, 'sigma_kick_CCSN_BH': 265.0, 'sigma_kick_CCSN_NS': 265.0, 'sigma_kick_ECSN': 20.0, 'use_core_masses': False, 'use_interp_values': False, 'use_profiles': True, 'verbose': False}, single_star=False, verbose=False)[source]

Compute post processed quantitiy of any grid.

This function post processes any supported grid and computes: - Core collapse quantities for 5 prescriptions given the fiducial POSYDON assumption given in MODEL plus:

A: direct collapse B: Fryer+12-rapid C: Fryer+12-delayed D: Sukhbold+16-engine, N20 E: Patton&Sukhbold20-engine, N20 for each prescrition we store the compact object state (WD/NS/BH), SN type (WD, ECSN, CCSN, PISN, PPISN), fallback mass fraction f_gb, compact object mass and spin.

  • Core masses at he-depletion (used in Patton core collapse)

  • Mass envelopes for common envelope step.

Parameters
  • grid (PSyGrid) – MESA grid in PSyGrid format.

  • index (None, touple or int) – If None, loop over all indicies otherwise provide a range, e.g. [10,20] or a index, e.g. 42.

  • star_2_CO (bool) – If ‘False’ star 2 is not a compact object.

  • MODEL (dict) – Core collapse model assumptions.

  • single_star (bool) – If True the PSyGrid contains single stars.

  • verbose (bool) – If True print the results of each core collapse on screen.

Returns

  • MESA_dirs (list) – List containing the path to each run corresponding to the post processed values. This is used to ensure one to one mapping when appending the extra columns back to a grid.

  • EXTRA_COLUMNS (dict) – Dictionary containing all post processed quantities.